/* =========================================================================
   TASATRADING - WebAppNextGen
   Hệ thống quản lý kế hoạch vận tải
   Toàn bộ style của app shell, login, dashboard và các component tái sử dụng.
   Thuần CSS - không phụ thuộc Syncfusion.
   ========================================================================= */

/* ---------- 0. Font offline hỗ trợ tiếng Việt ---------- */
@font-face {
    font-family: 'RobotoVN';
    src: url('/fonts/roboto-v30-latin_vietnamese-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RobotoVN';
    src: url('/fonts/roboto-v30-latin_vietnamese-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'RobotoVN';
    src: url('/fonts/roboto-v30-latin_vietnamese-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RobotoVN';
    src: url('/fonts/roboto-v30-latin_vietnamese-500italic.woff2') format('woff2');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'RobotoVN';
    src: url('/fonts/roboto-v30-latin_vietnamese-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'RobotoVN';
    src: url('/fonts/roboto-v30-latin_vietnamese-700italic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* ---------- 1. Biến theme (sáng + thương hiệu TASACO xanh lá / đỏ) ---------- */
:root {
    /* Màu thương hiệu - lấy từ logo TASACO */
    --brand: #0f9d4f;
    --brand-600: #0c8442;
    --brand-700: #0a6e37;
    --brand-soft: #e3f7eb;
    --accent-teal: #0a6e37;
    --accent-teal-soft: #d8f3e2;

    /* Đỏ thương hiệu (accent từ logo) */
    --brand-red: #e1262f;
    --brand-red-600: #c41f27;
    --brand-red-soft: #fde7e8;

    /* Trạng thái */
    --success: #16a34a;
    --success-soft: #dcfce7;
    --warning: #f59e0b;
    --warning-soft: #fef3c7;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --info: #0891b2;
    --info-soft: #cffafe;

    /* Nền & chữ */
    --bg-body: #f7faf8;
    --bg-surface: #ffffff;
    --bg-surface-2: #f4f9f5;
    --bg-sidebar: #ffffff;
    --bg-sidebar-hover: #eef8f1;
    --bg-sidebar-active: #e3f7eb;

    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-faint: #94a3b8;
    --text-on-dark: #1e293b;
    --text-on-dark-muted: #64748b;

    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    /* Kích thước layout */
    --topbar-h: 60px;
    --sidebar-w: 264px;
    --sidebar-w-collapsed: 72px;
    --radius: 10px;
    --radius-sm: 7px;
    --radius-lg: 16px;

    /* Bóng */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 2px 8px rgba(15, 23, 42, .08);
    --shadow-md: 0 6px 20px rgba(15, 23, 42, .12);
    --shadow-lg: 0 16px 48px rgba(15, 23, 42, .18);

    --transition: .22s cubic-bezier(.4, 0, .2, 1);
    --font-main: 'RobotoVN', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- 2. Reset / cơ bản ---------- */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    font-size: 14px;
    color: var(--text-main);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    scrollbar-width: thin;
    scrollbar-color: #9bcbaa transparent;
    overflow:hidden;
}

button, input, select, textarea {
    font-family: var(--font-main);
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-700); }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; }

/* Bỏ viền focus mặc định trên các tiêu đề / khối không tương tác */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus,
.panel-title:focus, .breadcrumb-title:focus, [tabindex="-1"]:focus { outline: none; }

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c7dfcf, #9bcbaa);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--brand), var(--brand-700)); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ---------- 2.1. Combobox giới tính ---------- */
.cmbgt-root { position: relative; width: 100%; }
.cmbgt-shell {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    height: 34px;
    border: 1px solid #d7dfeb;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04);
    transition: border-color .18s ease, box-shadow .18s ease;
    overflow: hidden;
    padding: 0;
}
.cmbgt-shell:hover:not(.disabled):not(.readonly) {
    border-color: #c7d7ee;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}
.cmbgt-shell:focus-visible,
.cmbgt-shell:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft), 0 4px 12px rgba(15, 157, 79, .10);
}
.cmbgt-shell.disabled {
    background: #f5f7fb;
    opacity: .8;
    cursor: not-allowed;
}
.cmbgt-shell.readonly {
    background: #f8fafc;
}
.cmbgt-shell-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 0 0 0 14px;
}
.cmbgt-shell-label {
    display: block;
    width: 100%;
    min-width: 0;
    text-align: left;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cmbgt-shell-label.is-placeholder {
    color: #94a3b8;
}
.cmbgt-shell-actions {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.cmbgt-icon-btn {
    width: 36px;
    min-width: 36px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(148, 163, 184, 0.14);
    background: transparent;
    color: #64748b;
    transition: background .16s ease, color .16s ease;
}
    .cmbgt-icon-btn.clear {
        color: #BDBDBD !important;
    }
    .cmbgt-icon-btn:hover {
        background: rgba(59, 130, 246, 0.08);
        color: #2563eb;
    }
.cmbgt-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147482000;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, .16), 0 10px 24px rgba(15, 23, 42, .06);
    overflow: hidden;
}
.cmbgt-popup.show { display: block; }
.cmbgt-filter-wrap {
    position: relative;
    padding: 5px 5px;
    border-bottom: 1px solid rgba(226, 232, 240, .75);
    background: rgba(255,255,255,.92);
}
.cmbgt-filter-icon {
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 13px;
    pointer-events: none;
}
.cmbgt-filter-input {
    height: 35px !important;
    padding-left: 42px !important;
    padding-right: 38px !important;
    border-radius: 8px !important;
    border: 1px solid #dbe4f0;
    background: #f8fbff;
    box-shadow: none;
}
.cmbgt-filter-input.is-loading {
    background: #fcfdff;
}
.cmbgt-filter-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .10);
    background: #fff;
}
.cmbgt-filter-spinner {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}
.cmbgt-filter-spinner i {
    animation: cmbgt-spin .9s linear infinite;
}
.cmbgt-filter-clear {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #94a3b8;
}
.cmbgt-filter-clear:hover {
    background: rgba(148, 163, 184, .14);
    color: #475569;
}
.cmbgt-popup-inner {
    overflow: auto;
    min-height: 150px;
}
.cmbgt-popup-inner.is-few-items {
    height: auto;
    min-height:150px;
}
.cmbgt-skeleton-list {
    display: grid;
    gap: 6px;
    padding: 4px 2px 2px;
}
.cmbgt-skeleton-item {
    padding: 9px 10px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(248, 250, 252, .9) 0%, rgba(255, 255, 255, .92) 100%);
}
.cmbgt-skeleton-line {
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(226,232,240,.72) 25%, rgba(241,245,249,.96) 50%, rgba(226,232,240,.72) 75%);
    background-size: 220% 100%;
    animation: cmbgt-skeleton-wave 1.25s linear infinite;
}
.cmbgt-skeleton-line.short {
    width: 34%;
    margin-bottom: 7px;
}
.cmbgt-state.compact {
    min-height: 0;
    height: 100%;
    gap: 6px;
}
.cmbgt-list-wrap,
.cmbgt-state,
.cmbgt-skeleton-list {
    animation: cmbgt-fade-in .18s ease;
}
.cmbgt-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 10px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background .14s ease, color .14s ease;
    border-bottom: 1px solid #EEEEEE;
}
    .cmbgt-item:last-child{
        border-bottom:0px;
    }
    .cmbgt-item:hover {
        background: rgba(59, 130, 246, .08);
    }
.cmbgt-item.selected {
    background: rgba(37, 99, 235, .10);
}
.cmbgt-item.active {
    background: rgba(59, 130, 246, .12);
}
.cmbgt-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E3F2FD;
    color: #1565C0;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
}
.cmbgt-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cmbgt-avatar-letter {
    line-height: 1;
    user-select: none;
}
.cmbgt-item-main {
    min-width: 0;
    flex: 1;
}
.cmbgt-code {
    color: #212121;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}
.cmbgt-name {
    margin-top: 2px;
    color: #455A64;
    font-size: 12px;
    line-height: 1.45;
}
.cmbgt-item-check {
    color: #2563eb;
    font-size: 15px;
    flex-shrink: 0;
}
.cmbgt-highlight {
    padding: 0 2px;
    border-radius: 4px;
    background: #fff3bf;
    color: #8a4b00;
}
.cmbgt-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 100%;
    min-height: 0;
    padding: 18px 14px;
    text-align: center;
}
.cmbgt-state-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    color: #64748b;
    font-size: 18px;
}
.cmbgt-state.is-loading .cmbgt-state-icon i {
    animation: cmbgt-spin 1s linear infinite;
}
.cmbgt-state-title {
    color: #0f172a;
    font-size: 13px;
    font-weight: 400;
}
.cmbgt-state-text {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
    max-width: 220px;
}
.cmbgt-add-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    padding: 5px 14px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}
.cmbgt-add-new-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}
.cmbgt-add-new-btn i {
    font-size: 13px;
}
@keyframes cmbgt-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes cmbgt-fade-in {
    from { opacity: 0; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pageEnter {
    0% {
        opacity: .96;
    }
    100% {
        opacity: 1;
    }
}

@keyframes pageRouteSwap {
    0% {
        opacity: 1;
    }
    100% {
        opacity: .985;
    }
}

@keyframes pageProgressRun {
    from { background-position: -180px 0; }
    to { background-position: calc(100% + 180px) 0; }
}

@keyframes cmbgt-skeleton-wave {

    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* ---------- 3. App shell layout ---------- */
.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-w-collapsed);
    transition: margin-left var(--transition);
}

.app-shell.sidebar-collapsed .app-main { margin-left: var(--sidebar-w-collapsed); }
.app-shell.sidebar-pinned .app-main { margin-left: var(--sidebar-w); }

.app-content {
    flex: 1;
    min-height: 0;
    padding: 0;
}

.page-transition-shell {
    position: relative;
    overflow: visible;
    background: transparent;
}

.page-transition-stage {
    min-height: 100%;
    will-change: auto;
}

.page-transition-shell.is-routing .page-transition-stage {
    animation: none;
}

.page-transition-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 100%;
    pointer-events: none;
    opacity: 0;
    z-index: 3;
    background: linear-gradient(90deg, rgba(15,157,79,0) 0%, rgba(15,157,79,.95) 35%, rgba(225,38,47,.88) 65%, rgba(15,157,79,0) 100%);
    background-size: 180px 100%;
    background-repeat: no-repeat;
    background-position: -180px 0;
}

.page-transition-shell.is-routing .page-transition-progress {
    opacity: 1;
    animation: pageProgressRun .48s linear infinite;
}

.page-transition-flash {
    display: none;
}

/* ---------- 4. Sidebar ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    color: var(--text-on-dark);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    border-right: 1px solid var(--border);
    box-shadow: 6px 0 22px rgba(15, 23, 42, .06) ;
    transition: width var(--transition), transform var(--transition), box-shadow var(--transition);
}

.app-shell.sidebar-collapsed .sidebar {
    width: var(--sidebar-w-collapsed);
}

.app-shell.sidebar-collapsed .sidebar:hover {
    width: var(--sidebar-w);
    box-shadow: 14px 0 36px rgba(15, 23, 42, .16);
}

.app-shell:not(.sidebar-collapsed) .sidebar,
.app-shell.sidebar-pinned .sidebar {
    width: var(--sidebar-w);
    box-shadow: 18px 0 44px rgba(15, 23, 42, .18);
}

/* Logo */
.sidebar-brand {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    overflow: hidden;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(15, 157, 79, .16);
}
/* Khi bạn đưa ảnh logo: <img> sẽ thay phần này */
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.brand-text .brand-name { font-size: 16px; font-weight: 700; color: var(--brand-700); letter-spacing: .3px; }
.brand-text .brand-sub { font-size: 11px; color: var(--text-on-dark-muted); }

.app-shell.sidebar-collapsed .brand-text { display: none; }
.app-shell.sidebar-collapsed .sidebar:hover .brand-text { display: flex; }
.app-shell:not(.sidebar-collapsed) .brand-text { display: flex; }

.sidebar-pin-btn {
    margin-left: auto;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border var(--transition), transform var(--transition), box-shadow var(--transition);
}
.sidebar-pin-btn:hover,
.sidebar-pin-btn.pinned {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand-700);
    box-shadow: 0 6px 14px rgba(15, 157, 79, .14);
    transform: translateY(-1px);
}
.app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-pin-btn { display: none; }

/* ---------- Ô tìm kiếm menu trong sidebar ---------- */
.sidebar-search {
    position: relative;
    margin: 8px 12px 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.sidebar-search-icon {
    position: absolute;
    left: 12px;
    font-size: 15px;
    color: #7fa894;
    pointer-events: none;
    transition: color .18s ease;
    z-index: 1;
}
.sidebar-search-input {
    width: 100%;
    height: 40px;
    padding: 0 38px 0 36px;
    border: 1.5px solid #cfeedd;
    border-radius: 10px;
    background: #f6fdf8;
    color: #1a4a2e;
    font-size: 13px;
    font-weight: 500;
    outline: none;
    transition: all .22s cubic-bezier(.4,0,.2,1);
}
.sidebar-search-input::placeholder {
    color: #8aac99;
    font-weight: 400;
    font-style: italic;
}
.sidebar-search-input:focus {
    border-color: #22c55e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(34,197,94,.14), 0 2px 8px rgba(15,157,79,.08);
}
.sidebar-search.has-text .sidebar-search-icon {
    color: #22c55e;
}
.sidebar-search-clear {
    position: absolute;
    right: 6px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #8aac99;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .16s ease;
    z-index: 1;
}
.sidebar-search-clear:hover {
    background: #e2f5ea;
    color: #ef4444;
}

/* Empty state khi không tìm thấy */
.sidebar-search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 16px;
    color: #9ab8a6;
    font-size: 13px;
    text-align: center;
}
.sidebar-search-empty i {
    font-size: 28px;
    opacity: .5;
}

/* Ẩn search khi collapsed (chỉ hiện icon) */
.app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-search-input {
    padding: 0;
    text-align: center;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    cursor: pointer;
    color: transparent;
}
.app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-search-input::placeholder { color: transparent; }
.app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-search-icon {
    left: 40%;
    transform: translateX(-50%);
    font-size: 21px;
    color: #D32F2F;
}
.app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-search-clear { display: none; }
.app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-search-empty { display: none; }

/* Khi hover trên collapsed → hiện lại bình thường */
.app-shell.sidebar-collapsed .sidebar:hover .sidebar-search-input {
    padding: 0 38px 0 36px;
    text-align: left;
    background: #f6fdf8;
    border-color: #cfeedd;
    box-shadow: none;
    color: #1a4a2e;
    cursor: text;
}
.app-shell.sidebar-collapsed .sidebar:hover .sidebar-search-icon {
    left: 12px;
    transform: none;
    font-size: 15px;
    color: #7fa894;
}
.app-shell.sidebar-collapsed .sidebar:hover .sidebar-search-empty { display: flex; }
.app-shell.sidebar-collapsed .sidebar:hover .sidebar-search-empty { display: flex; }

/* Khu vực menu cuộn */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0 16px;
}
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-strong); }

.nav-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 12px 4px;
    padding: 0 12px;
    min-height: 24px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.15px;
    color: rgba(236, 242, 247, .66);
    white-space: nowrap;
    margin-bottom:15px !important;
}
.nav-section-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #B71C1C;
    font-size: 16px;
    flex-shrink: 0;
}
.nav-section-title-text {
    min-width: 0;
    line-height: 1;
}
.app-shell.sidebar-collapsed .nav-section-title {
    justify-content: center;
    margin: 12px 12px 6px;
    padding: 0;
    min-height: 22px;
    font-size: 0;
}
.app-shell.sidebar-collapsed .nav-section-title-icon {
    width: 18px;
    height: 18px;
    font-size: 13px;
    color: #9E9E9E;
}
    .app-shell.sidebar-collapsed .nav-section-title::after {
        content: none;
    }
.app-shell.sidebar-collapsed .nav-section-title-text {
    display: none;
}
.app-shell.sidebar-collapsed .sidebar:hover .nav-section-title {
    justify-content: flex-start;
    margin: 12px 12px 4px;
    padding: 0 12px;
    min-height: 24px;
    font-size: 10.5px;
}
.app-shell.sidebar-collapsed .sidebar:hover .nav-section-title-icon {
    width: 18px;
    height: 18px;
    font-size: 12px;
}
.app-shell.sidebar-collapsed .sidebar:hover .nav-section-title::after { content: none; }
.app-shell.sidebar-collapsed .sidebar:hover .nav-section-title-text {
    display: inline;
}

/* Item menu */
.nav-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2px 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-on-dark);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    border: none;
    background: none;
    width: calc(100% - 24px);
    text-align: left;
    font-size: 14px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}
.nav-link-item:hover { background: var(--bg-sidebar-hover); color: var(--brand-700); }
.nav-link-item.active {
    background: var(--bg-sidebar-active);
    color: var(--brand-700);
    box-shadow: inset 3px 0 0 var(--brand), 0 4px 12px rgba(15, 157, 79, .12);
}
.nav-link-item.disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}
.nav-group.just-opened > .nav-link-item,
.nav-link-item.just-opened {
    color: var(--brand-700);
    background: linear-gradient(90deg, rgba(15, 157, 79, .22) 0%, rgba(227, 247, 235, .96) 55%, rgba(255, 255, 255, .98) 100%);
    box-shadow: inset 4px 0 0 var(--brand), 0 10px 24px rgba(15, 157, 79, .18);
    animation: navGroupHighlight .95s ease;
}
.nav-group.just-opened > .nav-link-item::after,
.nav-link-item.just-opened::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.62) 48%, rgba(255,255,255,0) 100%);
    transform: translateX(-100%);
    animation: navGroupHighlightSweep .85s ease;
    pointer-events: none;
}

.nav-link-item .nav-icon {
    font-size: 21px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.nav-link-item .nav-text { flex: 1; }

.nav-badge {
    background: var(--danger);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 10px;
    padding: 0 6px;
}

.nav-caret { font-size: 12px; transition: transform var(--transition); color: var(--text-on-dark-muted); }
.nav-group.open > .nav-link-item .nav-caret { transform: rotate(90deg); }

/* Submenu */
.nav-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
}
.nav-group.open > .nav-sub { max-height: 520px; }

.nav-sub .nav-link-item {
    padding-left: 30px;
    font-size: 13.5px;
    color: var(--text-on-dark-muted);
}
.nav-sub .nav-link-item .nav-icon { font-size: 14px; }
.nav-sub .nav-link-item:hover,
.nav-sub .nav-link-item.active { color: var(--brand-700); background: var(--bg-sidebar-hover); }
.nav-sub .nav-link-item.active { border-left: 3px solid var(--brand); }

@keyframes navGroupHighlight {
    0% {
        transform: translateX(-2px);
        box-shadow: inset 4px 0 0 var(--brand), 0 0 0 rgba(15, 157, 79, 0);
        filter: saturate(1.1);
    }
    45% {
        transform: translateX(0);
        box-shadow: inset 4px 0 0 var(--brand), 0 14px 28px rgba(15, 157, 79, .22);
    }
    100% {
        transform: translateX(0);
        box-shadow: inset 4px 0 0 var(--brand), 0 10px 24px rgba(15, 157, 79, .18);
        filter: saturate(1);
    }
}

@keyframes navGroupHighlightSweep {
    from { transform: translateX(-100%); opacity: 0; }
    30% { opacity: .95; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Khi thu gọn: ẩn chữ, badge, caret và submenu */
.app-shell.sidebar-collapsed .nav-text,
.app-shell.sidebar-collapsed .nav-badge,
.app-shell.sidebar-collapsed .nav-caret { display: none; }
.app-shell.sidebar-collapsed .nav-sub { display: none; }
.app-shell.sidebar-collapsed .nav-link-item { justify-content: center; padding: 11px; }

.app-shell.sidebar-collapsed .sidebar:hover .nav-text,
.app-shell.sidebar-collapsed .sidebar:hover .nav-badge,
.app-shell.sidebar-collapsed .sidebar:hover .nav-caret { display: inline-flex; }
.app-shell.sidebar-collapsed .sidebar:hover .nav-sub { display: block; }
.app-shell.sidebar-collapsed .sidebar:hover .nav-link-item { justify-content: flex-start; padding: 10px 12px; }
.app-shell:not(.sidebar-collapsed) .nav-link-item { justify-content: flex-start; padding: 10px 12px; }


/* Footer sidebar */
.sidebar-footer {
    flex-shrink: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: 11.5px;
    color: #303F9F !important;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.app-shell.sidebar-collapsed .sidebar-footer { text-align: center; font-size: 0; }
.app-shell.sidebar-collapsed .sidebar-footer::after { content: "v1.0"; font-size: 10px; }
.app-shell.sidebar-collapsed .sidebar:hover .sidebar-footer { text-align: left; font-size: 11.5px; }
.app-shell.sidebar-collapsed .sidebar:hover .sidebar-footer::after { content: none; }

/* Sidebar light hiện đại: viền sáng, nền có chiều sâu, hover mở rõ nét */
.sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(15, 157, 79, .35), transparent);
    pointer-events: none;
}

.sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 0%, rgba(15, 157, 79, .08), transparent 34%),
                linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,252,249,.98));
    z-index: -1;
    pointer-events: none;
}

.app-shell:not(.sidebar-collapsed) .sidebar,
.app-shell.sidebar-collapsed .sidebar:hover {
    border-right-color: rgba(15, 157, 79, .28);
    transform: translateX(0);
}

.nav-link-item {
    border: 1px solid transparent;
}

.nav-link-item:hover {
    border-color: rgba(15, 157, 79, .14);
    box-shadow: 0 6px 16px rgba(15, 157, 79, .10);
    transform: translateX(2px);
}

.nav-link-item.active {
    border-color: rgba(15, 157, 79, .22);
    background: linear-gradient(90deg, #dff5e7 0%, #f5fbf7 100%);
}

.nav-link-item .nav-icon {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 157, 79, .08);
    color: var(--brand-700);
    transition: transform var(--transition), background var(--transition), color var(--transition);
}

.nav-link-item:hover .nav-icon,
.nav-link-item.active .nav-icon {
    background: var(--brand);
    color: #fff;
    transform: scale(1.06);
}

/* Submenu active nhẹ hơn menu chính để tránh 2 hiệu ứng bị trùng nhau */
.nav-sub .nav-link-item.active {
    background: rgba(15, 157, 79, .07);
    border-color: rgba(15, 157, 79, .12);
    border-left-color: rgba(15, 157, 79, .55);
    box-shadow: none;
    transform: none;
}

.nav-sub .nav-link-item.active .nav-icon {
    background: rgba(15, 157, 79, .12);
    color: var(--brand-700);
    transform: none;
}

.sidebar-backdrop {
    background: rgba(15, 23, 42, .22);
    backdrop-filter: blur(3px) saturate(1.05);
}

/* ---------- 5. Topbar ---------- */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 5px;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--shadow-sm);
}

.topbar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}
.topbar-toggle:hover { background: var(--bg-surface-2); color: var(--brand); }

/* Breadcrumb */
.breadcrumb-wrap { display: flex; flex-direction: column; min-width: 0; }
.breadcrumb-title { font-size: 16px; font-weight: 600; color: var(--text-main); line-height: 1.2; }
.breadcrumb-trail { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.breadcrumb-trail .sep { color: var(--text-faint); font-size: 10px; }

/* Search */
.topbar-search {
    margin-left: auto;
    position: relative;
    width: 280px;
    max-width: 32vw;
}
.topbar-search i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    font-size: 15px;
}
.topbar-search input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0 16px 0 38px;
    font-size: 13.5px;
    background: var(--bg-surface-2);
    color: var(--text-main);
    transition: border var(--transition), box-shadow var(--transition), background var(--transition);
    font-family: inherit;
}
.topbar-search input:focus {
    outline: none;
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px var(--brand-soft);
}

/* Nút icon trên topbar (chuông, công việc, fullscreen) */
.topbar-actions { display: flex; align-items: center; gap: 4px; }

/* ── ConnectionStatus indicator cạnh tiêu đề trang ── */
.conn-status {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-right: 9px;
    cursor: default;
}
.conn-status.conn-err { cursor: pointer; }

.conn-status-dot {
    width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
    transition: background .3s, box-shadow .3s;
}
.conn-ok  .conn-status-dot { background: #0f9d4f; box-shadow: 0 0 0 2px rgba(15,157,79,.12); }
.conn-warn .conn-status-dot { background: #ed8936; box-shadow: 0 0 0 2px rgba(237,137,54,.15); animation: conn-pulse 2s ease-in-out infinite; }
.conn-err .conn-status-dot { background: #e53e3e; box-shadow: 0 0 0 2px rgba(229,62,62,.15); animation: conn-pulse 2s ease-in-out infinite; }

.conn-status-label { display: none; } /* chỉ hiện dot, hover mới thấy tooltip */

@keyframes conn-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .45; }
}

.icon-btn {
    position: relative;
    background: none;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition);
}
.icon-btn:hover { background: var(--bg-surface-2); color: var(--brand); }

.icon-btn .count-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 17px;
    height: 17px;
    line-height: 17px;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--danger);
    border-radius: 9px;
    text-align: center;
    border: 2px solid var(--bg-surface);
}
.icon-btn .count-badge.warn { background: var(--warning); }

/* Online users topbar badge */
.onl-topbar-badge {
    position: absolute; top: 5px; right: 5px;
    min-width: 16px; height: 16px; line-height: 16px;
    padding: 0 4px; font-size: 9px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 8px; text-align: center;
    border: 2px solid #fff;
}
.onl-topbar-btn:hover .onl-topbar-badge { border-color: var(--bg-surface-2); }

.topbar-divider { width: 1px; height: 26px; background: var(--border); margin: 0 6px; }

/* ---------- 6. Avatar ---------- */
.avatar {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
    user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 34px; height: 34px; font-size: 13px; }
.avatar.md { width: 44px; height: 44px; font-size: 16px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }

/* ---------- 7. User menu (dropdown) ---------- */
.user-menu { position: relative; }

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: 1px solid transparent;
    border-radius: 24px;
    padding: 4px 10px 4px 4px;
    cursor: pointer;
    transition: background var(--transition), border var(--transition);
    font-family: inherit;
}
.user-menu-trigger:hover { background: var(--bg-surface-2); border-color: var(--border); }
.user-menu-trigger .u-name { font-size: 13.5px; font-weight: 600; color: var(--text-main); line-height: 1.1; }
.user-menu-trigger .u-role { font-size: 11px; color: var(--text-muted); }
.user-menu-trigger .u-meta { display: flex; flex-direction: column; text-align: left; }
.user-menu-trigger .chevron { font-size: 11px; color: var(--text-faint); transition: transform var(--transition); }
.user-menu.open .user-menu-trigger .chevron { transform: rotate(180deg); }

.user-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 1060;
}
.user-menu.open .user-menu-panel { opacity: 1; visibility: visible; transform: translateY(0); }

.user-menu-header {
    padding: 20px 18px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent-teal) 100%);
    color: #fff;
    text-align: center;
}
.user-menu-header .avatar { margin: 0 auto 10px; border: 3px solid rgba(255, 255, 255, .35); }
.user-menu-header .full-name { font-size: 15.5px; font-weight: 700; }
.user-menu-header .meta-line { font-size: 12px; opacity: .9; margin-top: 3px; }
.user-menu-header .meta-line i { margin-right: 5px; }

.user-menu-body { padding: 8px; }
.user-menu-action {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 13.5px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background var(--transition), color var(--transition);
}
.user-menu-action:hover { background: var(--brand-soft); color: var(--brand-700); }
.user-menu-action .icon-wrap { width: 20px; text-align: center; font-size: 15px; }
.user-menu-action.logout { color: var(--danger); }
.user-menu-action.logout:hover { background: var(--danger-soft); }

.user-menu-divider { height: 1px; background: var(--border); margin: 6px 4px; }

/* ---------- 8. Cards / panels (component tái sử dụng) ---------- */
.card-surface {
    border-radius: var(--radius);
}

/* Stat card (dashboard) */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}
.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.stat-icon.blue { background: var(--brand-soft); color: var(--brand); }
.stat-icon.teal { background: var(--accent-teal-soft); color: var(--accent-teal); }
.stat-icon.green { background: var(--success-soft); color: var(--success); }
.stat-icon.amber { background: var(--warning-soft); color: var(--warning); }
.stat-icon.red { background: var(--danger-soft); color: var(--danger); }
.stat-body { min-width: 0; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text-main); line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.stat-trend { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* Panel card (có header) */
.panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
    overflow: hidden;
}
.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-surface-2), var(--bg-surface));
}
.panel-header .panel-title { font-size: 15px; font-weight: 600; flex: 1; display: flex; align-items: center; gap: 9px; }
.panel-header .panel-title i { color: var(--brand); }
.panel-header .panel-actions { display: flex; align-items: center; gap: 8px; }
.panel-body { padding: 20px; }
.panel-body.no-pad { padding: 0; }

/* ---------- 9. Bảng dữ liệu ---------- */
.data-table, .grid-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead th, .grid-table thead th {
    text-align: left;
    padding: 0px 5px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .4px;
    white-space: nowrap;
}
.data-table tbody td, .grid-table tbody td { padding: 2px 5px; border-bottom: 1px solid var(--border); color: #000; }
.data-table tbody tr:last-child td, .grid-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr, .grid-table tbody tr { transition: background var(--transition), opacity var(--transition), filter var(--transition), transform var(--transition); }
.data-table tbody tr:hover, .grid-table tbody tr:hover { background: var(--brand-soft); }
/* ===== Row change effects ===== */
.data-table tbody tr.row-fx-delete, .grid-table tbody tr.row-fx-delete {
    position: relative;
    z-index: 2;
    pointer-events: none;
    animation: rowDeleteOut 1s ease forwards;
}
.data-table tbody tr.row-fx-delete td, .grid-table tbody tr.row-fx-delete td {
    animation: rowDeleteTd 1s ease forwards;
}
.data-table tbody tr.row-fx-update, .grid-table tbody tr.row-fx-update,
.data-table tbody tr.row-fx-insert, .grid-table tbody tr.row-fx-insert {
    position: relative;
    z-index: 4;
}
.data-table tbody tr.row-fx-update td, .grid-table tbody tr.row-fx-update td,
.data-table tbody tr.row-fx-insert td, .grid-table tbody tr.row-fx-insert td {
    position: relative;
    z-index: 1;
}
.data-table tbody tr.row-fx-update td, .grid-table tbody tr.row-fx-update td {
    animation: rowUpdateTd 2.6s ease forwards;
    box-shadow: inset 0 3px 0 #2563eb, inset 0 -3px 0 #2563eb;
}
.data-table tbody tr.row-fx-update td:first-child, .grid-table tbody tr.row-fx-update td:first-child {
    box-shadow: inset 3px 0 0 #2563eb, inset 0 3px 0 #2563eb, inset 0 -3px 0 #2563eb;
}
.data-table tbody tr.row-fx-update td:last-child, .grid-table tbody tr.row-fx-update td:last-child {
    box-shadow: inset -3px 0 0 #2563eb, inset 0 3px 0 #2563eb, inset 0 -3px 0 #2563eb;
}
.data-table tbody tr.row-fx-insert, .grid-table tbody tr.row-fx-insert {
    animation: rowInsertPop .6s cubic-bezier(.2,.9,.3,1.2) both;
}
.data-table tbody tr.row-fx-insert td, .grid-table tbody tr.row-fx-insert td {
    animation: rowInsertTd 2.6s ease forwards;
    box-shadow: inset 0 3px 0 #16a34a, inset 0 -3px 0 #16a34a;
}
.data-table tbody tr.row-fx-insert td:first-child, .grid-table tbody tr.row-fx-insert td:first-child {
    box-shadow: inset 3px 0 0 #16a34a, inset 0 3px 0 #16a34a, inset 0 -3px 0 #16a34a;
}
.data-table tbody tr.row-fx-insert td:last-child, .grid-table tbody tr.row-fx-insert td:last-child {
    box-shadow: inset -3px 0 0 #16a34a, inset 0 3px 0 #16a34a, inset 0 -3px 0 #16a34a;
}

/* DELETE */
@keyframes rowDeleteTd {
    0%   { background: #fee2e2 !important; }
    28%  { background: #fca5a5 !important; }
    70%  { background: #fee2e2 !important; opacity: .6; }
    100% { background: transparent !important; opacity: 0; }
}
@keyframes rowDeleteOut {
    0%   { opacity: 1; transform: translateX(0); }
    28%  { opacity: 1; transform: translateX(0); }
    70%  { opacity: .55; transform: translateX(16px) scaleY(.97); }
    100% { opacity: 0; transform: translateX(52px) scaleY(.92); }
}

/* UPDATE */
@keyframes rowUpdateTd {
    0%   { background: #dbeafe !important; box-shadow: inset 0 3px 0 #2563eb, inset 0 -3px 0 #2563eb; }
    10%  { background: #93c5fd !important; box-shadow: inset 0 3px 0 #2563eb, inset 0 -3px 0 #2563eb; }
    40%  { background: #dbeafe !important; box-shadow: inset 0 3px 0 rgba(37, 99, 235, .92), inset 0 -3px 0 rgba(37, 99, 235, .92); }
    75%  { background: #eff6ff !important; box-shadow: inset 0 3px 0 rgba(37, 99, 235, .45), inset 0 -3px 0 rgba(37, 99, 235, .45); }
    100% { background: transparent !important; box-shadow: none; }
}

/* INSERT */
@keyframes rowInsertPop {
    0%   { opacity: 0; transform: translateY(-20px) scaleY(.8); }
    55%  { opacity: 1; transform: translateY(3px) scaleY(1.04); }
    100% { opacity: 1; transform: translateY(0) scaleY(1); }
}
@keyframes rowInsertTd {
    0%   { background: #bbf7d0 !important; box-shadow: inset 0 3px 0 #16a34a, inset 0 -3px 0 #16a34a; }
    12%  { background: #4ade80 !important; box-shadow: inset 0 3px 0 #16a34a, inset 0 -3px 0 #16a34a; }
    40%  { background: #bbf7d0 !important; box-shadow: inset 0 3px 0 rgba(22, 163, 74, .92), inset 0 -3px 0 rgba(22, 163, 74, .92); }
    75%  { background: #f0fdf4 !important; box-shadow: inset 0 3px 0 rgba(22, 163, 74, .45), inset 0 -3px 0 rgba(22, 163, 74, .45); }
    100% { background: transparent !important; box-shadow: none; }
}
.data-table tbody tr.row-disabled td, .grid-table tbody tr.row-disabled td {
    color: #8b95a7;
    background: linear-gradient(180deg, #fbfcfd 0%, #f1f5f9 100%);
    text-decoration: line-through;
    text-decoration-thickness: 1.2px;
    text-decoration-color: rgba(100, 116, 139, .45);
}
.data-table tbody tr.row-disabled, .grid-table tbody tr.row-disabled {
    opacity: .58;
    filter: grayscale(1) saturate(0);
}
.data-table tbody tr.row-disabled:hover, .grid-table tbody tr.row-disabled:hover {
    background: #e9eef4;
}
.data-table tbody tr.row-disabled .status-badge, .grid-table tbody tr.row-disabled .status-badge {
    opacity: 1;
    background: #eef2f6;
    color: #7b8798;
    border: 1px solid #dbe3ec;
}
.data-table tbody tr.row-disabled .status-badge::before, .grid-table tbody tr.row-disabled .status-badge::before {
    background: #94a3b8;
}
.data-table tbody tr.row-disabled .cell-code-wrap,
.grid-table tbody tr.row-disabled .cell-code-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.data-table tbody tr.row-disabled .row-disabled-tag,
.grid-table tbody tr.row-disabled .row-disabled-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #6b7280;
    border: 1px solid #d1d5db;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2px;
    text-decoration: none;
}
.data-table tbody tr.row-disabled .sticky-action,
.data-table tbody tr.row-disabled .col-action,
.grid-table tbody tr.row-disabled .sticky-action,
.grid-table tbody tr.row-disabled .col-action {
    opacity: 1;
    filter: none;
    text-decoration: none;
}
.data-table tbody tr.row-disabled .row-actions,
.data-table tbody tr.row-disabled .row-action,
.grid-table tbody tr.row-disabled .row-actions,
.grid-table tbody tr.row-disabled .row-action {
    opacity: 1;
    filter: none;
    text-decoration: none;
}
.data-table tbody tr.row-disabled .row-action, .grid-table tbody tr.row-disabled .row-action {
    background: #fff;
}
.data-table .cell-strong, .grid-table .cell-strong { font-weight: 600; }
.data-table .cell-muted, .grid-table .cell-muted { color: var(--text-muted); }

/* Badge trạng thái */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    user-select:none;
}
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-badge.success { background: var(--success-soft); color: var(--success); }
.status-badge.warning { background: var(--warning-soft); color: #b45309; }
.status-badge.danger { background: var(--danger-soft); color: var(--danger); }
.status-badge.info { background: var(--info-soft); color: var(--info); }
.status-badge.neutral { background: var(--bg-surface-2); color: var(--text-muted); }

/* Check/Uncheck gọn cho cell bool? trong DataTable */
.bool-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 18px;
    height: 20px;
    padding: 0;
    border: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    user-select: none;
    vertical-align: middle;
    transition: color var(--transition), opacity var(--transition);
}
.bool-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: none;
}
.bool-check i { font-size: 16px; font-weight: 900; line-height: 1; }
.bool-check.checked {
    color: #15803d;
    background: transparent;
}
.bool-check.checked .bool-check-icon {
    color: #16a34a;
    background: transparent;
}
.bool-check.unchecked {
    color: #94a3b8;
    background: transparent;
}
.bool-check.unchecked .bool-check-icon {
    color: #94a3b8;
    background: transparent;
}
.data-table tbody tr.row-disabled .bool-check, .grid-table tbody tr.row-disabled .bool-check {
    opacity: .72;
}

/* ---------- 10. Nút ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    transition: background var(--transition), border var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
    color: #fff;
}
.btn-primary:hover { color: #fff; box-shadow: 0 8px 20px rgba(15, 157, 79, .34); }
.btn-outline {
    background: linear-gradient(180deg, #fff 0%, #f8fbf9 100%);
    color: var(--text-main);
    border-color: var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand-700); background: var(--brand-soft); box-shadow: 0 6px 14px rgba(15, 157, 79, .12); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-surface-2); color: var(--brand); }
.btn-block { width: 100%; }
.btn-lg { padding: 12px 20px; font-size: 15px; }

/* ---------- 11. Trang Login (TASACO - nhiều hiệu ứng động) ---------- */
.auth-check-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at top, rgba(15,157,79,.10), transparent 42%), linear-gradient(180deg, #f7fbf8 0%, #f3f6f5 100%);
}
.auth-check-card {
    min-width: 280px;
    max-width: 360px;
    padding: 24px 26px;
    border-radius: 20px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
    text-align: center;
}
.auth-check-card.compact {
    min-width: 220px;
    padding: 18px 20px;
    border-radius: 16px;
}
.auth-check-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 3px solid rgba(15,157,79,.14);
    border-top-color: var(--brand);
    animation: authSpin .8s linear infinite;
}
.auth-check-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}
.auth-check-text {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
}
@keyframes authSpin {
    to { transform: rotate(360deg); }
}
.auth-wrap {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #06351c 0%, #0a6e37 45%, #0f9d4f 100%);
    background-size: 200% 200%;
    animation: authGradient 16s ease infinite;
    position: relative;
    overflow: hidden;
}
@keyframes authGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Các khối tròn nổi trang trí (parallax mềm) */
.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
    opacity: .5;
    pointer-events: none;
    z-index: 0;
}
.auth-blob.b1 { width: 420px; height: 420px; top: -120px; left: -80px;
    background: radial-gradient(circle, rgba(15,157,79,.6), transparent 70%); animation: blobFloat 14s ease-in-out infinite; }
.auth-blob.b2 { width: 320px; height: 320px; bottom: -100px; left: 30%;
    background: radial-gradient(circle, rgba(225,38,47,.35), transparent 70%); animation: blobFloat 18s ease-in-out infinite reverse; }
.auth-blob.b3 { width: 260px; height: 260px; top: 20%; right: -60px;
    background: radial-gradient(circle, rgba(255,255,255,.25), transparent 70%); animation: blobFloat 12s ease-in-out infinite; }
@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.08); }
    66% { transform: translate(-30px, 25px) scale(.94); }
}

/* Lưới chấm động nhẹ phủ nền */
.auth-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: .35;
    z-index: 0;
    animation: gridPan 40s linear infinite;
}
@keyframes gridPan {
    from { background-position: 0 0; }
    to { background-position: 280px 280px; }
}

/* Xe tải chạy ngang dưới đáy panel trái */
.auth-truck {
    position: absolute;
    bottom: 34px;
    left: -80px;
    font-size: 42px;
    color: rgba(255, 255, 255, .9);
    z-index: 1;
    animation: truckDrive 9s linear infinite;
    text-shadow: 0 6px 14px rgba(0, 0, 0, .25);
}
@keyframes truckDrive {
    0% { transform: translateX(0); opacity: 0; }
    8% { opacity: 1; }
    92% { opacity: 1; }
    100% { transform: translateX(60vw); opacity: 0; }
}
.auth-road {
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 24px, transparent 24px 48px);
    z-index: 0;
    animation: roadMove 1.2s linear infinite;
}
@keyframes roadMove {
    from { background-position: 0 0; }
    to { background-position: -48px 0; }
}

.auth-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: #fff;
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.auth-side .auth-side-inner { position: relative; z-index: 2; max-width: 520px; animation: fadeUp .8s ease both; }
.auth-side .auth-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; letter-spacing: .3px;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(4px);
    padding: 8px 14px; border-radius: 20px;
    margin-bottom: 22px;
    animation: fadeUp .7s ease both;
}
.auth-side .auth-eyebrow i { color: #ffd84d; }
.auth-side h1 { font-size: 38px; font-weight: 800; line-height: 1.18; margin-bottom: 16px; }
.auth-side h1 .hl { color: #ffd84d; }
.auth-side .slogan { font-size: 15.5px; opacity: .9; line-height: 1.7; max-width: 460px; }

/* Danh sách module phần mềm (all-in-one) */
.auth-modules {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.auth-module {
    display: flex; gap: 13px; align-items: flex-start;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 14px;
    padding: 15px 16px;
    animation: fadeUp .7s ease both;
    transition: transform var(--transition), background var(--transition);
}
.auth-module:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .16); }
.auth-module:nth-child(1) { animation-delay: .15s; }
.auth-module:nth-child(2) { animation-delay: .28s; }
.auth-module:nth-child(3) { animation-delay: .41s; }
.auth-module:nth-child(4) { animation-delay: .54s; }
.auth-module .am-icon {
    width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    background: rgba(255, 255, 255, .9); color: var(--brand);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.auth-module .am-icon.teal { color: var(--accent-teal); }
.auth-module .am-icon.amber { color: #d97706; }
.auth-module .am-icon.red { color: var(--brand-red); }
.auth-module .am-text .am-title { font-size: 14.5px; font-weight: 700; margin-bottom: 3px; }
.auth-module .am-text .am-desc { font-size: 12.5px; opacity: .82; line-height: 1.5; }

.auth-panel {
    width: 520px;
    max-width: 100%;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 44px;
    position: relative;
    z-index: 2;
    box-shadow: -20px 0 60px rgba(0, 0, 0, .2);
    animation: panelSlide .7s cubic-bezier(.4,0,.2,1) both;
}
.auth-panel .auth-card {
    width: 100%;
    max-width: 396px;
    margin: 0 auto;
    padding: 28px 28px 24px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(248,252,249,.96) 100%);
    border: 1px solid rgba(15,23,42,.06);
    box-shadow: 0 20px 48px rgba(15, 23, 42, .10), 0 8px 22px rgba(15, 157, 79, .08);
}
@keyframes panelSlide {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeUp {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeRight {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes logoPop {
    0% { transform: scale(.6) rotate(-6deg); opacity: 0; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.auth-card-header { text-align: center; margin-bottom: 28px; }
.auth-card-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(15,157,79,.12), rgba(29,191,115,.18));
    color: var(--brand-700);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.auth-card-header .login-logo {
    width: 92px; height: 92px; border-radius: 24px;
    background: linear-gradient(180deg, #fff 0%, #f8fcf9 100%);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 16px; padding: 10px;
    box-shadow: 0 18px 36px rgba(15, 157, 79, .22);
    border: 1px solid rgba(15,23,42,.06);
    animation: logoPulse 3.2s ease-in-out infinite;
}
.auth-card-header .login-logo img { width: 100%; height: auto; }
@keyframes logoPulse {
    0%, 100% { box-shadow: 0 16px 34px rgba(15, 157, 79, .18); }
    50% { box-shadow: 0 22px 44px rgba(15, 157, 79, .28); }
}
.auth-card-header h2 { font-size: 28px; margin-bottom: 8px; color: #0f172a; letter-spacing: -.02em; }
.auth-card-header p { color: var(--text-muted); font-size: 14px; line-height: 1.6; max-width: 320px; margin: 0 auto; }

.form-group { margin-bottom: 14px; animation: fadeUp .6s ease both; }
.form-group.d1 { animation-delay: .1s; }
.form-group.d2 { animation-delay: .2s; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: #333; margin-bottom: 7px; }
.form-control {
    width: 100%;
    height: 46px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--text-main);
    background: linear-gradient(180deg, #fff 0%, var(--bg-surface-2) 100%);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    font-family: inherit;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04);
    transition: border var(--transition), box-shadow var(--transition), background var(--transition), transform var(--transition);
}
.form-control:hover { border-color: #b9dec6; box-shadow: 0 2px 8px rgba(15, 157, 79, .07); }
.form-control:focus {
    outline: none;
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px var(--brand-soft), 0 8px 18px rgba(15, 157, 79, .12);
}
.input-icon-wrap { position: relative; }
.input-icon-wrap .input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-faint); font-size: 16px; transition: color var(--transition);
}
.input-icon-wrap:focus-within .input-icon { color: var(--brand); }
.input-icon-wrap .form-control { padding-left: 42px; }
.input-icon-wrap .toggle-pass {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 16px;
}
.input-icon-wrap .toggle-pass:hover { color: var(--brand); }

.form-row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font-size: 13px; gap: 12px; }
.check-inline { display: flex; align-items: center; gap: 7px; color: var(--text-muted); cursor: pointer; }
.check-inline input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.auth-help-text { display: inline-flex; align-items: center; gap: 6px; color: #64748b; font-size: 12px; white-space: nowrap; }
.auth-help-text i { color: var(--brand); }

/* Nút đăng nhập có hiệu ứng quét sáng */
.btn-login {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    margin-top: 4px;
    min-height: 48px;
    background: linear-gradient(135deg, #0f9d4f 0%, #18b05c 55%, #18b38e 100%);
    box-shadow: 0 12px 28px rgba(15, 157, 79, .30);
}
.btn-login:hover { box-shadow: 0 14px 34px rgba(15, 157, 79, .38); }
.btn-login::after {
    content: "";
    position: absolute;
    top: 0; left: -120%;
    width: 80%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.4), transparent);
    transform: skewX(-20deg);
    transition: left .6s ease;
}
.btn-login:hover::after { left: 130%; }
.btn-login .spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-error {
    background: var(--brand-red-soft);
    color: var(--brand-red-600);
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 9px;
    animation: shake .4s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
.auth-hint {
    background: var(--brand-soft);
    color: var(--brand-700);
    padding: 9px 13px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    margin-bottom: 18px;
    display: flex; align-items: center; gap: 8px;
}
.auth-footer { text-align: center; margin-top: 22px; font-size: 12.5px; color: #94a3b8; }

/* Glass login layout mới */
.auth-wrap.auth-wrap-glass {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px;
    position: relative;
    overflow: hidden;
}
.auth-stage {
    width: min(1380px, 100%);
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(420px, 520px) minmax(240px, .9fr);
    gap: 28px;
    align-items: center;
    position: relative;
    z-index: 2;
}
.glass-panel,
.glass-card {
    background: linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.08) 100%);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 20px 60px rgba(2, 8, 23, .18);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.glass-panel {
    border-radius: 28px;
    padding: 24px;
}
.glass-panel.soft {
    padding: 28px 30px;
}
.glass-panel.mini {
    padding: 18px 18px;
}
.glass-card.main-login-card {
    border-radius: 30px;
    padding: 30px 30px 24px;
    background: linear-gradient(180deg, rgba(255,255,255,.76) 0%, rgba(248,252,249,.62) 100%);
    border: 1px solid rgba(255,255,255,.34);
    box-shadow: 0 24px 70px rgba(2, 8, 23, .24), inset 0 1px 0 rgba(255,255,255,.35);
}
.auth-side.auth-side-left,
.auth-side.auth-side-right {
    padding: 0;
    justify-content: center;
    gap: 18px;
    color: #fff;
}
.auth-side.auth-side-left .auth-side-inner { max-width: none; }
.auth-side.auth-side-left .auth-eyebrow {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.10);
    margin-bottom: 18px;
}
.auth-side.auth-side-left h1 { font-size: 40px; margin-bottom: 14px; }
.auth-side.auth-side-left .slogan { max-width: none; font-size: 15px; }
.auth-module-stack {
    display: grid;
    gap: 14px;
}
.auth-module.glass-panel {
    background: linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.09) 100%);
    border: 1px solid rgba(255,255,255,.14);
}
.auth-panel.auth-panel-center {
    width: 100%;
    max-width: 520px;
    background: transparent;
    box-shadow: none;
    padding: 0;
}
.auth-panel.auth-panel-center .auth-card { max-width: none; }
.auth-stat-panel,
.auth-quote-panel {
    color: #fff;
}
.auth-stat-head {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    opacity: .82;
    margin-bottom: 16px;
}
.auth-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.auth-stat-item {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
}
.auth-stat-item.wide {
    grid-column: 1 / -1;
}
.auth-stat-item strong {
    display: block;
    font-size: 22px;
    margin-bottom: 6px;
    color: #fff;
}
.auth-stat-item span,
.quote-text {
    font-size: 13px;
    line-height: 1.65;
    opacity: .9;
}
.quote-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    background: rgba(255,255,255,.12);
    font-size: 18px;
    color: #ffe082;
}
.auth-check-screen {
    background: radial-gradient(circle at top, rgba(15,157,79,.16), transparent 40%), linear-gradient(135deg, #06351c 0%, #0a6e37 45%, #0f9d4f 100%);
}
.auth-check-card {
    background: linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(244,249,246,.58) 100%);
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 20px 60px rgba(2, 8, 23, .18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
@media (max-width: 1180px) {
    .auth-stage {
        grid-template-columns: 1fr;
        max-width: 760px;
    }
    .auth-side.auth-side-left,
    .auth-side.auth-side-right {
        order: 2;
    }
    .auth-panel.auth-panel-center {
        order: 1;
        max-width: none;
    }
    .auth-side.auth-side-left h1 {
        font-size: 34px;
    }
}
@media (max-width: 680px) {
    .auth-wrap.auth-wrap-glass {
        padding: 18px;
    }
    .auth-stage {
        gap: 18px;
    }
    .glass-card.main-login-card,
    .glass-panel,
    .glass-panel.soft {
        padding: 22px 18px;
        border-radius: 24px;
    }
    .auth-side.auth-side-left h1 {
        font-size: 30px;
    }
    .auth-stat-grid {
        grid-template-columns: 1fr;
    }
}

/* Glass login layout - phiên bản card trắng trung tâm, nội dung ngoài card trong suốt */
.auth-wrap.auth-wrap-glass {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    position: relative;
    overflow: hidden;
}
.auth-scene-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.auth-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(26px);
    opacity: .7;
    pointer-events: none;
    z-index: 0;
}
.auth-light-1 {
    width: 360px;
    height: 360px;
    top: 8%;
    left: 18%;
    background: radial-gradient(circle, rgba(255,255,255,.20), transparent 68%);
}
.auth-light-2 {
    width: 420px;
    height: 420px;
    right: 10%;
    bottom: 10%;
    background: radial-gradient(circle, rgba(255,216,77,.16), transparent 70%);
}

.auth-stage {
    width: min(1280px, 100%);
    display: grid;
    grid-template-columns: minmax(230px, .95fr) minmax(390px, 470px) minmax(220px, .95fr);
    gap: 26px;
    align-items: center;
    position: relative;
    z-index: 2;
}
.auth-side.auth-side-left,
.auth-side.auth-side-right {
    padding: 0;
    color: #fff;
    justify-content: center;
    gap: 18px;
}
.auth-side-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.auth-side.auth-side-left .auth-eyebrow {
    background: transparent;
    border: 1px solid rgba(255,255,255,.16);
    margin-bottom: 6px;
}
.auth-side.auth-side-left h1 {
    font-size: 36px;
    margin-bottom: 8px;
}
.auth-side.auth-side-left .slogan {
    max-width: 420px;
    font-size: 14px;
}
.auth-module-stack {
    display: grid;
    gap: 12px;
    margin-top: 2px;
}
.auth-module.auth-module-plain {
    background: transparent;
    border: 0;
    padding: 0;
    gap: 14px;
    backdrop-filter: none;
    box-shadow: none;
}
.auth-module.auth-module-plain:hover {
    transform: none;
    background: transparent;
}
.auth-module.auth-module-plain .am-icon {
    background: rgba(255,255,255,.92);
}
.auth-panel.auth-panel-center {
    width: 100%;
    max-width: 520px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}
.white-login-card {
    width: 100%;
    max-width: 396px;
    margin: 0 auto;
    padding: 28px 26px 22px;
    border-radius: 28px;
    background: rgba(255,255,255,.98);
    border: 0;
    box-shadow: 0 22px 60px rgba(2, 8, 23, .14);
}
.login-logo.login-logo-plain {
    width: 96px;
    height: 96px;
    margin: 0 auto 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    animation: none;
}
.login-logo.login-logo-plain img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
.auth-card-header h2 {
    font-size: 26px;
    margin-bottom: 8px;
    color: #0f172a;
    letter-spacing: -.03em;
}
.auth-card-header p {
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
}
.form-label {
    color: #1e293b;
    font-weight: 600;
}
.form-control {
    color: #0f172a;
    background: #fff;
    border-color: #dbe3ea;
}
.form-control::placeholder {
    color: #94a3b8;
}
.auth-help-text {
    color: #475569;
}
.auth-help-text i {
    color: var(--brand);
}
.auth-footer {
    color: #94a3b8;
}
.auth-side-content-right {
    align-items: flex-start;
}
.auth-stat-grid.auth-stat-grid-plain {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}
.auth-stat-item.plain {
    padding: 0;
    background: transparent;
    border: 0;
}
.auth-stat-item.plain strong {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
    color: #fff;
}
.auth-stat-item.plain span,
.auth-quote-inline .quote-text {
    font-size: 13px;
    line-height: 1.65;
    opacity: .9;
}
.auth-quote-inline {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 8px;
}
.auth-quote-inline .quote-icon {
    width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    color: #ffe082;
    flex-shrink: 0;
}
.auth-road {
    position: absolute;
    bottom: 34px;
    left: 0;
    right: 72px;
    height: 3px;
    background: repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 24px, transparent 24px 48px);
    z-index: 0;
    animation: roadMove 1.2s linear infinite;
}
.auth-warehouse {
    position: absolute;
    right: 0;
    bottom: 12px;
    width: 74px;
    height: 74px;
    border-radius: 18px 18px 10px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 16px 32px rgba(0,0,0,.16);
}
.auth-truck {
    position: absolute;
    bottom: 30px;
    left: -80px;
    font-size: 42px;
    color: rgba(255,255,255,.95);
    z-index: 1;
    animation: truckDriveToWarehouse 9s linear infinite;
    text-shadow: 0 6px 14px rgba(0, 0, 0, .25);
}
@keyframes truckDriveToWarehouse {
    0% { transform: translateX(0); opacity: 0; }
    8% { opacity: 1; }
    82% { opacity: 1; }
    100% { transform: translateX(calc(100vw - 180px)); opacity: 0; }
}
.auth-check-screen {
    background: radial-gradient(circle at top, rgba(15,157,79,.16), transparent 40%), linear-gradient(135deg, #06351c 0%, #0a6e37 45%, #0f9d4f 100%);
}
.auth-check-card {
    background: linear-gradient(180deg, rgba(255,255,255,.94) 0%, rgba(248,250,252,.90) 100%);
    border: 1px solid rgba(255,255,255,.24);
    box-shadow: 0 20px 60px rgba(2, 8, 23, .18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
@media (max-width: 1180px) {
    .auth-stage {
        grid-template-columns: 1fr;
        max-width: 760px;
        gap: 24px;
    }
    .auth-side.auth-side-left,
    .auth-side.auth-side-right {
        order: 2;
    }
    .auth-panel.auth-panel-center {
        order: 1;
        max-width: none;
    }
    .auth-side.auth-side-left h1 {
        font-size: 34px;
    }
    .auth-road,
    .auth-warehouse,
    .auth-truck {
        display: none;
    }
}
@media (max-width: 680px) {
    .auth-wrap.auth-wrap-glass {
        padding: 18px;
    }
    .white-login-card {
        padding: 26px 20px 22px;
        border-radius: 26px;
    }
    .login-logo.login-logo-plain {
        width: 96px;
        height: 96px;
    }
    .auth-card-header h2 {
        font-size: 26px;
    }
    .auth-side.auth-side-left h1 {
        font-size: 30px;
    }
    .auth-stat-grid.auth-stat-grid-plain {
        grid-template-columns: 1fr;
    }
}

/* Auth login polish theo yêu cầu: card gọn, nền nhiều đốm sáng, xe tải dọc chạy ngang */
.auth-wrap.auth-wrap-glass,
.auth-wrap.auth-wrap-glass *:not(input):not(textarea) {
    user-select: none;
    -webkit-user-select: none;
}

.auth-wrap.auth-wrap-glass {
    padding: 24px 30px 72px;
    background:
        radial-gradient(circle at 12% 18%, rgba(255,255,255,.18), transparent 28%),
        radial-gradient(circle at 88% 74%, rgba(255,216,77,.18), transparent 30%),
        linear-gradient(135deg, #052d18 0%, #08703a 48%, #10a656 100%);
}

.auth-wrap.auth-wrap-glass::after {
    content: "";
    position: absolute;
    inset: -18%;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.34) 0 2px, transparent 3px),
        radial-gradient(circle, rgba(255,216,77,.28) 0 1.5px, transparent 3px),
        linear-gradient(115deg, transparent 0 42%, rgba(255,255,255,.09) 43%, transparent 46% 100%);
    background-size: 92px 92px, 138px 138px, 260px 260px;
    animation: authSparkPan 26s linear infinite;
    opacity: .78;
}

.auth-light-1 { animation: authLightFloatA 12s ease-in-out infinite; }
.auth-light-2 { animation: authLightFloatB 14s ease-in-out infinite; }
.auth-light-3 {
    width: 300px;
    height: 300px;
    left: 56%;
    top: 12%;
    background: radial-gradient(circle, rgba(73,222,128,.18), transparent 68%);
    animation: authLightFloatC 11s ease-in-out infinite;
}

.auth-orbit {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    pointer-events: none;
    z-index: 0;
}

.auth-orbit::before,
.auth-orbit::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.84);
    box-shadow: 0 0 18px rgba(255,255,255,.7);
}

.auth-orbit-1 {
    width: 220px;
    height: 220px;
    left: 7%;
    bottom: 13%;
    animation: authOrbitSpin 18s linear infinite;
}

.auth-orbit-2 {
    width: 300px;
    height: 300px;
    right: 6%;
    top: 8%;
    animation: authOrbitSpin 24s linear infinite reverse;
}

.auth-orbit-1::before { top: 18px; left: 40px; }
.auth-orbit-1::after { right: 26px; bottom: 48px; }
.auth-orbit-2::before { top: 48px; right: 32px; }
.auth-orbit-2::after { left: 54px; bottom: 34px; }

.auth-stage {
    width: min(1220px, 100%);
    grid-template-columns: minmax(220px, .9fr) minmax(360px, 430px) minmax(210px, .8fr);
    gap: 22px;
}

.white-login-card.compact-login-card {
    max-width: 374px;
    padding: 22px 22px 18px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 24px 72px rgba(2, 8, 23, .20),
        0 0 0 1px rgba(255,255,255,.72),
        inset 0 1px 0 rgba(255,255,255,.92);
}

.white-login-card.compact-login-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(15,157,79,.52), rgba(255,255,255,.4), rgba(225,38,47,.32));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.white-login-card.compact-login-card::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    right: -60px;
    top: -70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15,157,79,.15), transparent 68%);
    pointer-events: none;
}

.compact-header { margin-bottom: 18px; }

.login-brand-row {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.auth-card-header .login-logo.login-logo-plain.login-logo-large {
    width: 112px;
    height: 88px;
    margin: 0;
    flex: 0 0 112px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-brand-copy { min-width: 0; }

.auth-card-header .login-brand-copy h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 21px;
    line-height: 1.15;
    margin-bottom: 6px;
}

.auth-card-header .login-brand-copy h2 i {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), #16c784);
    box-shadow: 0 8px 18px rgba(15,157,79,.26);
    flex-shrink: 0;
}

.auth-card-header .login-brand-copy p {
    max-width: none;
    margin: 0;
    font-size: 12.4px;
    line-height: 1.45;
}

.form-group { margin-bottom: 11px; }

.form-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    font-size: 12.6px;
}

.form-label i {
    color: var(--brand);
    font-size: 14px;
}

.form-control { height: 42px; border-radius: 12px; }
.input-icon-wrap .input-icon { width: 18px; text-align: center; }
.form-row-between { margin-bottom: 14px; }
.btn-login { min-height: 44px; border-radius: 13px; }
.auth-footer { margin-top: 16px; font-size: 12px; }

.auth-motion-layer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 96px;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.auth-road {
    bottom: 34px;
    right: 0;
    height: 4px;
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,.65) 0 34px, transparent 34px 68px),
        linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
}

.auth-warehouse { bottom: 18px; right: 28px; }

.auth-truck,
.auth-truck-vertical {
    position: absolute;
    left: -110px;
    bottom: 26px;
    width: 78px;
    height: 44px;
    z-index: 2;
    animation: truckVerticalDrive 8.5s linear infinite;
}

.auth-truck-vertical .truck-body,
.auth-truck-vertical .truck-cabin,
.auth-truck-vertical .truck-wheel,
.auth-truck-vertical .truck-light {
    position: absolute;
    display: block;
}

.auth-truck-vertical .truck-body {
    left: 0;
    top: 8px;
    width: 44px;
    height: 26px;
    border-radius: 7px 5px 5px 7px;
    background: linear-gradient(180deg, #ffffff 0%, #dff8ea 100%);
    box-shadow: inset 0 -4px 0 rgba(15,157,79,.16), 0 10px 18px rgba(2,8,23,.24);
}

.auth-truck-vertical .truck-cabin {
    right: 2px;
    top: 13px;
    width: 30px;
    height: 21px;
    border-radius: 5px 12px 7px 4px;
    background: linear-gradient(135deg, #16a34a, #0f9d4f);
    box-shadow: inset -8px 0 0 rgba(255,255,255,.18), 0 10px 18px rgba(2,8,23,.22);
}

.auth-truck-vertical .truck-light-front {
    right: 0;
    top: 21px;
    width: 5px;
    height: 8px;
    border-radius: 999px;
    background: #ffe082;
    box-shadow: 12px 0 24px rgba(255,224,130,.75);
}

.auth-truck-vertical .truck-wheel {
    bottom: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #0f172a;
    border: 3px solid rgba(255,255,255,.82);
    animation: truckWheelSpin .45s linear infinite;
}

.auth-truck-vertical .truck-wheel-a { left: 12px; }
.auth-truck-vertical .truck-wheel-b { right: 10px; }

@keyframes authSparkPan {
    from { transform: translate3d(0, 0, 0); background-position: 0 0, 0 0, 0 0; }
    to { transform: translate3d(5%, -4%, 0); background-position: 368px 184px, -276px 276px, 520px 260px; }
}

@keyframes authLightFloatA {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(46px, -24px, 0) scale(1.08); }
}

@keyframes authLightFloatB {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-42px, 28px, 0) scale(1.1); }
}

@keyframes authLightFloatC {
    0%, 100% { transform: translate3d(0, 0, 0) scale(.95); }
    50% { transform: translate3d(24px, 34px, 0) scale(1.12); }
}

@keyframes authOrbitSpin { to { transform: rotate(360deg); } }

@keyframes truckVerticalDrive {
    0% { transform: translateX(0) translateY(0); opacity: 0; }
    8% { opacity: 1; }
    48% { transform: translateX(calc(52vw - 40px)) translateY(-3px); opacity: 1; }
    88% { opacity: 1; }
    100% { transform: translateX(calc(100vw + 140px)) translateY(0); opacity: 0; }
}

@keyframes truckWheelSpin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
    .auth-motion-layer { display: none; }
}

@media (max-width: 680px) {
    .login-brand-row { align-items: flex-start; }
    .auth-card-header .login-logo.login-logo-plain.login-logo-large {
        width: 94px;
        height: 74px;
        flex-basis: 94px;
    }
    .auth-card-header .login-brand-copy h2 { font-size: 19px; }
}

/* ---------- 12. Welcome / dashboard phụ ---------- */
.welcome-banner {
    background: linear-gradient(120deg, #ffffff 0%, var(--brand-soft) 60%, var(--accent-teal-soft) 100%);
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius-lg);
    padding: 26px 30px;
    color: var(--text-main);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.welcome-banner::after {
    content: "\F4D7"; /* bi-truck (chỉ trang trí qua ::after dùng font bootstrap-icons) */
    font-family: "bootstrap-icons";
    position: absolute;
    right: 24px;
    bottom: -24px;
    font-size: 150px;
    color: var(--brand);
    opacity: .08;
}
.welcome-banner .wb-text { flex: 1; z-index: 1; }
.welcome-banner h2 { font-size: 23px; margin-bottom: 8px; color: var(--text-main); }
.welcome-banner p { font-size: 14.5px; color: var(--text-muted); }
.welcome-banner p strong { color: var(--brand-700); }
.welcome-banner .btn-outline { background: #fff; }

/* Lưới 2 cột dashboard */
.dash-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 22px;
}
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }

/* Activity list */
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
}
.activity-body { flex: 1; min-width: 0; }
.activity-body .act-title { font-size: 13.5px; font-weight: 500; }
.activity-body .act-time { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* Lưới dịch vụ / truy cập nhanh */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.service-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.service-card .svc-icon {
    width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
    background: var(--brand-soft); color: var(--brand);
}
.service-card .svc-icon.red { background: var(--brand-red-soft); color: var(--brand-red); }
.service-card .svc-icon.amber { background: var(--warning-soft); color: var(--warning); }
.service-card .svc-icon.teal { background: var(--accent-teal-soft); color: var(--accent-teal); }
.service-card .svc-body .svc-title { font-size: 14px; font-weight: 600; }
.service-card .svc-body .svc-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Thanh tiến độ tuyến/kho */
.progress-row { margin-bottom: 16px; }
.progress-row:last-child { margin-bottom: 0; }
.progress-row .pr-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.progress-row .pr-head .pr-name { font-weight: 500; }
.progress-row .pr-head .pr-val { color: var(--text-muted); font-weight: 600; }
.progress-bar {
    height: 8px; border-radius: 6px; background: var(--bg-surface-2); overflow: hidden;
}
.progress-bar > span {
    display: block; height: 100%; border-radius: 6px;
    background: linear-gradient(90deg, var(--brand), var(--accent-teal));
    transition: width .8s ease;
}
.progress-bar > span.red { background: linear-gradient(90deg, var(--brand-red), #f0644c); }
.progress-bar > span.amber { background: linear-gradient(90deg, var(--warning), #fbbf24); }

/* ---------- 16. Trang mẫu bảng dữ liệu lớn ---------- */
.page-view {
    height: calc(100vh - var(--topbar-h));
    min-height: 520px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    overflow: hidden;
}
.app-shell.sidebar-collapsed .sidebar:hover .nav-link-item:hover::after { display: none; }

.page-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 3px 5px;
    border-radius: 0;
}

.page-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
}

.page-toolbar .btn {
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    user-select:none;
}

.toolbar-search {
    position: relative;
    width: min(340px, 36vw);
}

.toolbar-search i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
}

.toolbar-search input {
    width: 100%;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 34px 0 38px;
    background: linear-gradient(180deg, #fff 0%, var(--bg-surface-2) 100%);
    color: var(--text-main);
    outline: none;
    font-family: inherit;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .04);
    transition: border var(--transition), box-shadow var(--transition), background var(--transition);
}
.toolbar-search input:hover { border-color: #b9dec6; box-shadow: 0 2px 8px rgba(15, 157, 79, .07); }

.toolbar-search input:focus {
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.toolbar-search-clear {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: rgba(100, 116, 139, .1);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

.toolbar-search-clear i {
    position: static;
    transform: none;
    font-size: 10px;
    color: currentColor;
}

.toolbar-search-clear:hover {
    background: var(--brand-soft);
    color: var(--brand-700);
    transform: translateY(-50%) scale(1.04);
}

.btn-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-red);
    margin-left: 2px;
}

.page-filter {
    flex-shrink: 0;
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 0;
}

.page-filter .form-group { margin-bottom: 0; min-width: 190px; }
.page-filter .form-label { margin-bottom: 4px; font-size: 12px; }
.page-filter .form-control { height: 34px; border-radius: 8px; font-size: 13px; }
.page-filter .btn { height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13px; }

.data-grid {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0;
    border-top: 1px solid rgba(15, 23, 42, .18);
}

.table-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    position: relative;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.grid-table {
    min-width: 3000px !important;
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12.5px;
}

.grid-table th,
.grid-table td {
    height:35px;
    padding:0px 5px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size:12px;
    background: #fff;
    vertical-align: middle;
    text-align:left;
    color:#000000;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

    .grid-table th {
        position: sticky;
        top: 0;
        z-index: 5;
        font-size: 12px;
        font-weight: 500;
        font-size: 12px;
        border-bottom-color: rgba(0, 0, 0, .12);
        border-right-color: rgba(255, 255, 255, .18);
        box-shadow: 0 1px 0 rgba(10, 110, 55, .35), 0 5px 1px rgba(15, 157, 79, .16) !important;
    }

.grid-table th i {
    margin-right: 5px;
    color: rgba(255, 255, 255, .88);
    font-size: 13px;
}

.grid-table tbody tr:hover td {
    background: linear-gradient(180deg, #f0fbf4 0%, #e8f8ef 100%);
    color: #10291b;
    box-shadow: inset 0 1px 0 rgba(15, 157, 79, .12), inset 0 -1px 0 rgba(15, 157, 79, .12);
}

.grid-table tbody tr.row-fx-update:hover td {
    box-shadow: inset 0 3px 0 #2563eb, inset 0 -3px 0 #2563eb;
}

.grid-table tbody tr.row-fx-update:hover td:first-child {
    box-shadow: inset 3px 0 0 #2563eb, inset 0 3px 0 #2563eb, inset 0 -3px 0 #2563eb;
}

.grid-table tbody tr.row-fx-update:hover td:last-child {
    box-shadow: inset -3px 0 0 #2563eb, inset 0 3px 0 #2563eb, inset 0 -3px 0 #2563eb;
}

.grid-table tbody tr.row-fx-insert:hover td {
    box-shadow: inset 0 3px 0 #16a34a, inset 0 -3px 0 #16a34a;
}

.grid-table tbody tr.row-fx-insert:hover td:first-child {
    box-shadow: inset 3px 0 0 #16a34a, inset 0 3px 0 #16a34a, inset 0 -3px 0 #16a34a;
}

.grid-table tbody tr.row-fx-insert:hover td:last-child {
    box-shadow: inset -3px 0 0 #16a34a, inset 0 3px 0 #16a34a, inset 0 -3px 0 #16a34a;
}

.grid-table tbody tr:hover .cell-name,
.grid-table tbody tr:hover .cell-strong { color: var(--brand-700); }

.grid-table .sticky-col {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
    box-shadow: 1px 0 0 var(--border), 8px 0 12px rgba(15, 23, 42, .04);
}

.grid-table .sticky-col-sl {
    position: sticky;
    z-index: 6;
    background: #fff;
    box-shadow: 1px 0 0 var(--border), 4px 0 8px rgba(15, 23, 42, .04);
}

.grid-table th.sticky-col-sl {
    position: sticky;
    z-index: 12;
}

.grid-table tbody tr.row-fx-update .sticky-col,
.grid-table tbody tr.row-fx-insert .sticky-col {
    z-index: 5;
}

.grid-table th.sticky-col {
    z-index: 7;
    background: linear-gradient(180deg, var(--brand-600) 0%, var(--brand-700) 100%);
}

.grid-table .sticky-action {
    position: sticky;
    right: 0;
    z-index: 3;
    background: #fff;
    box-shadow: -1px 0 0 var(--border), -8px 0 12px rgba(15, 23, 42, .04);
}

.grid-table tbody tr.row-fx-update .sticky-action,
.grid-table tbody tr.row-fx-insert .sticky-action {
    z-index: 5;
}

.grid-table th.sticky-action {
    z-index: 8;
    background: linear-gradient(180deg, var(--brand-600) 0%, var(--brand-700) 100%);
}

.grid-table tbody tr:hover .sticky-col,
.grid-table tbody tr:hover .sticky-action {
    background: linear-gradient(180deg, #f0fbf4 0%, #e8f8ef 100%);
}

.grid-table tbody tr:hover .sticky-col {
    background: linear-gradient(180deg, #e3f7eb 0%, #d6f1df 100%);
    box-shadow: inset 3px 0 0 var(--brand), 1px 0 0 var(--border), 8px 0 12px rgba(15, 23, 42, .06);
}

.grid-table .col-code { min-width: 96px; width: 96px; }
.grid-table .col-action { min-width: 96px; width: 96px; max-width: 96px; padding-left: 5px; padding-right: 5px; }
    .grid-table .col-action.icon-only {
        min-width: 45px;
        width: 45px;
        max-width: 45px;
        padding-left: 5px;
        padding-right: 5px;
    }
.grid-table .cell-name { min-width: 230px; font-weight: 600; color: var(--text-main); }
.grid-table .text-right { text-align: right; }

.grid-empty-row td {
    height: 360px;
    padding: 0;
    border-right: 0;
    background: linear-gradient(180deg, #fff 0%, #fbfefc 100%);
}

.grid-table tbody tr.grid-empty-row:hover td {
    background: linear-gradient(180deg, #fff 0%, #fbfefc 100%);
    box-shadow: none;
}

.table-empty-state {
    min-height: 320px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 42px 24px;
    color: var(--text-muted);
    text-align: center;
    background: radial-gradient(circle at 50% 38%, rgba(15, 157, 79, .09), transparent 34%), linear-gradient(180deg, rgba(255, 255, 255, .76), rgba(248, 252, 250, .92));

}

.table-scroll > .table-empty-state {
    position: sticky;
    left: 0;
    width: 100%;
    min-width: 100%;
    min-height: calc(100% - 34px);
    margin-top: -1px;
    pointer-events: none;
    z-index: 8;
}

.table-empty-icon {
    position: relative;
    width: 62px;
    height: 62px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-700);
    background: linear-gradient(180deg, #f0fbf4, #e4f7eb);
    border: 1px solid rgba(15, 157, 79, .16);
    box-shadow: 0 16px 36px rgba(15, 157, 79, .12), inset 0 1px 0 rgba(255, 255, 255, .9);
    animation: table-empty-float 3.2s ease-in-out infinite;
}

.table-empty-icon i {
    font-size: 28px;
    line-height: 1;
}

.table-empty-icon span {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 0 0 5px rgba(15, 157, 79, .12);
    animation: table-empty-pulse 2.1s ease-in-out infinite;
}

.table-empty-title {
    margin-top: 6px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .1px;
}

.table-empty-text {
    max-width: 520px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
}

@keyframes table-empty-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes table-empty-pulse {
    0%, 100% { transform: scale(.9); opacity: .68; }
    50% { transform: scale(1.08); opacity: 1; }
}

.row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.row-action {
    width: 26px;
    height: 26px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition), border var(--transition), transform var(--transition);
}

    .row-action.delete {
        color: #D32F2F;
    }

/* ═══════════════════════════════════════════════════════════════════════
   PDF Viewer Dialog — Full màn hình, không padding, không footer
   ═══════════════════════════════════════════════════════════════════════ */
.pdf-dialog-body {
    margin: 0;
    height: 100%;
}
.app-dialog-backdrop:has(.pdf-dialog-body) {
    padding: 0 !important;
    align-items: stretch;
}
.app-dialog-backdrop:has(.pdf-dialog-body) .app-dialog {
    display: flex !important;
    flex-direction: column;
    border-radius: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
}
.app-dialog-backdrop:has(.pdf-dialog-body) .app-dialog-header {
    flex-shrink: 0;
}
.app-dialog-backdrop:has(.pdf-dialog-body) .app-dialog-body {
    flex: 1;
    min-height: 0;
    padding: 0 !important;
    overflow: hidden !important;
}
    .row-action.edit {
        color: #5D4037;
    }
    .row-action:hover {
        transform: translateY(-1px);
    }
.row-action.edit:hover { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.row-action.delete:hover { background: var(--brand-red-soft); color: var(--brand-red); border-color: var(--brand-red); }
.row-action.on:hover { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.row-action.off { color: var(--success); }
.row-action.off:hover { background: var(--warning-soft); color: #b45309; border-color: var(--warning); }

    .row-action.edit:disabled,
    .row-action.delete:disabled,
    .row-action.on:disabled,
    .row-action.off:disabled {
        background-color: #f5f5f5 !important;
        color: #bdbdbd !important;
        border: 0px !important;
        transform: none !important;
        cursor: not-allowed !important;
    }
    .grid-status {
        gap: 5px;
        padding: 3px 8px;
    }
.grid-status::before { display: none; }
.grid-status i { font-size: 12px; }

.data-pager {
    flex-shrink: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    background: linear-gradient(180deg, #fff, var(--bg-surface-2));
}

.pager-info {
    color: var(--text-muted);
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pager-summary-main {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-main);
    font-weight: 500;
}

.pager-summary-main i {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-700);
}

.pager-summary-main strong {
    color: var(--brand-700);
    font-size: 13px;
}

.pager-summary-sep {
    width: 1px;
    height: 20px;
    background: var(--border);
}

.pager-summary-sub {
    color: var(--text-muted);
}

.pager-summary-sub strong {
    color: var(--text-main);
    font-weight: 700;
}

.pager-info strong { color: var(--text-main); }

.pager-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pager-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    transition: background var(--transition), color var(--transition), border var(--transition);
}

.pager-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.pager-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 4px 12px rgba(15, 157, 79, .25); }
.pager-btn:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 1100px) {
    .page-view { height: auto; min-height: calc(100vh - var(--topbar-h)); }
    .page-toolbar { align-items: stretch; flex-direction: column; }
    .page-toolbar-actions { justify-content: flex-start; }
    .toolbar-search { width: 100%; }
    .data-grid { min-height: 620px; }
    .data-pager { align-items: flex-start; flex-direction: column; }
}

/* ---------- 13. Page placeholder ---------- */
.page-placeholder {
    background: var(--bg-surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 60px 30px;
    text-align: center;
    color: var(--text-muted);
}
.page-placeholder .ph-icon { font-size: 52px; color: var(--brand); opacity: .55; margin-bottom: 16px; }
.page-placeholder h3 { font-size: 19px; color: var(--text-main); margin-bottom: 8px; }
.page-placeholder p { font-size: 14px; max-width: 460px; margin: 0 auto; line-height: 1.6; }

/* ---------- 14. Backdrop / modal nền khi mở sidebar ---------- */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .28);
    backdrop-filter: blur(2px);
    z-index: 1035;
    animation: sidebarBackdropIn .18s ease both;
}

.app-shell.sidebar-overlay:not(.sidebar-collapsed) .sidebar-backdrop {
    display: block;
}
.app-shell.sidebar-pinned .sidebar-backdrop { display: none; }

@keyframes sidebarBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); width: var(--sidebar-w); }
    .app-shell.mobile-open .sidebar { transform: translateX(0); }
    .app-shell.mobile-open .sidebar-backdrop { display: block; }
    .app-main { margin-left: 0 !important; }
    .topbar-search { display: none; }
    .breadcrumb-trail { display: none; }
}

@media (max-width: 640px) {
    .auth-side { display: none; }
    .auth-panel { width: 100%; padding: 32px 24px; box-shadow: none; }
    .auth-truck, .auth-road, .auth-blob { display: none; }
    .user-menu-trigger .u-meta { display: none; }
    .app-content { padding: 0; }
    .dash-grid { grid-template-columns: 1fr; }
}

/* blazor-error-ui ẩn - đã thay bằng ErrorModal */
#blazor-error-ui { display: none !important; }
    /* ---------- 17. Polish cuối: sidebar rõ nét, scrollbar và pager summary ---------- */
    .sidebar {
        background: linear-gradient(180deg, #ffffff 0%, #f3faf5 100%);
        border-right: 1px solid #bfe8cd;
        box-shadow: 5px 0 18px rgba(15, 157, 79, .10);
    }

.app-shell:not(.sidebar-collapsed) .sidebar,
.app-shell.sidebar-collapsed .sidebar:hover {
    box-shadow: 16px 0 42px rgba(15, 157, 79, .20), 6px 0 18px rgba(15, 23, 42, .08);
}

.sidebar-brand {
    height: 68px;
    padding: 0 12px;
    background: #fff;
    border-bottom: 1px solid #cfeedd;
}

.brand-logo {
    width: 50px;
    height: 50px;
    padding: 3px;
    border: none;
    border-radius: 12px;
    box-shadow: none;
    background: #fff;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text .brand-name {
    font-size: 17px;
    color: var(--brand-700);
}

.brand-text .brand-sub {
    font-size: 12px;
    color: #3f7f55;
}

.nav-section-title {
    color: #527160;
    opacity: .92;
}

.nav-link-item {
    color: #263a2d;
    border-radius: 12px;
}

.nav-link-item:hover {
    background: linear-gradient(90deg, #e3f7eb 0%, #f7fcf8 100%);
    border-color: #9ed9b1;
    color: var(--brand-700);
}

.nav-link-item.active {
    background: linear-gradient(90deg, #c9efd6 0%, #f2fbf5 100%);
    border-color: #7ccc95;
    color: #064e26;
    box-shadow: inset 4px 0 0 var(--brand), 0 8px 18px rgba(15, 157, 79, .16);
}

.nav-link-item .nav-icon {
    background: #e6f7ec;
    color: var(--brand-700);
}

.nav-link-item:hover .nav-icon,
.nav-link-item.active .nav-icon {
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
    color: #fff;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #edf7f0; border-radius: 999px; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #67b883, #0f9d4f);
    border-radius: 999px;
    border: 2px solid #edf7f0;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0f9d4f, #0a6e37);
    background-clip: padding-box;
}
html, body { scrollbar-color: #0f9d4f #edf7f0; }

.data-pager {
    background: linear-gradient(180deg, #ffffff 0%, #f4faf6 100%);
    border-top: 1px solid #cfeedd;
    box-shadow: 0 -4px 14px rgba(15, 157, 79, .07);
}

.pager-info {
    gap: 12px;
    font-size: 13px;
}

.pager-summary-main {
    padding: 6px 10px;
    border-radius: 12px;
    background: linear-gradient(90deg, #e3f7eb, #f8fcf9);
    border: 1px solid #bfe8cd;
    box-shadow: 0 3px 10px rgba(15, 157, 79, .08);
}

.pager-summary-main i {
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
    color: #fff;
}

.pager-summary-main strong {
    font-size: 13.5px;
    color: #064e26;
}

.pager-summary-sep {
    height: 24px;
    background: #bfe8cd;
}

.pager-summary-sub {
    padding: 5px 0;
    color: #527160;
}

.pager-summary-sub strong {
    color: var(--brand-700);
    font-size: 13.5px;
}

/* ---------- 18. Refinement: mini-sidebar, table header light, pager summary clean ---------- */
.app-shell.sidebar-collapsed .sidebar:not(:hover) .nav-link-item.active {
    box-shadow: 0 4px 12px rgba(15, 157, 79, .10);
    background: #e9f7ee;
    border-color: #c7ead3;
    border:0px !important;
}

.app-shell.sidebar-collapsed .sidebar:not(:hover) .nav-link-item.active::before {
    display: none;
}

.grid-table th {
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f6 100%);
    color: #334155;
    border-right-color: #dbe3ea;
    user-select:none;
}

.grid-table th i {
    color: var(--brand-700);
}

    .grid-table th.sticky-col,
    .grid-table th.sticky-action {
        background: linear-gradient(180deg, #f1f5f9 0%, #e7eef3 100%);
  
        color: #1e293b;
    }

.data-pager {
    background: #fff;
    border-top: 1px solid #dbe7df;
    box-shadow: 0 -2px 10px rgba(15, 23, 42, .04);
}

.pager-info {
    gap: 8px 14px;
    font-size: 13px;
    color: #64748b;
}

.pager-summary-main {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #334155;
}

.pager-summary-main i {
    width: 28px;
    height: 28px;
    background: #eef8f1;
    color: var(--brand-700);
}

.pager-summary-main strong,
.pager-summary-sub strong {
    color: #0f9d4f;
    font-size: 13.2px;
}

.pager-summary-sep {
    height: 18px;
    background: #dbe7df;
}

.pager-summary-sub {
    padding: 0;
    color: #64748b;
}

/* ---------- 19. Dark green shell theme: sidebar/topbar/toolbar/footer ---------- */
.sidebar {
    background: linear-gradient(180deg, #062915 0%, #0a3a1f 54%, #082c18 100%);
    color: #e7f8ed;
    border-right: 1px solid rgba(126, 211, 154, .35);
    box-shadow: 7px 0 24px rgba(3, 38, 18, .38);
}

.sidebar::after {
    background: radial-gradient(circle at 28% 0%, rgba(34, 197, 94, .18), transparent 34%),
                linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
}

.sidebar::before {
    background: linear-gradient(180deg, transparent, rgba(134, 239, 172, .55), transparent);
}

.app-shell:not(.sidebar-collapsed) .sidebar,
.app-shell.sidebar-collapsed .sidebar:hover,
.app-shell.sidebar-pinned .sidebar {
    box-shadow: 18px 0 46px rgba(3, 38, 18, .48), 8px 0 22px rgba(15, 23, 42, .18);
}

.sidebar-brand {
    background: linear-gradient(180deg, #07351c, #062915);
    border-bottom: 1px solid rgba(134, 239, 172, .24);
}

.brand-logo {
    background: #fff;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, .72);
}

.brand-text .brand-name { color: #ecfdf3; }
.brand-text .brand-sub { color: #9fe6b7; }

.sidebar-pin-btn {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(134, 239, 172, .24);
    color: #bbf7d0;
}

.sidebar-pin-btn:hover,
.sidebar-pin-btn.pinned {
    background: rgba(34, 197, 94, .18);
    border-color: #86efac;
    color: #ecfdf3;
}


.nav-link-item {
    color: #d7f7e2;
    border-color: transparent;
}

.nav-link-item .nav-icon {
    background: rgba(134, 239, 172, .10);
    color: #bbf7d0;
}

.nav-link-item:hover {
    background: linear-gradient(90deg, rgba(34, 197, 94, .20), rgba(34, 197, 94, .07));
    border-color: rgba(134, 239, 172, .28);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(2, 44, 21, .22);
}

.nav-link-item.active {
    background: linear-gradient(90deg, rgba(34, 197, 94, .30), rgba(34, 197, 94, .10));
    color: #ffffff;
    border-color: rgba(134, 239, 172, .46);
    box-shadow: inset 4px 0 0 #86efac, 0 10px 22px rgba(2, 44, 21, .28);
}

.nav-link-item:hover .nav-icon,
.nav-link-item.active .nav-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
}

.nav-sub .nav-link-item { color: #9fe6b7; }
.nav-sub .nav-link-item:hover,
.nav-sub .nav-link-item.active { color: #fff; background: rgba(34, 197, 94, .16); }

.sidebar-footer {
    border-top-color: rgba(134, 239, 172, .22);
    color: #8fdca8;
}

.topbar {
    background: linear-gradient(180deg, #062915 0%, #082f1a 100%);
    border-bottom: 1px solid rgba(134, 239, 172, .32);
    box-shadow: 0 4px 16px rgba(3, 38, 18, .22);
}

.breadcrumb-title { color: #f0fdf4; user-select:none; }
.breadcrumb-trail {
    color: #98e4b0;
    user-select: none;
}
.breadcrumb-trail .sep { color: rgba(187, 247, 208, .58); }

/* ---------- Final real override: mini sidebar + smart tooltip + nav-sub ---------- */
.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover),
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover),
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover) {
    background: linear-gradient(180deg, rgba(244,248,245,.98) 0%, rgba(235,242,238,.97) 54%, rgba(226,236,230,.985) 100%) !important;
    border-right: 2px solid rgba(152, 183, 166, .82) !important;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .06), 3px 0 10px rgba(15, 157, 79, .03) !important;
    backdrop-filter: blur(10px) saturate(1.02) !important;
}

.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover)::before,
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover)::before,
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover)::before {
    opacity: .64 !important;
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(34, 197, 94, .03), rgba(12, 74, 31, 0)) !important;
}

.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover)::after,
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover)::after,
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover)::after {
    background:
        radial-gradient(circle at 50% 4%, rgba(255,255,255,.28), transparent 18%),
        radial-gradient(circle at 50% 100%, rgba(15, 157, 79, .04), transparent 18%),
        linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0)) !important;
}

.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover) .nav-link-item,
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover) .nav-link-item,
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover) .nav-link-item {
    border-color: transparent !important;
}

.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover) .nav-link-item .nav-icon,
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover) .nav-link-item .nav-icon,
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover) .nav-link-item .nav-icon {
    border: 0px solid rgba(184, 208, 193, .54) !important;
    background: transparent !important;
    color: #2d6247 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .03) !important;
    filter: saturate(1.01) contrast(1.01) !important;
}

.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover) .nav-link-item.active,
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover) .nav-link-item.active,
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover) .nav-link-item.active {
    background: linear-gradient(180deg, rgba(250,253,251,.96), rgba(237,245,240,.99)) !important;
    border: 0px solid rgba(177, 214, 192, .52) !important;
    box-shadow: 0 6px 14px rgba(15, 157, 79, .08), 0 2px 6px rgba(15, 23, 42, .04) !important;
    box-shadow:none !important;
   width:40px !important;
   height:40px !important;
}

.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover) .nav-link-item.active .nav-icon,
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover) .nav-link-item.active .nav-icon,
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover) .nav-link-item.active .nav-icon {
    background: linear-gradient(135deg, #2bc46a, #15924d) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(15, 157, 79, .16), 0 0 0 3px rgba(34, 197, 94, .04) !important;
}

html body .app-shell .smart-tooltip,
html body .app-shell .smart-tooltip.show {
    background: linear-gradient(180deg, rgba(252,254,253,.998), rgba(246,250,248,.992)) !important;
    color: #183726 !important;
    border: 1px solid rgba(218, 230, 223, .92) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .07), 0 1px 0 rgba(255,255,255,.96) inset !important;
    backdrop-filter: blur(6px) saturate(1.01) !important;
}

html body .app-shell .smart-tooltip::after {
    background: linear-gradient(135deg, rgba(252,254,253,.998), rgba(246,250,248,.992)) !important;
    border: 1px solid rgba(218, 230, 223, .92) !important;
    box-shadow: 2px 2px 5px rgba(15, 23, 42, .025) !important;
}

html body .app-shell .nav-sub,
html body .app-shell .nav-group.open > .nav-sub {
    background: linear-gradient(180deg, rgba(250,253,251,.975), rgba(242,247,244,.96)) !important;
    border: 1px solid rgba(219, 231, 224, .92) !important;
    border-radius: 16px !important;
    background:unset !important;
    background-color:transparent !important;
    box-shadow: 0 8px 16px rgba(15, 23, 42, .05), 0 1px 0 rgba(255,255,255,.86) inset !important;
    padding: 0px !important;
}

html body .app-shell .nav-sub .nav-link-item {
    color: #2a4f3a !important;
    border-radius: 12px !important;
}

html body .app-shell .nav-sub .nav-link-item:hover,
html body .app-shell .nav-sub .nav-link-item.active {
    background: linear-gradient(135deg, rgba(234,245,238,.98), rgba(249,252,250,.99)) !important;
    border: 1px solid rgba(187, 221, 201, .42) !important;
    color: #1b5a34 !important;
    box-shadow: 0 5px 10px rgba(15, 157, 79, .05) !important;
}

    .breadcrumb-trail span:last-child {
        display: none !important;
    }

    .topbar-toggle,
    .icon-btn {
        background: rgba(255, 255, 255, .08);
        border-color: rgba(134, 239, 172, .24);
        color: #bbf7d0;
        box-shadow: 0 1px 2px rgba(0,0,0,.12);
    }

.topbar-toggle:hover,
.icon-btn:hover {
    background: rgba(34, 197, 94, .18);
    border-color: #86efac;
    color: #fff;
    box-shadow: 0 8px 20px rgba(3, 38, 18, .25);
}

.topbar-divider { background: rgba(134, 239, 172, .24); }

.user-menu-trigger {
    border-color: rgba(134, 239, 172, .20);
    color: #f0fdf4;
}

.user-menu-trigger:hover { background: rgba(255, 255, 255, .08); border-color: rgba(134, 239, 172, .38); }
.user-menu-trigger .u-name { color: #f0fdf4; }
.user-menu-trigger .u-role { color: #9fe6b7; }


    .page-toolbar .btn-primary {
        box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    }

.toolbar-search input {
    background: rgba(255,255,255,.10);
    color: #f0fdf4;
    border-color: rgba(134, 239, 172, .28);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.12);
}

.toolbar-search input::placeholder { color: rgba(220, 252, 231, .68); }
.toolbar-search i { color: #9fe6b7; }

.data-pager {
    background: linear-gradient(180deg, #0a3a1f 0%, #082f1a 100%);
    border-top-color: rgba(134, 239, 172, .30);
    box-shadow: 0 -4px 16px rgba(3, 38, 18, .18);
}

.pager-summary-main,
.pager-summary-sub { color: #b7f4c8; }
    .pager-summary-main i {
        background: rgba(34, 197, 94, .20);
        color: #00695C;
    }
.pager-summary-main strong,
.pager-summary-sub strong { color: #fff; }
.pager-summary-sep { background: rgba(134, 239, 172, .30); }

.pager-btn {
    background: rgba(255, 255, 255, .08);
    color: #bbf7d0;
    border-color: rgba(134, 239, 172, .24);
}

.pager-btn:hover:not(:disabled) {
    background: rgba(34, 197, 94, .18);
    color: #fff;
    border-color: #86efac;
}

.pager-btn.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border-color: #86efac;
}

/* ---------- 20. TASACO balanced shell theme: xanh logo, không quá tối ---------- */
.page-view { padding: 0px; gap: 0px; }

.sidebar {
    background: linear-gradient(180deg, #0f9d4f 0%, #0c8442 48%, #096b36 100%);
    border-right-color: rgba(255,255,255,.22);
    box-shadow: 7px 0 22px rgba(15, 157, 79, .22);
}

.sidebar::after {
    background: radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .20), transparent 34%),
                linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0));
}

.sidebar-brand {
    background: linear-gradient(180deg, #ffffff 0%, #f6fbf7 100%);
    border-bottom: 1px solid rgba(15, 157, 79, .22);
}

.brand-logo {
    width: 80px;
    height: 80px;
    padding: 0px;
    border: none;
    background: #fff;
}

.app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-brand {
    justify-content: center;
    padding: 0 8px;
}

.app-shell.sidebar-collapsed .sidebar:not(:hover) .brand-logo {
    width: 80px;
    height: 80px;
    padding: 0px;
}

.brand-text .brand-name { color: var(--brand-700); }
.brand-text .brand-sub { color: #2f7d47; }
.nav-link-item { color: #f0fff5; }
.nav-link-item .nav-icon { background: rgba(255,255,255,.16); color: #fff; }
.nav-link-item:hover {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.28);
    color: #fff;
}
.nav-link-item.active {
    background: rgba(255,255,255,.26);
    color: #fff;
    border-color: rgba(255,255,255,.40);
    box-shadow: inset 4px 0 0 #fff, 0 8px 18px rgba(0,0,0,.16);
}
.nav-link-item:hover .nav-icon,
.nav-link-item.active .nav-icon {
    background: #fff;
    color: var(--brand-700);
}
.nav-sub .nav-link-item { color: #212121; }
.sidebar-footer { color: #dcfce7; border-top-color: rgba(255,255,255,.20); }

.sidebar-pin-btn {
    background: rgba(15, 157, 79, .08);
    border-color: rgba(15, 157, 79, .20);
    color: var(--brand-700);
}
.sidebar-pin-btn:hover,
.sidebar-pin-btn.pinned {
    background: var(--brand-soft);
    color: var(--brand-700);
    border-color: var(--brand);
}

.topbar {
    background: linear-gradient(180deg, #0c8442 0%, #096b36 100%);
    border-bottom-color: rgba(255,255,255,.22);
    box-shadow: 0 3px 14px rgba(15, 157, 79, .20);
} 
.breadcrumb-trail { color: #d8ffe4; margin-top:2px; }
.breadcrumb-trail .sep { color: rgba(255,255,255,.55); }
.topbar-toggle,
.icon-btn {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.30);
    color: #ffffff;
}
.topbar-toggle:hover,
.icon-btn:hover {
    background: #ffffff;
    color: var(--brand-700);
    border-color: #ffffff;
}
.topbar-divider { background: rgba(255,255,255,.28); }
.user-menu-trigger { border-color: rgba(255,255,255,.28); }
.user-menu-trigger:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.45); }
.user-menu-trigger .u-name { color: #ffffff; }
.user-menu-trigger .u-role { color: #d8ffe4; letter-spacing:1px; }
.user-menu-trigger .chevron { color: #d8ffe4; }

.page-toolbar {
    border-color: #c7ead3;
}
    .page-toolbar .btn-outline {
        background: rgba(255,255,255,.78);
        color: #173824;
        border-color: #EEEEEE;
        font-weight: 500;
    }
.page-toolbar .btn-outline:hover {
    background: #fff;
    color: var(--brand-700);
    border-color: var(--brand);
}
.toolbar-search input {
    background: rgba(255,255,255,.82);
    color: var(--text-main);
    border-color: #b9dec6;
}
.toolbar-search input::placeholder { color: #6b8f78; }
.toolbar-search i { color: var(--brand-700); }

/* ---------- 21. Final polish: topbar dark rõ, pager footer sáng hơn ---------- */
.topbar {
    background: linear-gradient(135deg, #06351c 0%, #085c2f 48%, #0c8442 100%);
    border-bottom: 1px solid rgba(190, 242, 204, .42);
    box-shadow: 0 5px 18px rgba(3, 38, 18, .28);
}

.topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(187, 247, 208, .75), transparent);
    pointer-events: none;
}



.breadcrumb-trail {
    color: rgba(220, 252, 231, .86);
}

.topbar-toggle,
.icon-btn {
    background: rgba(255, 255, 255, .10);
    border-color: rgba(255, 255, 255, .26);
    color: #f0fdf4;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 3px 10px rgba(0,0,0,.12);
    overflow: visible;
}

.topbar-toggle:hover,
.icon-btn:hover {
    background: rgba(255, 255, 255, .98);
    color: var(--brand-700);
    border-color: #ffffff;
    box-shadow: 0 10px 24px rgba(3, 38, 18, .28), 0 0 0 4px rgba(187, 247, 208, .16);
    transform: translateY(-2px);
}

.topbar-toggle i,
.icon-btn i {
    transition: transform .22s ease;
}

.topbar-toggle:hover i,
.icon-btn:hover i {
    transform: scale(1.10) rotate(-3deg);
}

.icon-btn .count-badge {
    box-shadow: 0 0 0 2px rgba(6, 53, 28, .92), 0 4px 10px rgba(0,0,0,.18);
}

.topbar-divider {
    background: rgba(220, 252, 231, .30);
}

.data-pager {
    background: linear-gradient(180deg, #ffffff 0%, #f2fbf5 100%);
    border-top: 1px solid #bfe8cd;
    box-shadow: 0 -4px 18px rgba(15, 157, 79, .09);
}

.pager-summary-main {
    color: #1f3a29;
}

    .pager-summary-main i {
        background: transparent;
        color: #00695C;
        font-weight: 700 !important;
    }

.pager-summary-main strong,
.pager-summary-sub strong {
    color: var(--brand-700);
}

.pager-summary-sub {
    color: #455A64;
}

.pager-summary-sep {
    background: #bfe8cd;
}

.pager-btn {
    background: #ffffff;
    color: #476556;
    border-color: #cfeedd;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.pager-btn:hover:not(:disabled) {
    background: var(--brand-soft);
    color: var(--brand-700);
    border-color: var(--brand);
    box-shadow: 0 7px 16px rgba(15, 157, 79, .16);
    transform: translateY(-1px);
}

.pager-btn.active {
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
    color: #fff;
    border-color: var(--brand);
    box-shadow: 0 8px 18px rgba(15, 157, 79, .26);
}

/* ---------- 22. Final adjustment: sidebar light, safe topbar contrast, pinned soft shadow ---------- */
.sidebar {
    background: #fff !important;
    color: var(--text-main);
    box-shadow: 4px 0 14px rgba(15, 157, 79, .08);
    box-shadow:none !important;
}

.sidebar::after {
    background: radial-gradient(circle at 20% 0%, rgba(15, 157, 79, .10), transparent 34%),
                linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,252,249,.98));
}

.sidebar::before {
    background: linear-gradient(180deg, transparent, rgba(15, 157, 79, .28), transparent);
}

.app-shell:not(.sidebar-collapsed) .sidebar,
.app-shell.sidebar-collapsed .sidebar:hover {
    box-shadow: 10px 0 28px rgba(15, 157, 79, .12), 4px 0 12px rgba(15, 23, 42, .05);
}

.app-shell.sidebar-pinned .sidebar {
    box-shadow: 3px 0 10px rgba(15, 23, 42, .06);
}

.sidebar-brand {
    background: #fff;
    border-bottom: 1px solid #cfeedd;
}

.brand-text .brand-name { color: var(--brand-700); }
.brand-text .brand-sub { color: #2f7d47; }

.sidebar-pin-btn {
    background: #fff;
    border-color: #cfeedd;
    color: var(--brand-700);
}
.sidebar-pin-btn:hover,
.sidebar-pin-btn.pinned {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand-700);
}

.nav-section-title {
    color: #B71C1C;
}
.nav-link-item { color: #263a2d; }
    .nav-link-item .nav-icon {

/* ---------- Final force override: mini sidebar + right sidebar popup ---------- */
.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover),
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover),
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover) {
    background: linear-gradient(180deg, rgba(236,243,239,.97) 0%, rgba(219,230,223,.96) 54%, rgba(205,219,210,.98) 100%) !important;
    border-right: 1px solid rgba(74, 118, 93, .98) !important;
    box-shadow: 0 22px 46px rgba(15, 23, 42, .10), 6px 0 16px rgba(15, 157, 79, .05) !important;
    backdrop-filter: blur(12px) saturate(1.03) !important;
}

.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover)::before,
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover)::before,
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover)::before {
    opacity: .9 !important;
    background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(34, 197, 94, .05), rgba(12, 74, 31, 0)) !important;
}

.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover)::after,
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover)::after,
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover)::after {
    background:
        radial-gradient(circle at 50% 6%, rgba(255,255,255,.24), transparent 18%),
        radial-gradient(circle at 50% 100%, rgba(15, 157, 79, .08), transparent 20%),
        linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)) !important;
}

.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover) .nav-link-item.active,
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover) .nav-link-item.active,
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover) .nav-link-item.active {
    background: linear-gradient(180deg, rgba(248,252,249,.92), rgba(225,236,229,.98)) !important;
    border: 1px solid rgba(88, 160, 115, .52) !important;
    box-shadow: 0 12px 24px rgba(15, 157, 79, .14), 0 4px 10px rgba(15, 23, 42, .08) !important;
}

.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover) .nav-link-item.active .nav-icon,
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover) .nav-link-item.active .nav-icon,
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover) .nav-link-item.active .nav-icon {
    background: linear-gradient(135deg, #20c15a, #086d33) !important;
    color: #ffffff !important;
    box-shadow: 0 12px 24px rgba(15, 157, 79, .30), 0 0 0 4px rgba(34, 197, 94, .08) !important;
    transform: translateY(-1px) scale(1.09) !important;
    filter: saturate(1.08) contrast(1.04) !important;
}

.app-shell.sidebar-collapsed.sidebar-overlay .sidebar:not(:hover) .nav-link-item .nav-icon,
.app-shell.sidebar-collapsed.sidebar-pinned .sidebar:not(:hover) .nav-link-item .nav-icon,
.app-shell.sidebar-collapsed.sidebar-mini-locked .sidebar:not(:hover) .nav-link-item .nav-icon {
    border: 1px solid rgba(118, 171, 141, .34) !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .05) !important;
}

html body .smart-tooltip,
body .smart-tooltip.show,
html body .app-shell .smart-tooltip,
html body .app-shell .smart-tooltip.show {
    background: linear-gradient(180deg, rgba(254,255,255,.995), rgba(246,250,248,.985)) !important;
    color: #0b2316 !important;
    border: 1px solid rgba(228, 236, 232, .98) !important;
    box-shadow: 0 18px 34px rgba(15, 23, 42, .09), 0 1px 0 rgba(255,255,255,.96) inset !important;
    backdrop-filter: blur(6px) saturate(1.01) !important;
}

html body .smart-tooltip::after,
html body .app-shell .smart-tooltip::after {
    background: linear-gradient(135deg, rgba(254,255,255,.995), rgba(246,250,248,.985)) !important;
    border: 1px solid rgba(228, 236, 232, .98) !important;
    box-shadow: 3px 3px 8px rgba(15, 23, 42, .03) !important;
}

        color: #0a6e37;
    }
.nav-link-item:hover {
    background: linear-gradient(90deg, #e3f7eb 0%, #f7fcf8 100%);
    border-color: #9ed9b1;
    color: var(--brand-700);
    box-shadow: 0 6px 16px rgba(15, 157, 79, .10);
}
.nav-link-item.active {
    background: linear-gradient(90deg, #c9efd6 0%, #f2fbf5 100%);
    color: #064e26;
    border-color: #7ccc95;
    box-shadow: inset 4px 0 0 var(--brand), 0 6px 14px rgba(15, 157, 79, .10);
}
.nav-link-item:hover .nav-icon,
.nav-link-item.active .nav-icon {
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
    color: #fff;
}
.nav-sub .nav-link-item { color: #333; }
    .nav-sub .nav-link-item:hover,
    .nav-sub .nav-link-item.active {
        color: var(--brand-700);
        background: var(--brand-soft);
        border: 1px solid #C8E6C9;
    }
.sidebar-footer { color: #527160; border-top-color: #cfeedd; }

.topbar {
    background: linear-gradient(180deg, #f8fbf9 0%, #eef8f1 100%);
    border-bottom: 1px solid #bfe8cd;
    box-shadow: 0 3px 12px rgba(15, 157, 79, .08);
}

.topbar::after {
    background: linear-gradient(90deg, transparent, rgba(15, 157, 79, .38), transparent);
}


.breadcrumb-trail { color: #527160; }
.breadcrumb-trail .sep { color: #84a893; }

.topbar-toggle,
.icon-btn {
    background: #fff;
    border-color: #cfeedd;
    color: var(--brand-700);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.topbar-toggle:hover,
.icon-btn:hover {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand-700);
    box-shadow: 0 7px 16px rgba(15, 157, 79, .14);
}

.topbar-divider { background: #cfeedd; }

.user-menu-trigger { border-color: #cfeedd; color: var(--text-main); }
.user-menu-trigger:hover { background: var(--brand-soft); border-color: var(--brand); }
.user-menu-trigger .u-name { color: var(--text-main); }
.user-menu-trigger .u-role { color: #527160; }
.user-menu-trigger .chevron { color: #527160; }

/* ---------- 23. Polish topbar toggle, user popup, compact pager ---------- */
.topbar-toggle {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #fff !important;
    color: #fff;
    border: 0px solid #C8E6C9 !important;
}

.topbar-toggle:hover {
    background: linear-gradient(135deg, #16a34a 0%, #065f2f 100%);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 10px 24px rgba(15, 157, 79, .34), 0 0 0 4px rgba(15, 157, 79, .12);
    transform: translateY(-2px) scale(1.02);
}

    .topbar-toggle i {
        font-size: 32px;
        color: #2E7D32 !important;
    }

.user-menu-trigger {
    border-radius: 28px;
    padding: 4px 12px 4px 5px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    transition: background var(--transition), border var(--transition), box-shadow var(--transition), transform var(--transition);
}

.user-menu-trigger:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 157, 79, .14);
}

.user-menu-panel {
    border-radius: 18px;
    border: 1px solid rgba(15, 157, 79, .16);
    box-shadow: 0 22px 58px rgba(15, 23, 42, .18), 0 0 0 1px rgba(255,255,255,.65) inset;
    transform-origin: top right;
}

.user-menu.open .user-menu-panel {
    animation: userMenuPop .20s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes userMenuPop {
    from { opacity: 0; transform: translateY(-10px) scale(.96); filter: blur(2px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.user-menu-header {
    background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.24), transparent 34%),
                linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
    padding: 22px 18px;
}

.user-menu-body {
    padding: 10px;
    background: linear-gradient(180deg, #fff 0%, #f7fbf8 100%);
}

.user-menu-action {
    border-radius: 12px;
    padding: 11px 12px;
    transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.user-menu-action:hover {
    transform: translateX(3px);
    box-shadow: 0 5px 14px rgba(15, 157, 79, .10);
}

.user-menu-action .icon-wrap {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-menu-action.logout .icon-wrap {
    background: var(--brand-red-soft);
    color: var(--brand-red);
}

.data-pager {
    min-height: 35px;
    padding: 5px 5px;
    user-select:none;
}

.pager-summary-main i {
    width: 28px;
    height: 28px;
    font-size: 14px;
    margin-top:-2px;
}

.pager-info {
    font-size: 12.2px;
    gap: 6px 10px;
}

.pager-summary-main strong,
.pager-summary-sub strong {
    font-size: 12.6px;
}

.pager-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
    border-radius: 7px;
}

/* ---------- 24. Final polish: visible topbar toggle, better user dropdown, balanced sidebar header ---------- */
.sidebar-brand {
    height: var(--topbar-h);
}




.user-menu-panel {
    width: 310px;
    border-radius: 20px;
    overflow: hidden;
}

.user-menu-header {
    padding: 22px 18px 18px;
}

.user-menu-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-menu-action {
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    padding: 8px 10px;
    gap: 12px;
    font-weight: 600;
}

.user-menu-action:hover {
    background: linear-gradient(90deg, #eaf8ef 0%, #ffffff 100%);
    border-color: #bfe8cd;
    color: var(--brand-700);
    transform: translateX(2px);
}

.user-menu-action .icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-soft), #ffffff);
    border: 1px solid #cfeedd;
    color: var(--brand-700);
    flex-shrink: 0;
}

.user-menu-action:hover .icon-wrap {
    background: linear-gradient(135deg, var(--brand), var(--brand-700));
    color: #fff;
    border-color: var(--brand);
}

.user-menu-action.logout {
    margin-top: 2px;
    color: var(--brand-red);
}

.user-menu-action.logout:hover {
    background: linear-gradient(90deg, var(--brand-red-soft) 0%, #ffffff 100%);
    border-color: #fecaca;
    color: var(--brand-red);
}

.user-menu-action.logout .icon-wrap {
    background: var(--brand-red-soft);
    border-color: #fecaca;
    color: var(--brand-red);
}

.user-menu-action.logout:hover .icon-wrap {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
}

.user-menu-divider {
    margin: 4px 2px;
}

/* ---------- 25. Badge, dialog, confirm, toast ---------- */
.icon-btn .count-badge {
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    padding: 0 5px;
    border: none;
    font-size: 9.5px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, .32);
    transform: translate(28%, -18%);
}

.btn-danger {
    background: linear-gradient(135deg, var(--brand-red), var(--brand-red-600));
    color: #fff;
    box-shadow: 0 6px 16px rgba(225, 38, 47, .22);
}
.btn-danger:hover { color: #fff; box-shadow: 0 8px 20px rgba(225, 38, 47, .34); }

.app-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1700;
    background: radial-gradient(circle at center, rgba(255,255,255,.18) 0%, rgba(15, 23, 42, .14) 42%, rgba(15, 23, 42, .26) 100%);
    backdrop-filter: blur(10px) saturate(1.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn .12s cubic-bezier(.22, 1, .36, 1) both;
}

.app-dialog {
    width: min(720px, 96vw);
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,248,.98));
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .16), 0 10px 28px rgba(15, 157, 79, .10), 0 1px 0 rgba(255,255,255,.75) inset;
    overflow: visible;
    animation: dialogPop .15s cubic-bezier(.22, 1, .36, 1) both;
    position: relative;
    will-change: transform, opacity;
    overflow:hidden;
}

.app-dialog::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top left, rgba(15, 157, 79, .10), transparent 28%),
                radial-gradient(circle at bottom right, rgba(34, 197, 94, .08), transparent 24%);
    opacity: .95;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialogPop {
    from { opacity: 0; transform: translateY(6px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.app-dialog-header {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(243,249,245,.92));
    border-bottom: 1px solid rgba(187, 225, 201, .88);
    position: relative;
    z-index: 1;
}
.dialog-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: #173824;
    user-select: none;
}
.dialog-title i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    background: linear-gradient(135deg, var(--brand), #0b7a3a);
    box-shadow: 0 10px 22px rgba(15, 157, 79, .22);
}
.dialog-close {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(203, 213, 225, .86);
    border-radius: 12px;
    background: rgba(255,255,255,.88);
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .22s cubic-bezier(.22, 1, .36, 1), color .22s cubic-bezier(.22, 1, .36, 1), border-color .22s cubic-bezier(.22, 1, .36, 1), box-shadow .28s cubic-bezier(.22, 1, .36, 1), transform .28s cubic-bezier(.22, 1, .36, 1);
}
.dialog-close:hover {
    background: #fff5f5;
    color: var(--brand-red);
    border-color: #fecaca;
    box-shadow: 0 10px 20px rgba(239, 68, 68, .12);
    transform: translateY(-1px) scale(1.02);
}
.app-dialog-body {
    padding: 16px 18px 14px;
    position: relative;
    z-index: 1;
}
.dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.app-dialog-body .form-group, .app-form-group { margin-bottom: 10px; animation: none; width: 100%; }
.app-dialog-body .form-label, .app-form-label { margin-bottom: 5px; font-size: 12px; color: #476355; }
.app-dialog-body .app-row:last-child .app-form-group {
    margin-bottom: 5px !important;
}
.app-dialog-body .form-control, .app-form-group .form-control {
    height: 34px;
    border-radius: 10px;
    font-size: 13px;
    padding: 0 12px;
    width: 100%;
    border-color: #d7e7dc;
    background: rgba(255,255,255,.88);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
    transition: border var(--transition), box-shadow var(--transition), background var(--transition);
}
.app-dialog-body .form-control:focus,
.app-form-group .form-control:focus {
    outline: none;
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px var(--brand-soft), 0 4px 12px rgba(15, 157, 79, .10);
}
.app-dialog-body textarea.form-control,
.app-form-group textarea.form-control {
    height: auto;
    padding: 8px 12px;
    line-height: 1.5;
    resize: vertical;
}
.app-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px 16px;
    background: linear-gradient(180deg, rgba(248,252,249,.78), rgba(243,249,245,.94));
    border-top: 1px solid rgba(206, 233, 216, .92);
    position: relative;
    z-index: 1;
}
.app-dialog-footer .btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}
.form-area {
    min-height: 80px !important;
    height: auto !important;
    padding: 10px !important;
    resize: vertical;
    line-height: 1.5;
}
.app-form-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}
.form-required {
    color: #dc2626;
    font-weight: 800;
}
.app-form-control-wrap,
.app-form-control-wrap > *,
.app-form-control-wrap > * > input,
.app-form-control-wrap > * > select,
.app-form-control-wrap > * > textarea {
    width: 100%;
}
.app-form-group.has-error .app-form-label {
    color: #b91c1c;
}
.app-form-error {
    margin-top: 5px;
    font-size: 12px;
    color: #dc2626;
    font-weight: 500;
    display:none;
}
.input-error {
    border-color: #fca5a5 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12) !important;
    background: #fffafa !important;
}
.app-check {
    --check-size: 22px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 5px 12px;
    border: 0px solid #cfeedd;
    border-radius: 8px;
    /*background: linear-gradient(180deg, #f8fbf9, #eef8f1);*/
    background-color:#fff;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), transform var(--transition);
}
.app-check:hover {
    /*border-color: #9ed8b5;
    box-shadow: 0 8px 18px rgba(15, 157, 79, .10);
    transform: translateY(-1px);*/
}
.app-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.app-check-box {
    width: var(--check-size);
    height: var(--check-size);
    border-radius: 7px;
    border: 1.5px solid #9fd6b4;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all var(--transition);
    flex-shrink: 0;
}
.app-check-box i {
    font-size: 14px;
    font-weight: 800;
}
.app-check input:checked + .app-check-box {
    background: #4CAF50;
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 6px 14px rgba(15, 157, 79, .24);
}
.app-check-text {
    color: #000;
    font-size: 12px;
    font-weight: 400;
}
.app-check input:disabled + .app-check-box,
.app-check input:disabled ~ .app-check-text {
    opacity: .6;
}
.app-row {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-sizing: border-box;
}
.app-cell {
    box-sizing: border-box;
}
.app-cell > * {
    width: 100%;
}
.app-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px 16px;
    background: linear-gradient(180deg, rgba(248,252,249,.78), rgba(243,249,245,.94));
    border-top: 1px solid rgba(206, 233, 216, .92);
    position: relative;
    z-index: 1;
}
.app-dialog-footer .btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
}

.confirm-dialog {
    width: min(430px, 94vw);
    background: #fff;
    border-radius: 22px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
    animation: dialogPop .15s cubic-bezier(.2,.8,.2,1) both;
    user-select:none;
}
.confirm-icon { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px; background: var(--brand-red-soft); color: var(--brand-red); display:flex; align-items:center; justify-content:center; font-size: 26px; }
.confirm-dialog h3 { font-size: 18px; margin-bottom: 6px; }
.confirm-dialog p { color: var(--text-muted); line-height: 1.55; }
.confirm-warning { margin: 14px 0; padding: 10px 12px; border-radius: 12px; background: #fff7ed; color: #c2410c; font-weight: 600; }
.confirm-actions { display: flex; gap: 8px; justify-content: center; }

/* ── Confirm success variant ── */
.app-dialog-backdrop.success .confirm-icon {
    background: #dcfce7;
    color: #16a34a;
}
.app-dialog-backdrop.success .confirm-warning {
    background: #f0fdf4;
    color: #15803d;
}
.app-dialog-backdrop.success .confirm-actions .btn-success,
.app-dialog-backdrop.success .btn-success {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
}
.app-dialog-backdrop.success .btn-success:hover {
    background: #15803d !important;
    border-color: #15803d !important;
}

.toast-stack {
    position: fixed;
    top: 74px;
    right: 16px;
    z-index: 1900;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    align-items: flex-end;
}

.app-toast {
    --toast-color: var(--brand);
    width: fit-content;
    min-width: 260px;
    max-width: min(420px, calc(100vw - 32px));
    position: relative;
    display: grid;
    grid-template-columns: 42px 1fr 28px;
    gap: 10px;
    padding: 12px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(15,23,42,.08);
    border-left: 4px solid var(--toast-color);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .18);
    overflow: hidden;
    pointer-events: auto;
    animation: toastIn .24s cubic-bezier(.2,.8,.2,1) both;
}
.app-toast .toast-content { min-width: 0; max-width: 310px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px) scale(.98); } to { opacity: 1; transform: translateX(0) scale(1); } }
.toast-success { --toast-color: #16a34a; }
.toast-info { --toast-color: #0284c7; }
.toast-warning { --toast-color: #f59e0b; }
.toast-error { --toast-color: #dc2626; }
.toast-icon { width: 40px; height: 40px; border-radius: 13px; display:flex; align-items:center; justify-content:center; color: #fff; background: var(--toast-color); font-size: 20px; }
.toast-title { font-weight: 700; color: var(--text-main); margin-bottom: 2px; }
.toast-message { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }
.toast-close { border: none; background: transparent; color: var(--text-faint); cursor: pointer; border-radius: 8px; }
.toast-close:hover { background: var(--bg-surface-2); color: var(--text-main); }
.toast-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--toast-color); animation: toastProgress var(--toast-duration) linear forwards; }
@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }

@media (max-width: 640px) {
    .dialog-grid { grid-template-columns: 1fr; }
    .toast-stack { left: 12px; right: 12px; top: 70px; }
}

/* ---------- 26. Goto page, toast prominence, topbar emphasis, mini version icon ---------- */
.pager-goto {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid #cfeedd;
    color: #527160;
    font-size: 12px;
}

.pager-goto input {
    width: 58px;
    height: 28px;
    border: 1px solid #cfeedd;
    border-radius: 7px;
    padding: 0 7px;
    color: var(--text-main);
    background: #fff;
    outline: none;
    text-align:center !important;
    font-weight:700 !important;
    font-size:12px !important;
}

.pager-goto input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.pager-btn.goto {
    background: var(--brand-soft);
    color: var(--brand-700);
    border-color: #bfe8cd;
}

.app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

    .app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-footer i {
        display: inline-flex;
        width: 30px;
        height: 30px;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: transparent;
        color: #283593;
        font-size: 16px;
    }

.app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-footer::after {
    content: none;
}

.app-toast {
    background: #ffffff;
    border-top: 1px solid color-mix(in srgb, var(--toast-color) 30%, #ffffff);
    border-right: 1px solid color-mix(in srgb, var(--toast-color) 30%, #ffffff);
    border-bottom: 1px solid color-mix(in srgb, var(--toast-color) 30%, #ffffff);
    box-shadow: 0 22px 60px rgba(15, 23, 42, .24), 0 0 0 1px rgba(255,255,255,.8) inset;
}

.toast-icon {
    box-shadow: 0 8px 18px color-mix(in srgb, var(--toast-color) 34%, transparent);
}

.toast-title {
    font-size: 14px;
    color: #0f172a;
}

.toast-message {
    font-size: 13px;
    color: #475569;
}

.topbar {
    border-bottom: 1px solid rgba(15, 23, 42, .24);
}

.topbar::after {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand), transparent);
    opacity: .7;
}

/* Topbar rõ ràng, không search, action icon hiện đại */
.topbar {
 
}

.topbar-toggle,
.icon-btn {
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: background var(--transition), color var(--transition), border var(--transition), box-shadow var(--transition), transform var(--transition);
}

.topbar-toggle:hover,
.icon-btn:hover {
    background: var(--brand-soft);
    border-color: var(--brand);
    color: var(--brand-700);
    box-shadow: 0 8px 18px rgba(15, 157, 79, .14);
    transform: translateY(-1px);
}

.topbar-actions { margin-left: auto; }
.breadcrumb-title {
    font-size: 16px;
    font-weight: 500 !important;
    color: #C2185B;
}
.breadcrumb-trail {
    color: #303F9F;
}

/* ---------- 27. Mini lock sau khi chọn menu ---------- */
.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover {
    width: var(--sidebar-w-collapsed);
    box-shadow: 4px 0 20px rgba(15, 23, 42, .08);
}

.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .brand-text,
.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .nav-text,
.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .nav-badge,
.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .nav-caret {
    display: none;
}

.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .nav-link-item {
    justify-content: center;
    padding: 10px;
}

.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .nav-sub {
    display: none;
}

.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .sidebar-footer {
    text-align: center;
    font-size: 0;
}

/* ---------- 28. Scrollbar sidebar, hover table ổn định, tooltip action hiện đại ---------- */
.sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: transparent;
    border: 3px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
    transition: background var(--transition), border var(--transition);
}

.sidebar:hover .sidebar-nav {
    scrollbar-color: rgba(15, 157, 79, .45) transparent;
}

.sidebar:hover .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(15, 157, 79, .36);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.sidebar:hover .sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(10, 110, 55, .68);
    background-clip: padding-box;
}

.grid-table tbody td {
    background-clip: padding-box;
    transition: background-color .12s ease, color .12s ease;
}

.grid-table tbody tr:hover td {
    background: #eefaf3;
    box-shadow: none;
}

.grid-table .sticky-col,
.grid-table .sticky-action {
    isolation: isolate;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: auto;
}

.grid-table tbody tr:hover .sticky-col,
.grid-table tbody tr:hover .sticky-action {
    background: #eefaf3;
}

.grid-table tbody tr:hover .sticky-col {
    background: #e7f6ed;
    box-shadow: inset 3px 0 0 var(--brand), 1px 0 0 var(--border);
}

.grid-table tbody tr:hover .sticky-action {
    box-shadow: -1px 0 0 var(--border);
}

.grid-table .sticky-action,
.row-actions,
.row-action {
    overflow: visible;
}

.row-action {
    position: relative;
}

.row-action[data-tooltip]::before,
.row-action[data-tooltip]::after {
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(6px, -50%) scale(.98);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    z-index: 80;
}

.row-action[data-tooltip]::before {
    content: attr(data-tooltip);
    width: max-content;
    max-width: 220px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, .96);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .24);
}

.row-action[data-tooltip]::after {
    content: "";
    width: 9px;
    height: 9px;
    right: calc(100% + 5px);
    background: rgba(15, 23, 42, .96);
    transform: translate(6px, -50%) rotate(45deg) scale(.98);
    border-radius: 2px;
}

.row-action[data-tooltip]:hover::before,
.row-action[data-tooltip]:hover::after,
.row-action[data-tooltip]:focus-visible::before,
.row-action[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%) scale(1);
}

.row-action[data-tooltip]:hover::after,
.row-action[data-tooltip]:focus-visible::after {
    transform: translate(0, -50%) rotate(45deg) scale(1);
}

/* ---------- InputN ---------- */
.inputn-root {
    position: relative;
    width: 100%;
}

.inputn-shell {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.inputn-shell.disabled {
    opacity: .72;
}

.inputn-shell:focus-within .form-control {
    outline: none;
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px var(--brand-soft), 0 4px 12px rgba(15, 157, 79, .10);
}

.inputn-input {
    padding-right: 74px;
}

.inputn-shell.no-spin .inputn-input {
    padding-right: 42px;
}

.inputn-shell .inputn-input.form-control.inputn-align-right {
    text-align: right;
}

.inputn-shell .inputn-input.form-control.inputn-align-left {
    text-align: left;
}

.inputn-shell .inputn-input.form-control.inputn-align-center {
    text-align: center;
}

.inputn-icon-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-faint);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.inputn-icon-btn:hover:not(:disabled) {
    color: var(--brand-700);
    background: rgba(15, 157, 79, .10);
    box-shadow: 0 6px 14px rgba(15, 157, 79, .12);
}

.inputn-icon-btn.clear {
    right: 44px;
}

.inputn-shell.no-spin .inputn-icon-btn.clear {
    right: 8px;
}

.inputn-spin-wrap {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inputn-spin-btn {
    width: 28px;
    height: 15px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-faint);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.inputn-spin-btn:hover:not(:disabled) {
    color: var(--brand-700);
    background: rgba(15, 157, 79, .10);
    box-shadow: 0 4px 10px rgba(15, 157, 79, .10);
}

.inputn-spin-btn i {
    font-size: 10px;
    line-height: 1;
}

@media (max-width: 640px) {
    .inputn-input {
        padding-right: 72px;
    }

    .inputn-shell.no-spin .inputn-input {
        padding-right: 40px;
    }
}

.topbar {

  
}

/* ---------- 30. Toolbar: nút thêm mới trái, tìm kiếm/actions phải ---------- */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.page-toolbar-create {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.page-toolbar-create .btn-primary {
    min-width: 118px;
    justify-content: center;
}

.toolbar-separator {
    width: 1px;
    align-self: stretch;
    min-height: 32px;
    background: linear-gradient(180deg, transparent, #b9dec6 20%, #b9dec6 80%, transparent);
    flex: 0 0 auto;
}

.page-toolbar-actions {
    flex: 1 1 auto;
    width: auto;
    justify-content: flex-end;
    margin-left: auto;
}

.page-toolbar-actions .toolbar-search {
    margin-right: 0;
}

@media (max-width: 1100px) {
    .page-toolbar {
        align-items: stretch;
    }

    .toolbar-separator {
        width: 100%;
        height: 1px;
        min-height: 1px;
        background: linear-gradient(90deg, transparent, #cfeedd, transparent);
    }

    .page-toolbar-create,
    .page-toolbar-actions {
        width: 100%;
    }

    .page-toolbar-create .btn-primary {
        width: 100%;
    }
}

/* ---------- 31. Toolbar icon-only: search/filter/reload trái, export phải ---------- */
.page-toolbar {
    justify-content: space-between;
    flex-direction: row;
    overflow: visible;
    z-index: 30;
}

.page-toolbar-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}

.page-toolbar-actions {
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
}

.page-toolbar .toolbar-icon-btn {
    min-width: 34px;
    height: 34px;
    padding: 0;
    padding-left: 8px;
    padding-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.page-toolbar .toolbar-icon-btn i {
    margin: 0;
    font-size: 15px;
}

.page-toolbar .toolbar-icon-btn.export i {
    color: #12803c;
}

.page-toolbar .toolbar-add-btn {
    height: 34px;
    min-width: 104px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
}
.btn.btn-primary.toolbar-add-btn:disabled,
.page-toolbar .toolbar-add-btn:disabled{
    background: unset !important;
    background-color: #F5F5F5 !important;
    color: #9E9E9E !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
}

    .page-toolbar .toolbar-add-btn i {
        margin: 0;
        font-size: 15px;
    }

    .page-toolbar .toolbar-add-btn.icon-only {
        min-width: unset;
        padding: 0 8px;
        width: 34px;
    }

.page-toolbar .toolbar-icon-btn .btn-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    margin: 0;
    box-shadow: 0 0 0 2px #fff;
}

.page-toolbar-left .toolbar-search {
    margin-right: 0;
    width: min(380px, 42vw);
}

.page-toolbar-left .cmbgt-root {
    flex: 0 0 auto;
}

.page-toolbar-left .cmbgt-shell {
    min-height: 34px;
    height: 34px;
    border: 1px solid rgba(15, 157, 79, .24);
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f2fbf6 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 4px 14px rgba(15, 157, 79, .08);
}

.page-toolbar-left .cmbgt-shell:hover:not(.disabled):not(.readonly),
.page-toolbar-left .cmbgt-shell:focus-visible,
.page-toolbar-left .cmbgt-shell:focus-within {
    border-color: rgba(15, 157, 79, .48);
    background: linear-gradient(180deg, #ffffff 0%, #eaf8f0 100%);
    box-shadow: 0 0 0 4px var(--brand-soft), 0 9px 22px rgba(15, 157, 79, .14);
}

.page-toolbar-left .cmbgt-shell-main {
    padding-left: 12px;
}

.page-toolbar-left .cmbgt-shell-label,
.page-toolbar-left .cmbgt-icon-btn {
    color: var(--brand-800);
}

.page-toolbar-left .cmbgt-shell-label.is-placeholder {
    color: #6b8f78;
}

.page-toolbar-left .cmbgt-icon-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    border-left: 1px solid rgba(15, 157, 79, .14);
}

.page-toolbar-left .cmbgt-icon-btn:hover {
    background: rgba(15, 157, 79, .08);
    color: var(--brand-700);
}

.toolbar-status-filter {
    position: relative;
    flex: 0 0 auto;
    width: 130px;
    height: 34px;
    display: inline-flex;
    align-items: center;
}


.toolbar-status-trigger {
    width: 100%;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid rgba(15, 157, 79, .24);
    border-radius: 10px;
    padding: 0 10px 0 12px;
    color: var(--brand-800);
    background: linear-gradient(180deg, #ffffff 0%, #f2fbf6 100%);
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    outline: none;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 4px 14px rgba(15, 157, 79, .08);
    transition: border var(--transition), box-shadow var(--transition), background var(--transition), transform var(--transition);
}

.toolbar-status-trigger i {
    flex: 0 0 auto;
    color: var(--brand-700);
    font-size: 13px;
}

.toolbar-status-trigger span {
    flex: 1 1 auto;
    text-align: left;
    white-space: nowrap;
}

.toolbar-status-trigger .chevron {
    font-size: 11px;
    opacity: .76;
    transition: transform var(--transition);
}

.toolbar-status-trigger:hover,
.toolbar-status-filter.open .toolbar-status-trigger {
    border-color: rgba(15, 157, 79, .48);
    background: linear-gradient(180deg, #ffffff 0%, #eaf8f0 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 7px 18px rgba(15, 157, 79, .13);
}

.toolbar-status-trigger:focus-visible {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px var(--brand-soft), 0 9px 22px rgba(15, 157, 79, .14);
}

.toolbar-status-filter.open .toolbar-status-trigger .chevron {
    transform: rotate(180deg);
}

.toolbar-status-filter:focus-within {
    transform: translateY(-1px);
}

.toolbar-status-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 164px;
    padding: 5px;
    border: 1px solid rgba(15, 157, 79, .18);
    border-radius: 12px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 14px 30px rgba(15, 23, 42, .14), 0 5px 14px rgba(15, 157, 79, .1);
    z-index: 500;
    animation: toolbar-status-pop .14s ease both;
}

.toolbar-status-item {
    width: 100%;
    height: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 9px;
    padding: 0 9px;
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

.toolbar-status-item:hover {
    background: #eef9f2;
    color: var(--brand-800);
    transform: translateX(1px);
}

.toolbar-status-item.active {
    background: linear-gradient(135deg, var(--brand-soft), #e8f8ef);
    color: var(--brand-800);
    font-weight: 500;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    flex: 0 0 auto;
    background: var(--text-faint);
    box-shadow: 0 0 0 4px rgba(100, 116, 139, .1);
}

.status-dot.all { background: var(--brand); box-shadow: 0 0 0 4px rgba(15, 157, 79, .11); }
.status-dot.active { background: var(--success); box-shadow: 0 0 0 4px rgba(34, 197, 94, .12); }
.status-dot.inactive { background: #94a3b8; box-shadow: 0 0 0 4px rgba(148, 163, 184, .14); }

@keyframes toolbar-status-pop {
    from { opacity: 0; transform: translateY(-4px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.page-toolbar .toolbar-separator,
.page-toolbar-create {
    display: none;
}

@media (max-width: 1100px) {
    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .page-toolbar-left,
    .page-toolbar-actions {
        width: 100%;
    }

    .page-toolbar-left .toolbar-search {
        flex: 1 1 auto;
        width: auto;
    }

    .toolbar-status-filter {
        flex: 0 0 154px;
        width: 154px;
    }

    .page-toolbar-actions {
        justify-content: flex-end;
    }
}

/* ---------- 32. Tooltip hiện đại cho toolbar và filter ---------- */
.page-toolbar [data-tooltip],
.page-filter .btn[data-tooltip] {
    position: relative;
    overflow: visible;
}


.page-toolbar [data-tooltip]::before,
.page-toolbar [data-tooltip]::after,
.page-filter .btn[data-tooltip]::before,
.page-filter .btn[data-tooltip]::after {
    position: absolute;
    left: 50%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    z-index: 120;
}

.page-toolbar [data-tooltip]::before,
.page-filter .btn[data-tooltip]::before {
    content: attr(data-tooltip);
    top: calc(100% + 10px);
    width: max-content;
    max-width: 240px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, .96);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .24);
    transform: translate(-50%, -4px) scale(.98);
}

.page-toolbar [data-tooltip]::after,
.page-filter .btn[data-tooltip]::after {
    content: "";
    top: calc(100% + 6px);
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: rgba(15, 23, 42, .96);
    transform: translate(-50%, -4px) rotate(45deg) scale(.98);
}

.page-toolbar [data-tooltip]:hover::before,
.page-toolbar [data-tooltip]:hover::after,
.page-toolbar [data-tooltip]:focus-visible::before,
.page-toolbar [data-tooltip]:focus-visible::after,
.page-filter .btn[data-tooltip]:hover::before,
.page-filter .btn[data-tooltip]:hover::after,
.page-filter .btn[data-tooltip]:focus-visible::before,
.page-filter .btn[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
}

.page-toolbar [data-tooltip]:hover::before,
.page-toolbar [data-tooltip]:focus-visible::before,
.page-filter .btn[data-tooltip]:hover::before,
.page-filter .btn[data-tooltip]:focus-visible::before {
    transform: translate(-50%, 0) scale(1);
}

.page-toolbar [data-tooltip]:hover::after,
.page-toolbar [data-tooltip]:focus-visible::after,
.page-filter .btn[data-tooltip]:hover::after,
.page-filter .btn[data-tooltip]:focus-visible::after {
    transform: translate(-50%, 0) rotate(45deg) scale(1);
}

/* ---------- 33. Smart tooltip fixed: không bị overflow che khuất ---------- */
.smart-tooltip-ready .row-action[data-tooltip]::before,
.smart-tooltip-ready .row-action[data-tooltip]::after,
.smart-tooltip-ready .page-toolbar [data-tooltip]::before,
.smart-tooltip-ready .page-toolbar [data-tooltip]::after,
.smart-tooltip-ready .page-filter .btn[data-tooltip]::before,
.smart-tooltip-ready .page-filter .btn[data-tooltip]::after {
    display: none !important;
    content: none !important;
}

.smart-tooltip {
    --tip-arrow-x: 50%;
    position: fixed;
    z-index: 4000;
    max-width: min(260px, calc(100vw - 24px));
    width: max-content;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, .96);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .28);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-3px) scale(.98);
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.smart-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.smart-tooltip::after {
    content: "";
    position: absolute;
    left: var(--tip-arrow-x);
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: rgba(15, 23, 42, .96);
    transform: translateX(-50%) rotate(45deg);
}

.smart-tooltip[data-placement="bottom"]::after {
    top: -4px;
}

.smart-tooltip[data-placement="top"]::after {
    bottom: -4px;
}

/* ---------- 34. Mini sidebar separator + bright tooltip polish ---------- */
.app-shell.sidebar-collapsed .sidebar:not(:hover) {
    border-right: 1px solid rgba(108, 149, 125, .92);
    background: linear-gradient(180deg, rgba(231,239,234,.95) 0%, rgba(214,227,220,.94) 52%, rgba(201,217,208,.96) 100%);
    box-shadow: 0 22px 48px rgba(15, 23, 42, .11), 7px 0 20px rgba(15, 157, 79, .08);
    backdrop-filter: blur(12px) saturate(1.03);
}

.app-shell.sidebar-collapsed .sidebar:not(:hover)::before {
    opacity: .95;
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(34, 197, 94, .08), rgba(12, 74, 31, 0));
    transform: none;
    filter: blur(.3px);
}

.app-shell.sidebar-collapsed .sidebar:not(:hover)::after {
    content: "";
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    right: auto;
    background:
        radial-gradient(circle at 50% 6%, rgba(255,255,255,.26), transparent 18%),
        radial-gradient(circle at 50% 52%, rgba(34, 197, 94, .06), transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(15, 157, 79, .10), transparent 22%),
        linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0));
    pointer-events: none;
}

.app-shell.sidebar-collapsed .sidebar:not(:hover) .nav-link-item.active {
    background: linear-gradient(180deg, rgba(250,255,251,.84), rgba(227,239,232,.94));
    border: 1px solid rgba(101, 178, 129, .42);
    box-shadow: 0 12px 24px rgba(15, 157, 79, .14), 0 5px 12px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.app-shell.sidebar-collapsed .sidebar:not(:hover) .nav-link-item.active .nav-icon {
    background: linear-gradient(135deg, #22c55e, #0b7a3a);
    color: #fff;
    box-shadow: 0 12px 22px rgba(15, 157, 79, .26), 0 0 0 5px rgba(34, 197, 94, .08);
    transform: translateY(-1px) scale(1.08);
}

.app-shell.sidebar-collapsed .sidebar:not(:hover) .nav-link-item.active::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 7px;
    width: 24px;
    height: calc(100% - 14px);
    transform: translateX(-50%);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(34, 197, 94, .14), rgba(34, 197, 94, .03));
    filter: blur(8px);
    z-index: 0;
    pointer-events: none;
}

/* ---------- 35. Sidebar hover cinematic polish ---------- */
.sidebar {
    isolation: isolate;
    overflow: hidden;
    transition: width .28s cubic-bezier(.22, 1, .36, 1),
                transform .28s cubic-bezier(.22, 1, .36, 1),
                box-shadow .30s cubic-bezier(.22, 1, .36, 1),
                background .30s cubic-bezier(.22, 1, .36, 1),
                filter .30s cubic-bezier(.22, 1, .36, 1);
}

.sidebar::before,
.sidebar::after {
    transition: opacity .30s cubic-bezier(.22, 1, .36, 1),
                transform .34s cubic-bezier(.22, 1, .36, 1),
                filter .34s cubic-bezier(.22, 1, .36, 1),
                background .30s cubic-bezier(.22, 1, .36, 1);
}

.sidebar::after {
    background:
        radial-gradient(circle at 18% 8%, rgba(15, 157, 79, .16), transparent 36%),
        radial-gradient(circle at 88% 92%, rgba(6, 95, 47, .08), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(243,249,245,.98));
}

.sidebar::before {
    background: linear-gradient(180deg, rgba(12, 74, 31, 0), rgba(12, 74, 31, .14), rgba(12, 74, 31, 0));
    opacity: .75;
}

.sidebar:hover {
    box-shadow: 0 28px 60px rgba(15, 23, 42, .18), 12px 0 30px rgba(15, 157, 79, .18) !important;
    filter: saturate(1.04);
}

.sidebar:hover::after {
    background:
        radial-gradient(circle at 20% 8%, rgba(15, 157, 79, .22), transparent 38%),
        radial-gradient(circle at 88% 92%, rgba(6, 95, 47, .14), transparent 32%),
        linear-gradient(180deg, rgba(238,247,241,.99), rgba(228,242,233,.99));
    transform: scale(1.015);
}

.sidebar:hover::before {
    opacity: 1;
    transform: translateX(2px) scaleY(1.02);
    filter: blur(.4px);
}

.sidebar-brand,
.sidebar-pin-btn,
.nav-link-item,
.nav-link-item .nav-icon,
.nav-sub,
.sidebar-footer {
    transition: background .24s cubic-bezier(.22, 1, .36, 1),
                color .24s cubic-bezier(.22, 1, .36, 1),
                border-color .24s cubic-bezier(.22, 1, .36, 1),
                box-shadow .30s cubic-bezier(.22, 1, .36, 1),
                transform .30s cubic-bezier(.22, 1, .36, 1),
                opacity .22s ease;
}

.sidebar:hover .sidebar-brand {
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(240,248,243,.98));
    border-bottom-color: #b8dfc6;
    box-shadow: 0 12px 24px rgba(15, 157, 79, .08);
}

.sidebar:hover .sidebar-pin-btn {
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(234,247,239,.98));
    border-color: #8fd1a5;
    box-shadow: 0 10px 22px rgba(15, 157, 79, .14);
}

.sidebar:hover .nav-link-item {
    border-color: rgba(143, 209, 165, .16);
}

.sidebar:hover .nav-link-item:hover {
    background: linear-gradient(135deg, #d8f3e3 0%, #f8fdf9 100%);
    border-color: #7dc895;
    color: #064e26;
    transform: translateX(8px) scale(1.012);
    box-shadow: 0 16px 30px rgba(15, 157, 79, .18), 0 8px 18px rgba(15, 23, 42, .08);
}

.sidebar:hover .nav-link-item.active {
    background: linear-gradient(135deg, #bfe9ce 0%, #effaf2 100%);
    color: #053b1d;
    border-color: #67bd82;
    transform: translateX(6px) scale(1.01);
    box-shadow: inset 4px 0 0 var(--brand), 0 18px 34px rgba(15, 157, 79, .18), 0 10px 18px rgba(15, 23, 42, .08);
}

.sidebar:hover .nav-link-item:hover .nav-icon,
.sidebar:hover .nav-link-item.active .nav-icon {
    transform: translateY(-1px) scale(1.08);
    box-shadow: 0 10px 18px rgba(15, 157, 79, .24);
}

.sidebar:hover .nav-sub .nav-link-item:hover,
.sidebar:hover .nav-sub .nav-link-item.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, .16), rgba(255,255,255,.90));
    border-color: rgba(34, 197, 94, .26);
    transform: translateX(4px);
}

.app-shell.sidebar-overlay .sidebar-backdrop {
    background: radial-gradient(circle at left center, rgba(15, 23, 42, .20), rgba(15, 23, 42, .52) 52%, rgba(2, 6, 23, .72) 100%);
    backdrop-filter: blur(10px) saturate(1.06);
    transition: opacity .30s cubic-bezier(.22, 1, .36, 1), background .30s cubic-bezier(.22, 1, .36, 1), backdrop-filter .30s cubic-bezier(.22, 1, .36, 1);
}

.app-shell.sidebar-overlay .sidebar:hover ~ .sidebar-backdrop,
.app-shell.sidebar-overlay .sidebar-backdrop:hover {
    background: radial-gradient(circle at left center, rgba(15, 23, 42, .28), rgba(15, 23, 42, .62) 52%, rgba(2, 6, 23, .82) 100%);
    backdrop-filter: blur(14px) saturate(1.12);
}

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .sidebar::before,
    .sidebar::after,
    .sidebar-brand,
    .sidebar-pin-btn,
    .nav-link-item,
    .nav-link-item .nav-icon,
    .nav-sub,
    .sidebar-footer,
    .sidebar-backdrop {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* ---------- Modal bright modern override ---------- */
.app-dialog-backdrop:not(.danger) {
  
}

.app-dialog {
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(242,247,244,.88));
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 16px;
    box-shadow: 0 34px 96px rgba(15, 23, 42, .24), 0 14px 34px rgba(15, 157, 79, .10), 0 1px 0 rgba(255,255,255,.48) inset;
    animation: dialogPop .15s cubic-bezier(.22, 1, .36, 1) both;
    will-change: transform, opacity;
}

.app-dialog::before {
    background: radial-gradient(circle at top left, rgba(255,255,255,.22), transparent 18%),
                radial-gradient(circle at bottom right, rgba(34, 197, 94, .10), transparent 26%),
                linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0));
}

.app-dialog-header {
    min-height: 45px;
    padding: 0 15px;
    background: linear-gradient(180deg, rgba(255,255,255,.74), rgba(232,241,236,.70));
    border-bottom: 1px solid rgba(181, 214, 194, .54);
}

.dialog-title {
    gap: 13px;
    font-weight: 800;
    letter-spacing: -.015em;
    user-select: none;
}

.dialog-title i {
    width: 30px;
    height: 30px;
    border-radius: 13px;
    box-shadow: 0 12px 24px rgba(15, 157, 79, .24);
}

.dialog-close {
    width: 30px;
    height: 30px;
    border-radius: 13px;
    background: rgba(255,255,255,.62);
    border-color: rgba(226, 232, 240, .92);
}

.dialog-close:hover {
    box-shadow: 0 12px 24px rgba(239, 68, 68, .14);
    transform: translateY(-1px) scale(1.03);
}

.app-dialog-body {
    padding: 10px 15px;
}

.app-dialog-footer {
    gap: 10px;
    padding: 5px 20px;
    background: linear-gradient(180deg, rgba(242,247,244,.58), rgba(233,241,236,.78));
    border-top: 1px solid rgba(196, 224, 207, .62);
}

.app-dialog-footer .btn {
    height: 35px;
    padding: 0 15px;
    border-radius: 13px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.smart-tooltip {
    padding: 12px 15px;
    min-width: 136px;
    max-width: min(300px, calc(100vw - 24px));
    border: 1px solid rgba(227, 236, 231, .96);
    background: linear-gradient(180deg, rgba(252,254,253,.98), rgba(243,248,245,.96));
    color: #0f2a1b;
    font-size: 12.85px;
    font-weight: 700;
    letter-spacing: .012em;
    line-height: 1.42;
    box-shadow: 0 20px 40px rgba(15, 23, 42, .12), 0 1px 0 rgba(255,255,255,.86) inset;
    backdrop-filter: blur(10px) saturate(1.06);
    border-radius: 16px;
    transform: translateY(-6px) scale(.96);
    transition: opacity .22s cubic-bezier(.22, 1, .36, 1), transform .22s cubic-bezier(.22, 1, .36, 1), visibility .22s cubic-bezier(.22, 1, .36, 1), box-shadow .22s cubic-bezier(.22, 1, .36, 1), background .22s cubic-bezier(.22, 1, .36, 1);
}

.smart-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    box-shadow: 0 24px 46px rgba(15, 23, 42, .14), 0 1px 0 rgba(255,255,255,.86) inset;
}

.smart-tooltip::after {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: linear-gradient(135deg, rgba(252,254,253,.98), rgba(243,248,245,.96));
    border: 1px solid rgba(227, 236, 231, .96);
    box-shadow: 4px 4px 10px rgba(15, 23, 42, .05);
}
.smart-tooltip[data-placement="bottom"]::after {
    border-left: 0;
    border-bottom: 0;
}

.smart-tooltip[data-placement="top"]::after {
    border-right: 0;
    border-top: 0;
}

/* ---------- 35. InputD - lịch ngày giờ thông minh ---------- */
.inputd-root {
    position: relative;
    width: 100%;
}

.inputd-shell {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.inputd-shell .inputd-input {
    padding-right: 60px;
    height:34px;
}
    .inputd-shell input.inputd-input::placeholder {
        font-size:11px !important;
    }

.inputd-input.inputd-align-center {
    text-align: center;
}

.inputd-shell.disabled {
    opacity: .72;
}

.inputd-shell:focus-within .form-control {
    outline: none;
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 4px var(--brand-soft), 0 4px 12px rgba(15, 157, 79, .10);
}

.inputd-icon-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 26px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #BDBDBD;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.inputd-icon-btn:hover:not(:disabled) {
    color: var(--brand-700);
    background: rgba(15, 157, 79, .10);
    box-shadow: 0 6px 14px rgba(15, 157, 79, .12);
}

.inputd-icon-btn:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.inputd-icon-btn.clear { right: 32px; }
.inputd-icon-btn.toggle { right: 8px; }

.inputd-popup-host {
    position: absolute;
    inset: 0;
    width: 0;
    height: 0;
    overflow: visible;
}

.inputd-popup {
    position: fixed;
    width: min(326px, calc(100vw - 16px));
    min-width: 264px;
    border-radius: 17px;
    border: 1px solid rgba(203, 213, 225, .92);
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 38px rgba(15, 23, 42, .12), 0 1px 0 rgba(255,255,255,.7) inset;
    padding: 10px;
    z-index: 5000;
    opacity: 0;
    transform: translateY(8px) scale(.985);
    transition: opacity .16s cubic-bezier(.2,.9,.2,1), transform .16s cubic-bezier(.2,.9,.2,1), box-shadow .18s ease;
    backdrop-filter: blur(8px) saturate(1.02);
    overflow: hidden;
}

.inputd-popup.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.inputd-popup[data-place="top"] { transform-origin: bottom center; }
.inputd-popup[data-place="bottom"] { transform-origin: top center; }

.inputd-popup::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 17px;
    border: 1px solid rgba(255, 255, 255, .78);
    pointer-events: none;
}

.inputd-popup::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 46px;
    background: linear-gradient(180deg, rgba(15, 157, 79, .045), transparent);
    pointer-events: none;
}

.inputd-popup-head {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
    z-index: 2;
}

.inputd-popup-head.modern-v6 {
    padding: 0 0 8px;
    border-bottom: 1px solid #edf2f7;
}

.inputd-toolbar-row.final {
    display: grid;
    gap: 6px;
    align-items: center;
}

.inputd-toolbar-row.final.top {
    grid-template-columns: 30px 30px minmax(0, 1fr) 30px 30px;
}

.inputd-toolbar-row.final.bottom {
    grid-template-columns: minmax(0, 1fr) 98px;
}

.inputd-nav-btn {
    width: 30px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(203, 213, 225, .92);
    background: #fff;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border var(--transition), background var(--transition), color var(--transition);
}

.inputd-nav-btn.year {
    color: #475569;
    background: #f8fafc;
}

.inputd-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, .08);
    border-color: rgba(15, 157, 79, .24);
    color: var(--brand-700);
    background: #f8fcf9;
}

.inputd-dd {
    position: relative;
    min-width: 0;
}

.inputd-dd.year {
    min-width: 98px;
}

.inputd-dd-trigger {
    width: 100%;
    height: 32px;
    border-radius: 10px;
    border: 1px solid #d9e5dd;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: border var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}

.inputd-dd-trigger:hover,
.inputd-dd.open .inputd-dd-trigger {
    border-color: rgba(15, 157, 79, .26);
    box-shadow: 0 0 0 3px rgba(15, 157, 79, .08);
    background: #fff;
}

.inputd-dd-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inputd-dd-caret {
    font-size: 11px;
    color: #94a3b8;
    transition: transform var(--transition), color var(--transition);
    flex-shrink: 0;
}

.inputd-dd.open .inputd-dd-caret {
    transform: rotate(180deg);
    color: var(--brand-700);
}

.inputd-dd-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 100%;
    max-height: 220px;
    overflow: auto;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #dce6df;
    background: #fff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .12);
    z-index: 25;
}

.inputd-dd-menu.month-menu {
    width: 162px;
}

.inputd-dd-menu.year-menu {
    width: 98px;
}

.inputd-dd-item {
    width: 100%;
    min-height: 32px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #334155;
    text-align: left;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: background var(--transition), border var(--transition), color var(--transition), transform var(--transition);
}

.inputd-dd-item:hover {
    background: #f6fbf8;
    border-color: #d7e7de;
    color: var(--brand-700);
}

.inputd-dd-item.active {
    background: #e8f5ed;
    border-color: #8fc9a3;
    color: #0f5132;
    font-weight: 500;
}

.inputd-head-inline-note {
    min-width: 0;
    padding: 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    letter-spacing: 1px;
}

.inputd-time-panel {
    position: relative;
    z-index: 1;
    margin-bottom: 5px;
    padding: 7px 8px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, .95);
    background: #f9fcfa;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}


.inputd-time-panel.compact-only {
    margin-bottom: 4px;
}

.inputd-mini-link {
    border: 0;
    background: transparent;
    color: #E64A19;
    font-size: 11px;
    font-weight: 400;
    cursor: pointer;
    padding: 0 2px;
    white-space: nowrap;
}

.inputd-mini-link.now-inline {
    justify-self: end;
    align-self: center;
}

.inputd-time-editor {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.inputd-time-editor.compact-only {
    gap: 6px;
}

.inputd-time-editor.with-now {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
}

.inputd-time-split {
    padding-bottom: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--brand-700);
    align-self: center;
}

.inputd-time-input.compact {
    height: 29px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    padding: 0 6px;
    border: 0px !important;
    color: #303F9F !important;
}

.inputd-weekdays,
.inputd-days-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.inputd-weekdays { margin-bottom: 3px; }
.inputd-weekday {
    text-align: center;
    font-size: 9px;
    font-weight: 800;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: .22px;
    padding: 1px 0;
}

.inputd-day {
    position: relative;
    min-height: 31px;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    background: #fff;
    color: var(--text-main);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border .16s ease, background .16s ease, color .16s ease;
}

.inputd-day:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: #cfe6d7;
    background: #f6fbf8;
    color: var(--text-main);
    box-shadow: 0 6px 12px rgba(15, 23, 42, .06);
}

.inputd-day.muted {
    color: #9aa7b8;
    background: #f8fafc;
    border-color: #f1f5f9;
}

.inputd-day.today {
    border-color: rgba(225, 38, 47, .18);
    background: #fff8f8;
}

.inputd-day.selected {
    background: #e8f5ed;
    border-color: #8fc9a3;
    color: #0f5132;
    box-shadow: inset 0 0 0 1px rgba(15, 157, 79, .06);
}

.inputd-day.selected:hover:not(:disabled) {
    background: #dff1e6;
    border-color: #6db98a;
    color: #0c4430;
    box-shadow: 0 6px 12px rgba(15, 23, 42, .06);
}

.inputd-day.disabled {
    opacity: .38;
    cursor: not-allowed;
    box-shadow: none;
}

.inputd-day .day-no {
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

.inputd-day .day-dot {
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    opacity: .78;
}

.inputd-popup-foot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid rgba(15, 157, 79, .10);
}

.inputd-foot-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.inputd-foot-btn {
    height: 30px;
    border-radius: 10px;
    padding: 0 10px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400;
    transition: transform var(--transition), box-shadow var(--transition), border var(--transition), background var(--transition), color var(--transition);
}

.inputd-foot-btn:hover { transform: translateY(-1px); }

.inputd-foot-btn.ghost,
.inputd-foot-btn.clear {
    background: rgba(255,255,255,.95);
    border-color: rgba(15, 157, 79, .13);
    color: var(--text-main);
}

.inputd-foot-btn.ghost:hover,
.inputd-foot-btn.clear:hover {
    border-color: rgba(15, 157, 79, .26);
    box-shadow: 0 8px 16px rgba(15, 157, 79, .10);
    color: var(--brand-700);
}

.inputd-foot-btn.primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
    color: #fff;
    box-shadow: 0 10px 18px rgba(15, 157, 79, .20);
}

.inputd-foot-btn.primary:hover {
    box-shadow: 0 14px 24px rgba(15, 157, 79, .28);
}

@media (max-width: 640px) {
    .inputd-popup {
        width: min(320px, calc(100vw - 12px));
        padding: 10px;
    border-radius: 16px;
}

/* Cưỡng chế mini sidebar sau khi bấm menu: khóa hover cho tới khi chuột rời sidebar. */
.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar,
.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover {
    width: var(--sidebar-w-collapsed) !important;
    min-width: var(--sidebar-w-collapsed) !important;
    max-width: var(--sidebar-w-collapsed) !important;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .10) !important;
    filter: none !important;
}

.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .brand-text,
.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .nav-text,
.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .nav-badge,
.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .nav-caret,
.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .nav-section-title-text {
    display: none !important;
}

.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .nav-sub {
    display: none !important;
}

.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .nav-link-item {
    justify-content: center !important;
    padding: 11px !important;
    transform: none !important;
}

.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .sidebar-brand {
    justify-content: center !important;
    padding: 12px !important;
}

.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .sidebar-footer {
    text-align: center !important;
    font-size: 0 !important;
}

.app-shell.sidebar-mini-locked.sidebar-collapsed .sidebar:hover .sidebar-footer::after {
    content: "v1.0" !important;
    font-size: 10px !important;
}

    .inputd-time-list-wrap {
        grid-template-columns: 1fr;
    }

    .inputd-popup-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .inputd-foot-actions {
        width: 100%;
        justify-content: stretch;
    }

    .inputd-foot-actions .inputd-foot-btn,
    .inputd-popup-foot > .inputd-foot-btn {
        flex: 1 1 0;
    }
}


/* CSS for PageDanhMucChuHang component */
td.colMaDanhMuc {
    width: 200px !important;
    font-weight: 600 !important;
    padding-left: 10px !important;
    color: #283593 !important;
}

td.colTrangThaiDanhMuc {
    width: 160px !important;
    text-align: center;
}

    td.colTrangThaiDanhMuc .status-badge {
        font-size:11px !important;
        font-weight:400 !important;
    }

td.colNguoiEdit {
    width: 150px !important;
    text-align: center;
}

td.colNgayEdit {
    width: 150px !important;
    text-align: center;
}

/* ── RadioLoaiHang segment ── */
.radio-loaihang {
    display: inline-flex;
    gap: 3px;
    background: var(--bg-surface-2, #f1f5f9);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid var(--border);
}

.radio-loaihang.is-disabled {
    opacity: .55;
    pointer-events: none;
}

.rlg-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .18s ease;
    user-select: none;
    white-space: nowrap;
}

.rlg-item:hover {
    color: var(--text-main);
    background: rgba(15, 157, 79, .06);
}

.rlg-item.active {
    color: #fff;
    font-weight: 600;
    background: var(--brand, #0f9d4f);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 2px 8px rgba(15, 157, 79, .35);
}

.rlg-item input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rlg-item i {
    font-size: 13px;
    transition: color .18s;
}

/* ── Dialog action buttons ── */
.btn-save-draft {
    height: 38px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all .18s ease;
    white-space: nowrap;
}
.btn-save-draft:hover {
    border-color: var(--brand);
    color: var(--brand);
    background: rgba(15, 157, 79, .04);
    box-shadow: 0 2px 8px rgba(15, 157, 79, .08);
}
.btn-save-draft:active {
    transform: scale(.97);
}

.btn-send {
    height: 38px;
    padding: 0 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: linear-gradient(135deg, var(--brand) 0%, #0b8a42 100%);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all .18s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(15, 157, 79, .25), 0 6px 16px rgba(15, 157, 79, .12);
}
.btn-send:hover {
    background: linear-gradient(135deg, #11b35a 0%, #0d9d4d 100%);
    box-shadow: 0 4px 12px rgba(15, 157, 79, .35), 0 8px 24px rgba(15, 157, 79, .18);
    transform: translateY(-1px);
}
.btn-send:active {
    transform: scale(.97);
}
.btn-send:disabled {
    opacity: .55;
    pointer-events: none;
    transform: none;
}

.btn-send.btn-lg {
    height: 46px;
    padding: 0 26px;
    border-radius: 14px;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(15, 157, 79, .30), 0 8px 28px rgba(15, 157, 79, .16);
}

/* ── Row Action Menu ── */
.ram-trigger {
    width: 100%;
    height: 100%;
    min-height: 30px;
    padding: 0 10px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #2E7D32;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: all .18s ease;
}
    .ram-trigger i {
        font-size: 14px;
        color: #00796B;
        transition: color .18s;
    }
    .ram-trigger:hover {
        background: #FFEBEE;
        color: #C62828;
    }
.ram-trigger:hover i {
    color: #0d9046;
}

.ram-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: transparent;
}

.ram-menu {
    position: fixed;
    z-index: 9999;
    min-width: 130px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, .12), 0 12px 40px rgba(15, 23, 42, .10), 0 0 0 1px rgba(15, 23, 42, .04);
    padding: 0px;
    animation: ramFadeIn .15s ease;
}
@keyframes ramFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.ram-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 14px;
    border: none; border-radius: 9px;
    background: transparent;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .12s, color .12s, padding .12s;
    white-space: nowrap;
    text-align: left;
}
.ram-item i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    color: #94a3b8;
    transition: color .12s, transform .12s;
}
.ram-item:hover {
    background: #ecfdf5;
    color: #0d9046;
    padding-left: 18px;
}
.ram-item:hover i {
    color: #0d9046;
    transform: scale(1.1);
}
.ram-item:disabled {
    opacity: .35;
    pointer-events: none;
}

/* Highlight row khi menu đang mở — giống màu hover */
tr.ram-highlight-row td {
    background: var(--brand-soft) !important;
    border-top: 1px dashed #81C784 !important;
    border-bottom: 1px dashed #81C784 !important;
}
tr.ram-highlight-row td:first-child {
    border-left:3px solid #0f9d4f !important;
}

/* Row đánh dấu nổi bật */
tr.row-danh-dau td {
    background-color: #fef9c3 !important;
}
tr.row-danh-dau td:first-child {
    border-left: 3px solid #facc15 !important;
}

/* Spinner */
.spinner-border {
    display: inline-block;
    border: 3px solid #e0e0e0;
    border-top-color: var(--brand, #1976d2);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

/* Sticky left column */
td.sticky-left {
    position: sticky !important;
    left: 0 !important;
    z-index: 4;
    background: #fff !important;
    box-shadow: 1px 0 0 var(--border);
}
th.sticky-left {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 9;
    background: #fff !important;
    box-shadow: 1px 0 0 var(--border), 0 1px 0 rgba(10,110,55,.35), 0 5px 1px rgba(15,157,79,.16) !important;
}

.divGhiChu,
.divTacNghiep {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.divGhiChu {
    margin-top: 5px;
    color: #512DA8;
    font-size: 11px;
}

.colMaDanhMuc.colSoQT {
    font-size: 12px;
}
.colMaDanhMuc.colSoQT input {
    position: absolute !important;
    top: 0px !important;
    right: 0px !important;
}

    .colMaDanhMuc.colSoQT .khsqt {
        display: block;
        margin-top: 3px;
        font-size: 12px;
        font-weight: 400;
        color: #000000;
    }
    .colMaDanhMuc.colSoQT .khch {
        margin-top: 3px;
        margin-bottom: 3px;
        display: block;
        color: #D32F2F;
        font-size: 12px;
        font-weight: 400;
    }

/*#grid-botrixe .grid-table tr tbody tr:first-child td:first-child {
    margin-top: 20px !important;
    padding-top: 20px !important;
    background-color: red !important;
} */

/* ═══════════════════════════════════════════════════════════
   THẢO LUẬN - Slide Panel (WebAppNextGen style)
   ═══════════════════════════════════════════════════════════ */

/* Overlay */
.tl-overlay {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(2px);
    animation: tlFadeIn .25s ease;
}
@keyframes tlFadeIn { from { opacity: 0 } to { opacity: 1 } }

/* Panel chính */
.tl-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 9991;
    width: 750px; max-width: 100vw;
    background: var(--bg-body);
    box-shadow: var(--shadow-lg), -8px 0 32px rgba(15, 23, 42, .15);
    display: flex; flex-direction: column;
    animation: tlSlideIn .3s cubic-bezier(.22, .61, .36, 1);
}
@keyframes tlSlideIn { from { transform: translateX(104%) } to { transform: translateX(0) } }

/* Header */
.tl-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.tl-header-left {
    display: flex; align-items: center; gap: 10px;
    font-size: 16px; font-weight: 700; color: var(--text-main);
    letter-spacing: -.2px;
}
.tl-header-left i { font-size: 20px; color: var(--brand); }

.tl-close-btn {
    width: 34px; height: 34px; border: none; border-radius: var(--radius-sm);
    background: transparent; color: var(--text-faint); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; transition: all var(--transition);
}
.tl-close-btn:hover { background: var(--brand-red-soft); color: var(--brand-red); }

/* Filter bar */
.tl-filters {
    display: flex; gap: 8px; padding: 12px 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0; overflow-x: auto;
}
.tl-filter-sel {
    flex: 1; min-width: 0;
    padding: 7px 12px; font-size: 12.5px; font-weight: 500;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg-body); color: var(--text-main);
    cursor: pointer; outline: none;
    transition: all var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    padding-right: 28px;
}
.tl-filter-sel:hover { border-color: var(--border-strong); }
.tl-filter-sel:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* List container */
.tl-list {
    flex: 1; overflow-y: auto; padding: 10px;
    display: flex; flex-direction: column; gap: 12px;
}

.tl-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 64px 0; gap: 12px; color: var(--text-faint); font-size: 14px;
}

/* ══════ CARD ══════ */
.tl-card {
    background: var(--bg-surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.tl-card:hover {
    border-color: var(--brand);
    box-shadow: 0 4px 24px rgba(15, 157, 79, .08), 0 1px 3px rgba(15, 23, 42, .06);
}
.tl-card--expanded {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow-md);
}

/* Top bar: priority badge + category + status + action icons */
.tl-card-top {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 18px 4px;
    flex-wrap: wrap;
    user-select:none;
}
.tl-card-phanloai {
    font-size: 12px; font-weight: 500; color: var(--text-muted);
    flex-shrink: 0;
}
.tl-card-phanloai::before {
    content: '·'; display: inline-block; margin-right: 5px; color: var(--text-faint);
    display:none;
}

/* Body */
.tl-card-body {
    padding: 8px 18px 14px; cursor: pointer;
    transition: background .15s;
}
.tl-card-body:hover { background: var(--bg-surface-2); }

.tl-content {
    font-size: 14px; color: var(--text-main);
    line-height: 1.65; word-break: break-word;
}
.tl-content p { margin: 0 0 8px; }
.tl-content p:last-child { margin-bottom: 0; }

/* Meta row: avatar + name + time */
.tl-meta {
    display: flex; align-items: center; gap: 6px; margin-top: 10px;
    font-size: 12px; color: var(--text-muted);
}
.tl-meta-name { font-weight: 600; color: var(--text-main); }
.tl-meta-time { color: var(--text-faint); }
.tl-meta-time::before { content: '·'; margin-right: 6px; color: var(--text-faint); }

.tl-meta span { display: inline-flex; align-items: center; gap: 5px; }
.tl-meta i { font-size: 11px; color: var(--text-faint); }

/* Priority dot */
.tl-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; flex-shrink: 0;
    color: var(--text-main);
}
.tl-badge::before {
    content: ''; display: inline-block;
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
    display:none;
}
.tl-badge--khancap::before    { background: #ef4444; }
.tl-badge--cao::before        { background: #f59e0b; }
.tl-badge--binhthuong::before { background: #64748b; }
.tl-badge--thap::before       { background: #10b981; }

/* Status dot */
.tl-card-status {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 500; flex-shrink: 0;
    color: var(--text-muted);
}
.tl-card-status::before {
    content: ''; display: inline-block;
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.tl-status--dangmo::before  { background: #94a3b8; }
.tl-status--daxuly::before  { background: var(--success); }

/* Reply block */
.tl-reply {
    margin: 6px 18px 12px; padding: 12px 16px;
    background: var(--bg-surface-2);
    border-left: 3px solid var(--brand);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    transition: background var(--transition);
}
.tl-reply:hover { background: var(--brand-soft); }
.tl-reply-label {
    display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
    font-size: 12px; font-weight: 600; color: var(--text-muted);user-select:none;
}
.tl-reply-time { font-weight: 400; color: var(--text-faint); }

/* Icon action buttons (reply / delete) */
.tl-icon-btn {
    width: 34px; height: 34px; border: 1.5px solid transparent; border-radius: var(--radius-sm);
    background: transparent; color: var(--text-faint); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; transition: all var(--transition);
}
.tl-icon-btn:hover { border-color: var(--border); background: var(--bg-surface-2); color: var(--brand); }
.tl-icon-btn:active { transform: scale(.94); }
.tl-icon-btn--danger:hover { border-color: #fecaca; background: var(--danger-soft); color: var(--danger); }
.tl-icon-btn:disabled {
    background: unset !important;
    background-color: #F5F5F5 !important;
    color: #9E9E9E !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
}
/* Status toggle (compact top-right icon button) */
.tl-status-toggle {
    height: 32px;
    padding: 0;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all var(--transition);
}
.tl-toggle--done { color: var(--success); }
.tl-toggle--done:hover { background: var(--success-soft); border-color: #86efac; }
.tl-toggle--reopen { color: #d97706; }
.tl-toggle--reopen:hover { background: var(--warning-soft); border-color: #fcd34d; }
.tl-status-toggle:active { transform: scale(.92); }
.tl-status-toggle:disabled {
    background: unset !important;
    background-color: #F5F5F5 !important;
    color: #9E9E9E !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Inline confirm bar */
.tl-confirm-bar {
    display: flex; align-items: center; gap: 10px;
    margin: 4px 18px 14px; padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
}
.tl-confirm--ok     { background: #f0fdf4; border: 1.5px solid #bbf7d0; color: #166534; }
.tl-confirm--ok i   { font-size: 16px; color: var(--success); }
.tl-confirm--danger { background: #fef2f2; border: 1.5px solid #fecaca; color: #991b1b; }
.tl-confirm--danger i { font-size: 16px; color: var(--danger); }
.tl-confirm-bar span { flex: 1; }
.tl-confirm-yes {
    padding: 5px 14px; border: none; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all var(--transition);
    display: inline-flex; align-items: center; gap: 5px;
}
.tl-confirm-yes i { font-size: 14px; color: inherit; }
.tl-confirm--ok .tl-confirm-yes     { background: #3b82f6; color: #fff; }
.tl-confirm--ok .tl-confirm-yes:hover     { background: #2563eb; }
.tl-confirm--danger .tl-confirm-yes { background: var(--danger); color: #fff; }
.tl-confirm--danger .tl-confirm-yes:hover { background: #b91c1c; }
.tl-confirm-no {
    padding: 5px 14px; border: none; border-radius: var(--radius-sm);
    background: transparent; color: var(--text-muted);
    font-size: 12px; font-weight: 500; cursor: pointer;
    transition: all var(--transition);
    display: inline-flex; align-items: center; gap: 4px;
}
.tl-confirm-no i { font-size: 12px; }
.tl-confirm-no:hover { background: rgba(0,0,0,.06); }

/* Reply form */
.tl-reply-form {
    margin: 6px 16px 12px; padding: 12px;
    background: var(--bg-surface-2);
    border: 1.5px solid var(--border); border-radius: var(--radius);
    animation: tlCardIn .25s ease both;
    overflow: visible;
}
.tl-reply-actions {
    display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end;
}

/* Footer */
.tl-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg-surface);
}

/* Create form */
.tl-create-form {
    border-top: 1px solid var(--border); flex-shrink: 0;
    background: var(--bg-surface);
    animation: tlCardIn .2s ease both;
}
.tl-create-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    font-size: 13.5px; font-weight: 700; color: var(--text-main);
}
.tl-create-body { padding: 0 20px 16px; }
.tl-create-footer {
    display: flex; gap: 8px; padding: 0 20px 16px; justify-content: flex-end;
}

.tl-label {
    display: block; font-size: 11px; font-weight: 700; color: var(--text-muted);
    margin-bottom: 5px; text-transform: uppercase; letter-spacing: .5px;
}

/* Pagination */
.tl-pager {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 12px 0 4px;
}
.tl-pager-btn {
    min-width: 36px; height: 36px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg-surface); color: var(--text-muted);
    font-size: 13px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.tl-pager-btn:hover:not(:disabled):not(.active) {
    background: var(--bg-surface-2); border-color: var(--border-strong);
}
.tl-pager-btn.active {
    background: var(--brand); border-color: var(--brand); color: #fff;
    box-shadow: 0 2px 8px rgba(15, 157, 79, .3);
}
.tl-pager-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Badge on button */
.btn-badge {
    position: absolute; top: -6px; right: -8px;
    min-width: 19px; height: 19px; padding: 0 6px;
    background: var(--brand-red); color: #fff; border-radius: 99px;
    font-size: 11px; font-weight: 800; line-height: 19px; text-align: center;
    box-shadow: 0 2px 8px rgba(225, 38, 47, .4);
}


/* ═══════════════════════════════════════════════════════════
   RICH EDITOR
   ═══════════════════════════════════════════════════════════ */

.rich-editor {
    border: 1px solid #e2e8f0; border-radius: 10px;
    overflow: visible; background: #fff;
    transition: border-color .15s;
    overflow:hidden;
}
.rich-editor:focus-within { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,.12); }

.re-toolbar {
    display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
    padding: 6px 8px; border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}
.re-btn {
    width: 30px; height: 30px; border: none; border-radius: 6px;
    background: transparent; cursor: pointer; font-size: 13px; color: #475569;
    display: flex; align-items: center; justify-content: center;
    transition: all .12s;
}
.re-btn:hover { background: #e2e8f0; }
.re-btn:active { background: #cbd5e1; }
.re-sep {
    width: 1px; height: 20px; background: #e2e8f0; margin: 0 3px;
}
.re-font-size {
    height: 30px; padding: 0 8px; font-size: 12px; font-weight: 500;
    border: 1px solid #e2e8f0; border-radius: 6px;
    background: #fff; color: #475569; cursor: pointer; outline: none;
}
.re-font-size:hover { border-color: #94a3b8; }

.re-color-strip {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
    padding: 6px 10px; border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}
.re-color-swatch {
    display: block; width: 16px; height: 16px; border-radius: 4px;
    border: 1px solid #cbd5e1;
}
.re-color-chip {
    width: 24px; height: 24px; border-radius: 4px; cursor: pointer;
    border: 1px solid rgba(0,0,0,.1); transition: transform .1s;
}
.re-color-chip:hover { transform: scale(1.2); }

.re-emoji-strip {
    display: flex; flex-wrap: wrap; gap: 2px;
    padding: 4px 8px; border-bottom: 1px solid #e5e7eb;
    background: #fafafa; max-height: 180px; overflow-y: auto;
}
.re-emoji-btn {
    width: 32px; height: 32px; border: none; border-radius: 6px;
    background: transparent; cursor: pointer; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: background .1s;
}
.re-emoji-btn:hover { background: #f1f5f9; }

.re-editor {
    min-height: 60px; padding: 10px 14px; outline: none;
    font-size: 13px; color: #1e293b; line-height: 1.6;
    word-break: break-word;
}
.re-editor:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8; pointer-events: none;
}
.re-readonly {
    background: #f8fafc; cursor: default;
}

/* ═══════════════════════════════════════════════════════════════
   TRANG NHẬT KÝ HOẠT ĐỘNG - TIMELINE HIỆN ĐẠI v2
   ═══════════════════════════════════════════════════════════════ */

/* ── Page layout ── */
.tla-page {
    display: flex; flex-direction: column;
    height: calc(100vh - var(--topbar-h));
    overflow: hidden;
}
.tla-content {
    flex: 1; min-height: 0;
    overflow-y: auto; overflow-x: hidden;
    padding: 0 12px 24px 24px;
    scroll-behavior: smooth;
}
.tla-content::-webkit-scrollbar { width: 8px; }
.tla-content::-webkit-scrollbar-track { background: transparent; margin: 8px 0; }
.tla-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #bbf7d0, #4ade80);
    border-radius: 4px; border: 2px solid transparent;
    background-clip: content-box;
}
.tla-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #86efac, #22c55e);
    background-clip: content-box;
}

/* Firefox scrollbar */
.tla-content {
    scrollbar-width: thin;
    scrollbar-color: #4ade80 transparent;
}

/* ── Toolbar ── */
.tla-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; gap: 16px; flex-shrink: 0;
    background: #fff; border-bottom: 1px solid #e8f0ea;
    box-shadow: 0 1px 4px rgba(15,23,42,.04); z-index: 2;
    user-select:none;
}
.tla-toolbar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tla-toolbar-right { display: flex; align-items: center; gap: 10px; }

/* ── Stat badge ── */
.tla-stat {
    display: flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    padding: 6px 16px; border-radius: 12px; border: 1.5px solid #bbf7d0;
}
.tla-stat-icon { font-size: 22px; color: #22c55e; }
.tla-stat-body { display: flex; flex-direction: column; }
.tla-stat-num { font-size: 18px; font-weight: 800; color: #166534; line-height: 1.1; }
.tla-stat-label { font-size: 11px; color: #5a8a6e; font-weight: 500; }

/* ── Filter icons & labels ── */
.tla-label-icon { font-size: 15px; color: #8aac99; margin-left: 14px; }
.tla-label-icon:first-child { margin-left: 0; }
.tla-label-text { font-size: 12px; font-weight: 600; color: #7fa894; }

/* InputD + Cmb borderless trong toolbar */
.tla-toolbar-left ::deep .inputd-root { height: 34px; }
.tla-toolbar-left ::deep .inputd-shell {
    height: 34px; border: none; border-radius: 6px;
    background: #f8faf9; box-shadow: none;
}
.tla-toolbar-left ::deep .inputd-input {
    font-size: 13px; height: 34px; background: transparent; border: none; box-shadow: none;
}
.tla-toolbar-left ::deep .inputd-icon-btn {
    border: none; background: transparent; color: #8aac99;
}
.tla-toolbar-left ::deep .inputd-icon-btn:hover { background: #e8f5e9; color: #2e7d32; }

.tla-toolbar-left ::deep .cmb-base-root { height: 34px; }
.tla-toolbar-left ::deep .cmb-base-shell {
    height: 34px; border: none; border-radius: 6px;
    background: #f8faf9; box-shadow: none;
}
.tla-toolbar-left ::deep .cmb-base-input { font-size: 13px; height: 34px; background: transparent; border: none; box-shadow: none; }
.tla-toolbar-left ::deep .cmb-base-toggle { border: none; background: transparent; color: #8aac99; }
.tla-toolbar-left ::deep .cmb-base-toggle:hover { background: #e8f5e9; color: #2e7d32; }
.tla-toolbar-left ::deep .cmb-base-clear { border: none; background: transparent; color: #9ab8a6; }
.tla-toolbar-left ::deep .cmb-base-clear:hover { color: #ef4444; }

/* ── Search ── */
.tla-search-wrap {
    display: flex; align-items: center; position: relative;
    background: #f8faf9; border: 1.5px solid #d4e8dc; border-radius: 10px;
    padding: 0 12px; height: 38px; width: 260px; transition: all .2s ease;
}
.tla-search-wrap:focus-within { border-color: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.10); width: 320px; }
.tla-search-icon { font-size: 15px; color: #8aac99; }
.tla-search-input {
    flex: 1; border: none; background: transparent; outline: none;
    font-size: 13px; color: #1a4a2e; margin-left: 8px; font-family: inherit;
}
.tla-search-input::placeholder { color: #9ab8a6; font-style: italic; }
.tla-search-clear {
    position: absolute; right: 6px; width: 28px; height: 28px;
    border: none; border-radius: 6px; background: transparent; color: #8aac99;
    font-size: 11px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .15s ease;
}
.tla-search-clear:hover { background: #e2f5ea; color: #ef4444; }
.tla-btn-refresh {
    width: 38px; height: 38px; border: 1.5px solid #d4e8dc; border-radius: 10px;
    background: #fff; color: #0f9d4f; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .16s ease;
}
.tla-btn-refresh:hover { background: #f0fdf4; border-color: #22c55e; }

/* ── Skeleton ── */
.tla-skeleton { padding: 16px 0; display: flex; flex-direction: column; gap: 14px; }
.tla-skel-row { display: flex; align-items: flex-start; gap: 14px; }
.tla-skel-dot {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(90deg, #e8f0ea 25%, #f0fdf4 50%, #e8f0ea 75%);
    background-size: 200% 100%; flex-shrink: 0;
    animation: tlaShimmer 1.5s ease-in-out infinite;
}
.tla-skel-card {
    flex: 1; background: #fff; border: 1px solid #e8f0ea; border-radius: 12px;
    padding: 16px 18px; display: flex; flex-direction: column; gap: 10px;
}
.tla-skel-line {
    height: 14px; border-radius: 6px;
    background: linear-gradient(90deg, #e8f0ea 25%, #f0fdf4 50%, #e8f0ea 75%);
    background-size: 200% 100%;
    animation: tlaShimmer 1.5s ease-in-out infinite;
}
.tla-skel-line.w-30 { width: 30%; }
.tla-skel-line.w-50 { width: 50%; }
.tla-skel-line.w-70 { width: 70%; }

@keyframes tlaShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Timeline ── */
.tla-timeline {
    position: relative; padding: 8px 0 16px;
    margin-left: 20px; /* đẩy timeline line vào trong */
}
.tla-timeline::before {
    content: ""; position: absolute;
    left: 19px; top: 8px; bottom: 16px; width: 2.5px;
    border-radius: 2px;
    background: linear-gradient(180deg,
        #bbf7d0 0%, #22c55e 15%, #86efac 40%, #4ade80 60%, #bbf7d0 100%);
    z-index: 0;
}

/* ── Day separator ── */
.tla-day {
    position: relative; display: flex; align-items: center;
    padding: 20px 0 8px 40px;
    user-select:none;
}
.tla-day:first-child { padding-top: 4px; }
.tla-day-line {
    position: absolute; left: 0; right: 12px; top: 50%;
    height: 1px; background: linear-gradient(90deg, #4ade80, transparent);
    opacity: .5;
}
.tla-day-badge {
    position: relative; z-index: 1; display: flex; align-items: baseline; gap: 10px;
    background: #fff; padding: 6px 16px; border-radius: 24px;
    border: 1.5px solid #bbf7d0; box-shadow: 0 2px 12px rgba(15,157,79,.10);
}
.tla-day-weekday {
    font-size: 13px; font-weight: 700; color: #1a4a2e; text-transform: capitalize;
}
.tla-day-date {
    font-size: 12px; color: #5a8a6e; font-weight: 500;
}

/* ── Entry ── */
.tla-entry {
    position: relative; display: flex; align-items: flex-start;
    padding: 7px 0; padding-left: 44px;
    animation: tlaIn .3s ease both;
}
@keyframes tlaIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── Dot ── */
.tla-dot {
    position: absolute; left: 4px; top: 14px; z-index: 1;
    width: 30px; height: 30px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 13px;
    color: #fff; border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(15,23,42,.15);
    transition: transform .18s ease, box-shadow .18s ease;
}
.tla-entry:hover .tla-dot { transform: scale(1.2); box-shadow: 0 4px 16px rgba(15,23,42,.22); }
.tla-dot-create  { background: linear-gradient(135deg, #22c55e, #16a34a); }
.tla-dot-update  { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.tla-dot-delete  { background: linear-gradient(135deg, #ef4444, #dc2626); }
.tla-dot-success { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.tla-dot-cancel  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.tla-dot-default { background: linear-gradient(135deg, #94a3b8, #64748b); }

/* ── Card ── */
.tla-card {
    flex: 1; min-width: 0;
    background: #fff; border: 1px solid #e8f0ea; border-radius: 14px;
    padding: 14px 18px;
    transition: all .2s ease;
    box-shadow: 0 1px 3px rgba(15,23,42,.03);
}
.tla-entry:hover .tla-card {
    border-color: #bbf7d0;
    box-shadow: 0 4px 20px rgba(15,157,79,.08);
    transform: translateX(3px);
}

/* ── Card top row ── */
.tla-card-top {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    user-select:none;
}
.tla-card-avatar {
    width: 36px; height: 36px; min-width: 36px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, #dcfce7, #86efac);
    color: #166534; font-weight: 700; font-size: 14px; letter-spacing: .3px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; user-select: none;
    border: 2px solid #bbf7d0;
}
.tla-card-avatar img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 8px;
}
.tla-card-meta { display: flex; flex-direction: column; }
.tla-card-user { font-size: 13.5px; font-weight: 600; color: #1a3c2a; }
.tla-card-time { font-size: 11.5px; color: #8aac99; display: flex; align-items: center; gap: 4px; }
.tla-card-tags { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* ── Tags ── */
.tla-tag {
    font-size: 10.5px; font-weight: 700; padding: 3.5px 10px; border-radius: 7px;
    white-space: nowrap; text-transform: uppercase; letter-spacing: .3px;
}
.tla-tag-create  { background: #dcfce7; color: #166534; }
.tla-tag-update  { background: #dbeafe; color: #1e40af; }
.tla-tag-delete  { background: #fee2e2; color: #991b1b; }
.tla-tag-success { background: #ede9fe; color: #5b21b6; }
.tla-tag-cancel  { background: #fef3c7; color: #92400e; }
.tla-tag-default { background: #f1f5f9; color: #475569; }
.tla-tag-module  {
    background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0;
    font-weight: 600; letter-spacing: 0;
}

/* ── Message ── */
.tla-card-msg-wrap { flex: 1; min-width: 0; }
.tla-card-body { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; }
.tla-card-msg-icon {
    font-size: 16px; color: #94a3b8; margin-top: 2px; flex-shrink: 0;
    width: 20px; text-align: center;
}
.tla-card-msg {
    margin: 0; font-size: 13.5px; color: #334155; line-height: 1.6;
}

/* ── Change items ── */
.tla-changes {
    margin-top: 12px; display: flex; flex-direction: column; gap: 6px;
}
.tla-change-item {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; flex-wrap: wrap;
}
.tla-change-field {
    font-weight: 500; color: #64748b; min-width: 0; flex-shrink: 0;
    font-size: 12.5px;
}
.tla-change-arrow {
    color: #22c55e; font-size: 13px; flex-shrink: 0;
}
.tla-change-val {
    padding: 3px 9px; border-radius: 6px; font-size: 12px;
    font-weight: 400; 
}
.tla-change-old {
    background: #fef2f2; color: #991b1b;
    text-decoration: line-through;
}
.tla-change-new {
    background: #f0fdf4; color: #166534;
}

/* ── Empty state ── */
.tla-empty {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 80px 20px; margin: 24px 0;
}
.tla-empty-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; color: #4ade80;
    box-shadow: 0 8px 24px rgba(15,157,79,.10);
}
.tla-empty-title { font-size: 16px; font-weight: 700; color: #3b6e4f; }
.tla-empty-sub { font-size: 13px; color: #8aac99; }

/* ── Pager ── */
.tla-pager {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 14px 0 4px; border-top: 1px solid #e8f0ea; margin-top: 12px;
}
.tla-pager-btn, .tla-pager-num {
    min-width: 34px; height: 34px; border: 1.5px solid #d4e8dc; border-radius: 8px;
    background: #fff; color: #0f9d4f; font-size: 13px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s ease; padding: 0 8px;
}
.tla-pager-btn:hover:not(:disabled), .tla-pager-num:hover {
    background: #f0fdf4; border-color: #22c55e;
}
.tla-pager-btn:disabled { opacity: .3; cursor: default; }
.tla-pager-num.active { background: #0f9d4f; color: #fff; border-color: #0f9d4f; }
.tla-pager-dots { padding: 0 4px; color: #9ab8a6; font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .tla-toolbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; }
    .tla-toolbar-left, .tla-toolbar-right { flex-wrap: wrap; }
    .tla-search-wrap { width: 100%; }
    .tla-search-wrap:focus-within { width: 100%; }
    .tla-content { padding: 0 8px 16px 12px; }
    .tla-timeline { margin-left: 10px; }
    .tla-timeline::before { left: 14px; }
    .tla-entry { padding-left: 36px; }
    .tla-dot { left: 0; width: 26px; height: 26px; font-size: 11px; }
    .tla-card-top { flex-direction: column; align-items: flex-start; }
    .tla-card-tags { margin-left: 0; }
}

/* ── Dialog nhật ký (dùng trong BoTriXe, KeHoach) ── */
.tla-dialog-body { display: flex; flex-direction: column; max-height: 65vh; }
.tla-dialog-loading {
    display: flex; align-items: center; justify-content: center;
    padding: 60px 0; gap: 10px; color: #8aac99;
}
.tla-dialog-loading .spinner-border { width: 24px; height: 24px; border-width: 2px; }
.tla-dialog-content { overflow-y: auto; flex: 1; padding: 4px 8px 12px; }

/* ═══════════════════════════════════════════════════════════════
   DIALOG CẤU HÌNH SẮP XẾP (BoTriXe)
   ═══════════════════════════════════════════════════════════════ */
.sort-dlg { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }

.sort-info {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px;
    background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px;
    font-size: 12px; color: #0369a1;
    user-select:none;
}
.sort-info i { font-size: 14px; flex-shrink: 0; }

.sort-current {
    display: flex; align-items: center; gap: 10px; padding: 8px 14px;
    background: #f8faf9; border: 1px solid #e2e8f0; border-radius: 10px;
    font-size: 12.5px; color: #64748b; flex-wrap: wrap;user-select:none;
}
.sort-current > i { font-size: 15px; color: #94a3b8; flex-shrink: 0; }
.sort-current > span { font-weight: 500; flex-shrink: 0; color: #64748b; }
.sort-current-chain { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sort-curr-item {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 0; color: #334155; font-weight: 500; font-size: 12.5px;
}
.sort-curr-item + .sort-curr-item::before {
    content: "→"; color: #cbd5e1; font-size: 12px;
}
.sort-curr-dir {
    font-size: 16px;
    color: #388E3C;
    font-weight: 900;
}

.sort-list {
    max-height: 45vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 6px; padding-right: 4px;
}

.sort-row {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    transition: all .15s ease;
}
.sort-row.sort-disabled { opacity: .4; background: #fafafa; }

.sort-grip { cursor: grab; color: #94a3b8; font-size: 16px; user-select: none; line-height: 1; }
.sort-num { font-size: 12px; color: #64748b; min-width: 18px; text-align: center; font-weight: 700; }

.sort-field-btn {
    flex: 1; display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 6px 12px; height: 36px; font-size: 13px;
    border: 1px solid #d1d5db; border-radius: 8px; background: #fff;
    color: #1a3c2a; cursor: pointer; text-align: left; font-family: inherit;
}
.sort-field-btn:hover { border-color: #22c55e; background: #f0fdf4; }
.sort-chevron { font-size: 10px; color: #8aac99; }

.sort-dir-btn, .sort-null-btn {
    height: 32px; min-width: 36px; border: 1px solid #e8f0ea; border-radius: 7px;
    background: #fff; color: #475569; font-size: 12px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 3px;
    transition: all .15s ease; padding: 0 8px;
}
.sort-dir-btn:hover, .sort-null-btn:hover { background: #f0fdf4; border-color: #22c55e; color: #0f9d4f; }

.sort-move { display: flex; flex-direction: column; gap: 1px; }
.sort-move button {
    border: none; background: transparent; color: #8aac99; cursor: pointer;
    padding: 2px 4px; line-height: 1; font-size: 10px; border-radius: 3px;
}
.sort-move button:hover:not(:disabled) { background: #e8f5e9; color: #2e7d32; }
.sort-move button:disabled { opacity: .3; cursor: default; }

/* Toggle switch trong sort */
.sort-toggle { position: relative; display: inline-block; width: 40px; height: 22px; cursor: pointer; flex-shrink: 0; }
.sort-toggle input { opacity: 0; width: 0; height: 0; }
.sort-toggle-slider {
    position: absolute; inset: 0; background: #d4e8dc; border-radius: 11px; transition: all .2s ease;
}
.sort-toggle-slider::before {
    content: ""; position: absolute; left: 3px; top: 3px;
    width: 16px; height: 16px; border-radius: 50%; background: #fff;
    transition: all .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.sort-toggle input:checked + .sort-toggle-slider { background: #22c55e; }
.sort-toggle input:checked + .sort-toggle-slider::before { transform: translateX(18px); }

.sort-del-btn {
    width: 28px; height: 28px; border: none; border-radius: 6px;
    background: transparent; color: #cbd5e1; font-size: 13px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: all .15s ease;
}
.sort-del-btn:hover { background: #fef2f2; color: #ef4444; }

/* Dropdown options */
.sort-dropdown {
    display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px 6px 36px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 0 0 8px 8px;
    margin-top: -4px;
}
.sort-opt {
    padding: 4px 10px; font-size: 12px; border: 1px solid #e2e8f0; border-radius: 99px;
    background: #fff; color: #334155; cursor: pointer; white-space: nowrap;
    transition: all .1s ease; font-family: inherit;
}
.sort-opt:hover:not(:disabled) { border-color: #3b82f6; background: #eff6ff; }
.sort-opt:disabled { color: #94a3b8; cursor: not-allowed; }
.sort-opt.active { border-color: #22c55e; background: #f0fdf4; color: #166534; font-weight: 600; }
.sort-opt.active i { color: #22c55e; margin-right: 3px; }

.sort-add-btn {
    align-self: flex-start; border: 1.5px dashed #bbf7d0; border-radius: 8px;
    background: transparent; color: #0f9d4f; font-size: 13px; font-weight: 600; cursor: pointer;
    padding: 8px 14px; display: flex; align-items: center; gap: 6px;
    transition: all .15s ease;user-select:none;
}
.sort-add-btn:hover { background: #f0fdf4; border-style: solid; }

/* Footer */
.sort-footer { display: flex; align-items: center; justify-content: space-between; width: 100%; user-select:none; }
.sort-footer-actions { display: flex; gap: 8px; }
.sort-reset-btn {
    border: 1.5px solid #fed7aa; border-radius: 8px; background: #fff7ed;
    color: #c2410c; font-size: 13px; font-weight: 600; cursor: pointer;
    padding: 8px 14px; display: flex; align-items: center; gap: 6px;
    transition: all .15s ease;
}
.sort-reset-btn:hover { background: #ffedd5; border-color: #f97316; }

/* ═══════════════════════════════════════════════════════════════
   TRANG CẤU HÌNH HỆ THỐNG
   ═══════════════════════════════════════════════════════════════ */
.cfg-page { padding: 20px 24px; max-width: 960px; }

.cfg-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.cfg-toolbar-left { display: flex; align-items: center; gap: 14px; }
.cfg-title { font-size: 22px; font-weight: 700; color: #1a3c2a; margin: 0; display: flex; align-items: center; gap: 10px; }
.cfg-title i { color: #22c55e; font-size: 24px; }
.cfg-count { font-size: 13px; color: #8aac99; background: #f0fdf4; padding: 4px 12px; border-radius: 20px; font-weight: 500; }
.cfg-toolbar-right { display: flex; gap: 8px; }

.cfg-btn {
    height: 38px; padding: 0 16px; border-radius: 9px; border: 1.5px solid #d4e8dc;
    font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
    transition: all .15s ease; background: #fff; color: #0f9d4f;
}
.cfg-btn:hover { background: #f0fdf4; border-color: #22c55e; }
.cfg-btn-primary { background: #0f9d4f; color: #fff; border-color: #0f9d4f; }
.cfg-btn-primary:hover { background: #0b7a3d; border-color: #0b7a3d; }
.cfg-btn-ghost { border-color: transparent; background: transparent; color: #5a8a6e; width: 38px; padding: 0; justify-content: center; }
.cfg-btn-ghost:hover { background: #f0fdf4; }
.cfg-btn-warning { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.cfg-btn-warning:hover { background: #ffedd5; border-color: #f97316; }

.cfg-loading { display: flex; align-items: center; justify-content: center; padding: 60px 0; gap: 10px; color: #8aac99; }
.cfg-loading .spinner-border { width: 24px; height: 24px; border-width: 2px; color: #22c55e; }

.cfg-grid { display: flex; flex-direction: column; gap: 8px; }

.cfg-card {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; border: 1px solid #e8f0ea; border-radius: 12px;
    padding: 14px 18px; transition: all .18s ease;
    box-shadow: 0 1px 3px rgba(15,23,42,.03);
}
.cfg-card:hover { border-color: #bbf7d0; box-shadow: 0 3px 12px rgba(15,157,79,.06); }
.cfg-card.cfg-disabled { opacity: .5; background: #fafafa; }
.cfg-card-body { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.cfg-card-icon {
    width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #22c55e; font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.cfg-card-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cfg-card-code { font-size: 14px; font-weight: 700; color: #1a3c2a; font-family: 'SF Mono', 'Cascadia Code', monospace; }
.cfg-card-value { font-size: 13px; color: #475569; }
.cfg-card-value i { color: #9ab8a6; }
.cfg-card-desc { font-size: 12px; color: #8aac99; }

.cfg-card-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cfg-card-btn {
    width: 32px; height: 32px; border: 1px solid #e8f0ea; border-radius: 8px;
    background: #fff; color: #5a8a6e; font-size: 13px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all .15s ease;
}
.cfg-card-btn:hover { background: #f0fdf4; border-color: #22c55e; color: #0f9d4f; }

/* Toggle switch */
.cfg-toggle { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.cfg-toggle input { opacity: 0; width: 0; height: 0; }
.cfg-toggle-slider { position: absolute; inset: 0; background: #d4e8dc; border-radius: 12px; transition: all .2s ease; }
.cfg-toggle-slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: all .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.cfg-toggle input:checked + .cfg-toggle-slider { background: #22c55e; }
.cfg-toggle input:checked + .cfg-toggle-slider::before { transform: translateX(18px); }
.cfg-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e8f0ea; display: flex; align-items: center; }

/* ═══════════════════════════════════════════════════════════════
   TRANG NGƯỜI DÙNG ONLINE
   ═══════════════════════════════════════════════════════════════ */
.onl-page { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h)); overflow: hidden; position: relative; background: linear-gradient(180deg, #d1fae5 0%, #e8f5e9 30%, #f0f4f1 100%); }
.onl-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.onl-blob { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .35; animation: onlFloat 12s ease-in-out infinite; }
.onl-blob.b1 { width: 500px; height: 500px; top: -180px; right: -150px; background: #22c55e; animation-delay: 0s; }
.onl-blob.b2 { width: 350px; height: 350px; bottom: -120px; left: -120px; background: #16a34a; animation-delay: -4s; }
.onl-blob.b3 { width: 260px; height: 260px; top: 50%; left: 40%; background: #4ade80; animation-delay: -8s; }
@keyframes onlFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.08); }
    66% { transform: translate(-20px, 15px) scale(.95); }
}

.onl-header { user-select:none; display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; flex-shrink: 0; position: relative; z-index: 1; background: rgba(255,255,255,.8); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(34,197,94,.12); }
.onl-header-left { display: flex; align-items: center; gap: 10px; }
.onl-title { font-size: 17px; font-weight: 700; color: #1a3c2a; margin: 0; display: flex; align-items: center; gap: 7px; letter-spacing: -.2px; }
.onl-title i { color: #22c55e; font-size: 20px; }
.onl-count { font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #22c55e, #16a34a); padding: 2px 10px; border-radius: 20px; min-width: 24px; text-align: center; box-shadow: 0 2px 6px rgba(34,197,94,.25); }
.onl-header-right { display: flex; align-items: center; gap: 10px; }
.onl-stat { font-size: 11px; color: #7fa894; display: flex; align-items: center; gap: 4px; font-weight: 500; }
.onl-refresh-btn { width: 32px; height: 32px; border: 1.5px solid rgba(34,197,94,.15); border-radius: 8px; background: rgba(255,255,255,.8); color: #0f9d4f; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s ease; }
.onl-refresh-btn:hover { background: #22c55e; color: #fff; border-color: #22c55e; box-shadow: 0 2px 8px rgba(34,197,94,.25); }

.onl-list { flex: 1; overflow-y: auto; padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.onl-list::-webkit-scrollbar { width: 6px; }
.onl-list::-webkit-scrollbar-track { background: transparent; margin: 8px 0; }
.onl-list::-webkit-scrollbar-thumb { background: rgba(34,197,94,.2); border-radius: 3px; }
.onl-list::-webkit-scrollbar-thumb:hover { background: rgba(34,197,94,.4); }

.onl-card { background: rgba(255,255,255,.85); backdrop-filter: blur(12px); border: 1px solid rgba(34,197,94,.08); border-radius: 14px; box-shadow: 0 1px 4px rgba(15,157,79,.03); transition: all .3s cubic-bezier(.4,0,.2,1); overflow: hidden; user-select: none; flex-shrink: 0; }
.onl-card:hover { border-color: rgba(34,197,94,.25); background: #fff; box-shadow: 0 8px 32px rgba(15,157,79,.1), 0 2px 8px rgba(0,0,0,.04); transform: translateY(-2px); }

.onl-card-row { display: flex; align-items: center; gap: 0; padding: 0; }
.onl-cell { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: #475569; padding: 14px 16px; }
.onl-cell span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }

.onl-cell-user { flex: 2.5; min-width: 0; background: linear-gradient(135deg, rgba(240,253,244,.4), transparent); border-right: 1px solid rgba(34,197,94,.06); }
.onl-cell-time { flex: 1.8; border-right: 1px solid rgba(34,197,94,.06); }
.onl-cell-sys { flex: 3; }

.onl-avatar { width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0; overflow: hidden; background: linear-gradient(135deg, #dcfce7, #86efac); color: #166534; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; border: 2px solid rgba(34,197,94,.15); transition: all .25s ease; }
.onl-card:hover .onl-avatar { border-color: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.1); transform: scale(1.05); }
.onl-avatar img { width: 100%; height: 100%; object-fit: cover; }

.onl-user-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.onl-user-name { font-size: 13.5px; font-weight: 700; color: #1a3c2a; }
.onl-user-page { font-size: 10.5px; color: #8aac99; display: flex; align-items: center; gap: 3px; }
.onl-page-link { font-family: 'SF Mono', monospace; font-size: 10px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.onl-page-title { font-size: 11px; color: #475569; font-weight: 500; display: flex; align-items: center; gap: 3px; }
.onl-page-title i { font-size: 9px; color: #22c55e; }

.onl-badge { font-size: 10.5px; font-weight: 700; padding: 4px 12px; border-radius: 20px; flex-shrink: 0; margin-left: auto; letter-spacing: .3px; transition: all .2s ease; }
.onl-badge-active { background: linear-gradient(135deg, #dcfce7, #bbf7d0); color: #166534; }
.onl-badge-idle { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }

.onl-time-block { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.onl-time-item { display: flex; align-items: center; gap: 8px; }
.onl-time-item > i { width: 20px; height: 20px; border-radius: 6px; background: rgba(34,197,94,.08); color: #22c55e; display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; }
.onl-time-item > div { display: flex; flex-direction: column; line-height: 1.2; }
.onl-time-val { font-size: 12px; font-weight: 600; color: #334155; }
.onl-time-label { font-size: 9.5px; color: #94a3b8; text-transform: uppercase; letter-spacing: .5px; }

.onl-sys-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; width: 100%; }
.onl-sys-grid span { display: flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 5px 8px; border-radius: 7px; background: rgba(248,250,249,.6); }
.onl-sys-grid span i { width: 16px; height: 16px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; }
.onl-sys-grid span:nth-child(1) i { background: #eff6ff; color: #3b82f6; }
.onl-sys-grid span:nth-child(2) i { background: #f0fdf4; color: #22c55e; }
.onl-sys-grid span:nth-child(3) i { background: #fef3c7; color: #f59e0b; }
.onl-sys-grid span:nth-child(4) i { background: #ede9fe; color: #8b5cf6; }
.onl-sys-grid span:nth-child(5) i { background: #fce7f3; color: #ec4899; }
.onl-sys-grid span:nth-child(6) i { background: #f0f9ff; color: #0ea5e9; }

.onl-mono { font-family: 'SF Mono', 'Cascadia Code', monospace; font-size: 11px; }

/* ── Group layout ── */
.onl-group { margin-bottom: 10px; border-radius: 14px; overflow: hidden; border: 1px solid #e8f0ea; background: #fff; box-shadow: 0 1px 3px rgba(15,157,79,.03); transition: box-shadow .25s ease; }
.onl-group:hover { box-shadow: 0 2px 12px rgba(15,157,79,.06); }

.onl-group-header {
    display: flex; align-items: center; gap: 10px; padding: 10px 16px;
    background: #fff;
    cursor: pointer; user-select: none;
    border-bottom: 1px solid #f0f4f1;
    transition: background .2s ease;
}
.onl-group-header:hover { background: #f8fdf9; }
.onl-group-arrow {
    font-size: 13px; color: #22c55e; flex-shrink: 0; width: 18px; text-align: center;
    transition: transform .25s ease;
}
.onl-group-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.onl-group-name { font-size: 13.5px; font-weight: 700; color: #1a3c2a; }
.onl-group-meta { font-size: 10.5px; color: #8aac99; }

/* Avatar animation */
.onl-avatar-sm {
    width: 32px; height: 32px; border-radius: 9px; font-size: 12px;
    transition: transform .3s ease, box-shadow .3s ease;
}
.onl-group-header:hover .onl-avatar-sm { transform: scale(1.08); box-shadow: 0 0 0 3px rgba(34,197,94,.12); }

/* Arrow rotate when expanded */
.onl-group-header .bi-chevron-down { transform: rotate(0deg); }

/* Card in group */
.onl-group .onl-card {
    border-radius: 0; border: none; border-bottom: 1px solid #f0f4f1;
    background: #fff; box-shadow: none; margin: 0;
}
.onl-group .onl-card:last-child { border-bottom: none; }
.onl-group .onl-card:hover { background: #fafdfb; transform: none; box-shadow: none; }
.onl-group .onl-card-row { padding: 0; }
.onl-group .onl-cell { padding: 8px 12px; font-size: 11.5px; }

.onl-badge-sm {
    font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; flex-shrink: 0; margin-left: auto;
}
.onl-badge-sm.onl-badge-active { background: #dcfce7; color: #166534; }
.onl-badge-sm.onl-badge-idle { background: #fef3c7; color: #92400e; }

/* Tighter system grid in group */
.onl-group .onl-sys-grid { gap: 3px; }
.onl-group .onl-sys-grid span { font-size: 11px; padding: 3px 6px; border-radius: 5px; }
.onl-group .onl-sys-grid span i { width: 14px; height: 14px; font-size: 8px; }

/* Tighter time block in group */
.onl-group .onl-time-block { gap: 4px; }
.onl-group .onl-time-item { gap: 5px; }
.onl-group .onl-time-item > i { width: 16px; height: 16px; font-size: 9px; }
.onl-group .onl-time-val { font-size: 11px; }
.onl-group .onl-time-label { font-size: 9px; }

/* Hide old session styles */
.onl-session, .onl-session-row, .onl-session-page, .onl-session-time, .onl-session-idle { display: none; }
.onl-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 72px 20px; position: relative; z-index: 1; }
.onl-empty i { font-size: 52px; color: #d4e8dc; }
.onl-empty span { font-size: 15px; color: #9ab8a6; font-weight: 500; }

@media (max-width: 900px) {
    .onl-card-row { flex-direction: column; }
    .onl-cell { border-right: none; border-bottom: 1px solid rgba(34,197,94,.06); padding: 12px; }
    .onl-cell:last-child { border-bottom: none; }
    .onl-sys-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════
   Grid Column Resize + Reorder
   ═══════════════════════════════════════════════════════════════ */

/* Resize handle — vùng kéo ở border-right của th */
.col-resize-handle {
    position: absolute;
    top: 0; right: -2px; bottom: 0;
    width: 5px;
    cursor: col-resize;
    z-index: 10;
    background: transparent;
    transition: background .15s;
}
.col-resize-handle:hover,
.col-resize-handle.active {
    background: var(--brand);
}

/* Draggable header — cursor grab */
th.col-draggable { cursor: grab; }
th.col-draggable:active { cursor: grabbing; }

/* Đang kéo — giảm opacity */
th.col-drag-ghost { opacity: .35; }

/* Drop indicator — border xanh ở vị trí drop */
th.col-drop-before { box-shadow: inset 3px 0 0 var(--brand); }
th.col-drop-after { box-shadow: inset -3px 0 0 var(--brand); }

/* Nút reset cột */
.btn-reset-cols {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px;
    background: transparent; color: #64748b; font-size: 11px; font-weight: 500;
    cursor: pointer; transition: all .15s;
}
.btn-reset-cols:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ═══════════════════════════════════════════════════════════════════════
   Tooltip hiện đại — .bcsl-tip (append vào body bằng JS, position: fixed)
   ═══════════════════════════════════════════════════════════════════════ */
.bcsl-tip {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
    min-width: 180px;
    max-width: 340px;
    box-shadow: 0 12px 40px rgba(0,0,0,.14), 0 4px 12px rgba(0,0,0,.06);
    font-family: inherit;
    font-size: 12px;
    line-height: 1.5;
    color: #334155;
    animation: bcslTipIn .12s ease-out;
}

@keyframes bcslTipIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bcsl-tip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    border-bottom: 1px solid #f1f5f9;
}

.bcsl-tip-row:last-child {
    border-bottom: 0;
}

.bcsl-tip-row > i {
    font-size: 13px;
    color: var(--brand, #16a34a);
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.bcsl-tip-label {
    font-weight: 600;
    color: #64748b;
    font-size: 11px;
    min-width: 65px;
    flex-shrink: 0;
}

.bcsl-tip-val {
    font-weight: 500;
    color: #1e293b;
}

.bcsl-tip-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #e2e8f0;
    color: #b45309;
    font-size: 11px;
    line-height: 1.5;
}

.bcsl-tip-note > i {
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}