:root {
      --vpg-sidebar: 260px;
      --vpg-sidebar-collapsed: 72px;
      --vpg-topbar: 72px;
      --vpg-radius: 20px;
      --vpg-green: #1a7a4c;
      --vpg-green-soft: #e6f4ec;
      --vpg-shadow: 0 4px 32px rgba(26, 29, 31, 0.06);
    --vpg-font-base: 20px;
    --vpg-fs-2xs: calc(var(--vpg-font-base) * 0.45);
    --vpg-fs-xs: calc(var(--vpg-font-base) * 0.5);
    --vpg-fs-sm: calc(var(--vpg-font-base) * 0.6);
    --vpg-fs-md: calc(var(--vpg-font-base) * 0.65);
    --vpg-fs-lg: calc(var(--vpg-font-base) * 0.9);
    --vpg-fs-xl: calc(var(--vpg-font-base) * 1.1);
    --vpg-fs-2xl: calc(var(--vpg-font-base) * 1.35);
    --vpg-font-sm: var(--vpg-fs-sm);
    }

    html.sidebar-collapsed {
      --vpg-sidebar: var(--vpg-sidebar-collapsed);
    }
    html.sidebar-collapsed .icon-nav-brand-text,
    html.sidebar-collapsed .icon-nav-brand-sub,
    html.sidebar-collapsed .sidebar-search-btn > span:not(.sidebar-search-kbd),
    html.sidebar-collapsed .nav-section-lbl,
    html.sidebar-collapsed .nav-label,
    html.sidebar-collapsed .sidebar-status-card,
    html.sidebar-collapsed .nav-section-chev { display: none !important; }
    html.sidebar-collapsed .icon-nav-btn { justify-content: center; padding-left: 0; padding-right: 0; }
    html.sidebar-collapsed .sidebar-search-btn { justify-content: center; padding: 8px; }
    html.sidebar-collapsed .sidebar-search-kbd { display: none; }

    body {
      font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
      background: #f3f5f4;
      color: #1a1d1f;
      font-size: var(--vpg-font-base);
    }
    header, #welcomeStrip, #modulePanels, #modulePanels .view-panel { font-size: var(--vpg-font-base); }
    #modulePanels .text-xs,
    #modulePanels .text-\[11px\],
    #modulePanels .text-\[10px\] { font-size: var(--vpg-fs-xs) !important; }
    #modulePanels .text-sm { font-size: var(--vpg-fs-sm) !important; }
    #modulePanels .text-lg { font-size: var(--vpg-fs-lg) !important; }
    #modulePanels .text-xl,
    #modulePanels .text-2xl,
    #modulePanels .text-3xl { font-size: var(--vpg-fs-2xl) !important; }
    #modulePanels .btn-ghost,
    #modulePanels .btn-green,
    #modulePanels .btn-primary,
    #modulePanels .kh-input,
    #modulePanels select.kh-input,
    #modulePanels .ns-tab,
    #modulePanels .kh-label,
    #modulePanels .kh-stat-lbl,
    #modulePanels .kh-table { font-size: var(--vpg-fs-sm); }
    #modulePanels .kh-table th { font-size: var(--vpg-fs-xs); }
    #modulePanels .kh-stat-num { font-size: var(--vpg-fs-xl); }
    #modulePanels .kh-modal-head h3 { font-size: var(--vpg-fs-xl); }
    header .text-sm { font-size: var(--vpg-fs-sm) !important; }
    header .text-xl { font-size: var(--vpg-fs-2xl) !important; }
    #welcomeStrip .text-sm { font-size: var(--vpg-fs-sm) !important; }
    #welcomeStrip .text-2xl,
    #welcomeStrip .text-3xl { font-size: var(--vpg-fs-2xl) !important; }

    .custom-scroll::-webkit-scrollbar { width: 5px; height: 5px; }
    .custom-scroll::-webkit-scrollbar-thumb { background: #d1d9d4; border-radius: 8px; }

    /* Sidebar */
    .icon-nav {
      width: var(--vpg-sidebar);
      background: #fff;
      border-right: 1px solid #e8ecea;
      display: flex; flex-direction: column;
      padding: 14px 0 10px;
    }
    .icon-nav-brand {
      display: flex; align-items: center; gap: 10px;
      padding: 0 14px 14px; margin-bottom: 4px;
      border-bottom: 1px solid #f0f2f1;
    }
    .icon-nav-brand-mark {
      width: 40px; height: 40px; border-radius: 12px;
      background: var(--vpg-green); color: #fff;
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 2px 10px rgba(26, 122, 76, 0.25); flex-shrink: 0;
    }
    .icon-nav-brand-text { font-size: 13px; font-weight: 700; color: #1a1d1f; line-height: 1.2; }
    .icon-nav-brand-sub { font-size: 10px; color: #9ca3af; font-weight: 500; margin-top: 1px; }
    #iconNav {
      flex: 1; overflow-y: auto; overflow-x: hidden;
      width: 100%; padding: 6px 10px 8px;
    }
    .icon-nav-foot { padding: 8px 10px 0; border-top: 1px solid #f0f2f1; width: 100%; }
    .icon-nav-btn {
      position: relative; width: 100%; min-height: 38px;
      border-radius: 10px; border: none; background: transparent;
      color: #6b7280; cursor: pointer;
      display: flex; align-items: center; justify-content: flex-start;
      gap: 9px; padding: 7px 10px; margin-bottom: 2px;
      transition: background .15s, color .15s;
    }
    .icon-nav-btn .nav-label {
      font-size: 12px; font-weight: 600; line-height: 1.25;
      text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      flex: 1; min-width: 0;
    }
    .icon-nav-btn.active .nav-label { color: #fff; }
    .icon-nav-btn:hover { background: #f3f5f4; color: #1a1d1f; }
    .icon-nav-btn.active {
      background: var(--vpg-green); color: #fff;
      box-shadow: 0 2px 10px rgba(26, 122, 76, 0.28);
    }
    .icon-nav-divider { height: 1px; background: #eef1ef; margin: 8px 4px; }
    .icon-nav-group-lbl {
      font-size: 9px; font-weight: 700; text-transform: uppercase;
      letter-spacing: .07em; color: #b0b8b4;
      padding: 10px 10px 4px; line-height: 1.3;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .sidebar-search-wrap { padding: 0 12px 10px; }
    .sidebar-search-btn {
      width: 100%; display: flex; align-items: center; gap: 8px;
      padding: 8px 10px; border-radius: 10px; border: 1px solid #e8ecea;
      background: #f8faf9; color: #9ca3af; font-size: 12px; font-weight: 500;
      cursor: pointer; transition: border-color .15s, background .15s;
    }
    .sidebar-search-btn:hover { border-color: #d1d5db; background: #f3f5f4; color: #6b7280; }
    .sidebar-search-kbd {
      margin-left: auto; font-size: 10px; font-weight: 700; color: #b0b8b4;
      border: 1px solid #e5e7eb; border-radius: 5px; padding: 1px 5px; background: #fff;
    }
    .nav-section { margin-bottom: 4px; }
    .nav-section-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 8px 10px 4px; cursor: default; user-select: none;
    }
    .nav-section-head.is-toggle { cursor: pointer; }
    .nav-section-head.is-toggle:hover .nav-section-lbl { color: #6b7280; }
    .nav-section-lbl {
      font-size: 10px; font-weight: 800; text-transform: uppercase;
      letter-spacing: .08em; color: #b0b8b4;
    }
    .nav-section-chev { color: #c4cbc7; transition: transform .15s; }
    .nav-section.is-collapsed .nav-section-chev { transform: rotate(-90deg); }
    .nav-section.is-collapsed .nav-section-body { display: none; }

    .btn-sidebar-toggle {
      border: 1px solid #e8ecea; background: #fff; border-radius: 10px;
      width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
      cursor: pointer; color: #6b7280; flex-shrink: 0;
    }
    .btn-sidebar-toggle:hover { border-color: #cbd5e1; color: #374151; }
    html.sidebar-collapsed .btn-sidebar-toggle i { transform: rotate(180deg); }

    .top-recent-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: min(560px, 48vw); }
    .top-recent-tab {
      border: 1px solid #e8ecea; background: #f8faf9; color: #374151;
      font-size: var(--vpg-font-sm); font-weight: 700; padding: 6px 12px; border-radius: 999px;
      cursor: pointer; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
      transition: background .12s, border-color .12s, color .12s;
    }
    .top-recent-tab:hover { border-color: #a7d4bc; background: #f0fdf6; color: #1a7a4c; }
    .top-recent-tab.is-active { background: #1a7a4c; border-color: #1a7a4c; color: #fff; }
    .top-recent-empty { font-size: var(--vpg-font-sm); color: #9ca3af; white-space: nowrap; }
    .nav-section.is-collapsed .nav-section-chev { transform: rotate(-90deg); }
    .nav-section.is-collapsed .nav-section-body { display: none; }
    .icon-nav-btn .nav-badge {
      flex-shrink: 0; min-width: 18px; height: 18px; padding: 0 5px;
      border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 18px;
      text-align: center; margin-left: auto;
    }
    .nav-badge-warn { background: #fee2e2; color: #b91c1c; }
    .nav-badge-info { background: #dbeafe; color: #1d4ed8; }
    .nav-badge-muted { background: #f3f4f6; color: #6b7280; }
    .nav-dot {
      flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; margin-left: auto;
    }
    .nav-dot-warn { background: #f59e0b; box-shadow: 0 0 0 2px #fef3c7; }
    .nav-dot-ok { background: #22c55e; box-shadow: 0 0 0 2px #dcfce7; }
    .sidebar-status-card {
      margin: 0 0 8px; padding: 10px 12px; border-radius: 12px;
      background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
      border: 1px solid #bbf7d0;
    }
    .sidebar-status-card.is-warn {
      background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
      border-color: #fde68a;
    }
    .ssc-title { font-size: 11px; font-weight: 800; color: #166534; margin-bottom: 4px; }
    .sidebar-status-card.is-warn .ssc-title { color: #b45309; }
    .ssc-line { font-size: 10px; color: #4b5563; line-height: 1.45; }
    .ssc-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
    .ssc-dot-ok { background: #22c55e; }
    .ssc-dot-warn { background: #f59e0b; }
  .nav-palette {
      position: fixed; inset: 0; z-index: 900; display: flex;
      align-items: flex-start; justify-content: center; padding-top: 12vh;
      background: rgba(15, 23, 20, 0.45); backdrop-filter: blur(4px);
    }
    .nav-palette.hidden { display: none; }
    .nav-palette-box {
      width: min(480px, 92vw); background: #fff; border-radius: 16px;
      box-shadow: 0 24px 64px rgba(0,0,0,.18); overflow: hidden;
      border: 1px solid #e8ecea;
    }
    .nav-palette-input-wrap {
      display: flex; align-items: center; gap: 10px; padding: 14px 16px;
      border-bottom: 1px solid #f0f2f1;
    }
    .nav-palette-input {
      flex: 1; border: none; outline: none; font-size: 15px; font-weight: 500;
      color: #1a1d1f; background: transparent;
    }
    .nav-palette-list { max-height: 320px; overflow-y: auto; padding: 6px; }
    .nav-palette-item {
      display: flex; align-items: center; gap: 10px; width: 100%;
      padding: 10px 12px; border: none; border-radius: 10px; background: transparent;
      cursor: pointer; text-align: left; font-size: 13px; color: #374151;
    }
    .nav-palette-item:hover, .nav-palette-item.is-active { background: #f3f5f4; }
    .nav-palette-item b { font-weight: 700; color: #1a1d1f; }
    .nav-palette-item span { font-size: 11px; color: #9ca3af; margin-left: auto; }
    .cd-root { display: flex; flex-direction: column; gap: 16px; }
    .cd-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
    .cd-card { padding: 18px 20px; margin-bottom: 12px; }
    .cd-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
    .cd-card-head h3 { font-size: var(--vpg-font-sm); font-weight: 700; color: #1a1d1f; }
    .cd-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
    .cd-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
    .cd-inp { border: 1px solid #e8ecea; border-radius: 10px; padding: 8px 10px; font-size: var(--vpg-font-sm); }
    .cd-faq details { margin-bottom: 8px; font-size: var(--vpg-font-sm); }
    .cd-faq summary { font-weight: 700; cursor: pointer; margin-bottom: 4px; }
    .cd-advanced { margin-top: 8px; border: 1px solid #e8ecea; border-radius: 12px; padding: 10px 14px; background: #fafbfa; }
    .cd-advanced summary { font-weight: 800; cursor: pointer; font-size: var(--vpg-font-sm); }
    .cd-advanced-body { margin-top: 10px; }
    html[data-theme="dark"] body { background: #111827; color: #f3f4f6; }
    html[data-theme="dark"] .card, html[data-theme="dark"] .icon-nav, html[data-theme="dark"] header { background: #1f2937 !important; border-color: #374151 !important; color: #f3f4f6; }
    html[data-theme="light"] body { background: #fafafa; }
    .cd-row { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 8px 0; border-bottom: 1px solid #f5f6f5; font-size: 13px; }
    .cd-row:last-child { border-bottom: none; }
    .cd-lbl { color: #6b7280; min-width: 140px; }
    .cd-val { color: #1a1d1f; font-weight: 600; flex: 1; }
    .cd-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; margin-bottom: 12px; }
    .cd-pill-ok { background: #dcfce7; color: #166534; }
    .cd-pill-warn { background: #fef3c7; color: #b45309; }
    .cd-pill-muted { background: #f3f4f6; color: #6b7280; }
    .cd-hint, .cd-vps-box { font-size: 12px; color: #6b7280; margin-top: 10px; line-height: 1.55; }
    .cd-vps-box { background: #f8faf9; border: 1px solid #e8ecea; border-radius: 12px; padding: 14px; }
    .cd-vps-box ol { margin: 8px 0 8px 18px; }
    .cd-pre { background: #1a1d1f; color: #e5e7eb; padding: 10px 12px; border-radius: 8px; font-size: 11px; overflow-x: auto; margin: 8px 0; }
    .cd-err { color: #b91c1c; font-weight: 600; }
    .cd-alert { padding: 12px 14px; border-radius: 12px; background: #fee2e2; color: #991b1b; font-size: 13px; font-weight: 600; }
    .cd-health-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
    .help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
    .help-card { padding: 16px; border-radius: 14px; border: 1px solid #e8ecea; background: #fff; }
    .help-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
    .help-card p { font-size: 12px; color: #6b7280; line-height: 1.5; }

    /* Module Nhân sự */
    .ns-tabs .ns-tab {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 10px 16px; border-radius: 12px; border: 1px solid #e8ecea;
      background: #fff; font-size: 13px; font-weight: 600; color: #6b7280; cursor: pointer;
    }
    .ns-tabs .ns-tab.active { background: #e6f4ec; border-color: #b8dcc8; color: #1a7a4c; }
    .ns-panel.hidden { display: none; }
    .ns-name-cell { display: flex; align-items: center; gap: 10px; }
    .ns-avatar {
      width: 32px; height: 32px; border-radius: 10px; object-fit: cover;
      background: #e6f4ec; flex-shrink: 0;
    }
    .ns-avatar-ph {
      display: inline-flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 700; color: #1a7a4c;
    }
    .ns-anh-preview { margin-top: 10px; }
    .ns-anh-preview img { max-height: 120px; border-radius: 12px; border: 1px solid #e8ecea; }
    .ns-anh-upload-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
    .ns-anh-upload-row input[type="file"] { flex: 1; min-width: 160px; font-size: 12px; }
    .lcv-cal-layout { align-items: stretch; }
    /* —— Lịch công việc: gọn 1 màn hình desktop —— */
    main:has(#view-lich-cong-viec.active) {
      padding-top: 10px; padding-bottom: 8px; overflow: hidden;
    }
    #view-lich-cong-viec.active {
      flex-direction: column; gap: 8px;
      height: calc(100vh - var(--vpg-topbar) - 20px);
      max-height: calc(100vh - var(--vpg-topbar) - 20px);
      overflow: hidden;
    }
    #view-lich-cong-viec .lcv-unified-bar {
      display: flex; align-items: stretch; gap: 0;
      padding: 0; flex-shrink: 0; overflow: hidden;
      border: 1px solid #e8ecea;
    }
    #view-lich-cong-viec .lcv-unified-tabs {
      display: flex; align-items: center; gap: 4px;
      padding: 6px 10px; flex-shrink: 0;
      border-right: 1px solid #eef1ef; background: #f9fafb;
    }
    #view-lich-cong-viec .lcv-utab {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 5px 12px; border: none; border-radius: 8px;
      background: transparent; font-size: 12px !important; font-weight: 600;
      color: #6b7280; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s;
    }
    #view-lich-cong-viec .lcv-utab:hover { background: #eef6f1; color: #1a7a4c; }
    #view-lich-cong-viec .lcv-utab.active {
      background: #1a7a4c; color: #fff; box-shadow: 0 1px 3px rgba(26,122,76,.25);
    }
    #view-lich-cong-viec .lcv-unified-nhac {
      flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 8px;
      padding: 8px 12px; background: linear-gradient(90deg, #fffbeb 0%, #fff 40%);
    }
    #view-lich-cong-viec .lcv-unified-nhac.hidden { display: none; }
    #view-lich-cong-viec .lcv-unified-nhac-ico {
      flex-shrink: 0; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
      border-radius: 8px; background: #fef3c7; color: #b45309; margin-top: 1px;
    }
    #view-lich-cong-viec .lcv-unified-nhac-body {
      flex: 1; min-width: 0; max-height: 52px; overflow-y: auto;
    }
    #view-lich-cong-viec .lcv-sec-title {
      font-size: 14px !important; font-weight: 700; line-height: 1.2;
      color: #1a1d1f; letter-spacing: -0.01em;
    }
    #view-lich-cong-viec .lcv-sec-head {
      display: flex; align-items: center; justify-content: space-between; gap: 8px;
      padding: 6px 10px; border-bottom: 1px solid #f0f2f1; flex-shrink: 0;
    }
    #view-lich-cong-viec .lcv-panel-tong {
      flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
    }
    #view-lich-cong-viec .lcv-nhac-summary {
      margin: 0; font-size: 12px !important; line-height: 1.5; color: #374151; width: 100%;
    }
    #view-lich-cong-viec .lcv-nhac-summary-empty { color: #9ca3af; font-style: italic; }
    #view-lich-cong-viec .lcv-nhac-summary-err .lcv-nhac-summary-empty { color: #b45309; font-style: normal; }
    #view-lich-cong-viec .lcv-nhac-carousel {
      display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0;
    }
    #view-lich-cong-viec .lcv-nhac-nav {
      flex-shrink: 0; width: 24px; height: 24px; padding: 0;
      border: 1px solid #fcd34d; border-radius: 6px; background: #fff;
      color: #b45309; font-size: 16px; font-weight: 700; line-height: 1;
      cursor: pointer; transition: background .12s, border-color .12s;
    }
    #view-lich-cong-viec .lcv-nhac-nav:hover:not(:disabled) { background: #fef3c7; border-color: #f59e0b; }
    #view-lich-cong-viec .lcv-nhac-nav:disabled { opacity: .35; cursor: default; }
    #view-lich-cong-viec .lcv-nhac-carousel-text {
      flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    #view-lich-cong-viec .lcv-nhac-carousel-idx {
      flex-shrink: 0; font-size: 11px; font-weight: 600; color: #9ca3af;
    }
    #view-lich-cong-viec .lcv-cal-shell {
      flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
    }
    #view-lich-cong-viec .lcv-cal-head {
      display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
      padding: 6px 10px; flex-shrink: 0;
      border-bottom: 1px solid #e8ecea; background: #fafbfb;
    }
    #view-lich-cong-viec .lcv-cal-nav { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
    #view-lich-cong-viec .lcv-cal-title {
      font-size: 14px !important; font-weight: 800; min-width: 128px; text-align: center; color: #1a1d1f;
    }
    #view-lich-cong-viec .lcv-cal-nav-btn { min-width: 26px; padding: 3px 7px !important; }
    #view-lich-cong-viec .lcv-cal-today {
      font-size: 11px !important; padding: 3px 8px !important; color: #1a7a4c; font-weight: 600;
    }
    #view-lich-cong-viec .lcv-cal-legend {
      display: flex; flex-wrap: wrap; gap: 6px 10px; flex: 1; min-width: 0; justify-content: center;
    }
    #view-lich-cong-viec .lcv-cal-legend .ns-cal-legend { font-size: 11px !important; color: #6b7280; }
    #view-lich-cong-viec .lcv-cal-chips {
      display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 340px;
    }
    #view-lich-cong-viec .lcv-cal-chips .lcv-sum-chip { font-size: 11px !important; padding: 2px 8px; }
    #view-lich-cong-viec .lcv-cal-main {
      flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 300px; gap: 8px; overflow: hidden;
    }
    @media (max-width: 1024px) {
      #view-lich-cong-viec .lcv-cal-main { grid-template-columns: 1fr; }
      #view-lich-cong-viec.active { height: auto; max-height: none; overflow: visible; }
      main:has(#view-lich-cong-viec.active) { overflow: auto; }
    }
    .lcv-cal-card { display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; }
    .lcv-cal-card-flush { padding: 0; }
    .lcv-cal-detail {
      display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden; padding: 0;
    }
    .lcv-day-panel {
      display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden;
      padding: 10px; gap: 0;
    }
    .lcv-day-head {
      flex-shrink: 0; padding-bottom: 8px; border-bottom: 1px solid #eef1ef;
    }
    .lcv-day-head .lcv-sec-title { font-size: var(--vpg-font-md); font-weight: 800; }
    .lcv-day-actions {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
      padding: 8px 0; flex-shrink: 0; border-bottom: 1px solid #eef1ef;
    }
    .lcv-day-act {
      display: inline-flex; align-items: center; justify-content: center; gap: 4px;
      padding: 6px 4px; border: 1px solid #e2e8e4; border-radius: 8px; background: #f9fafb;
      font-size: 11px; font-weight: 600; color: #374151; cursor: pointer; transition: background .12s, border-color .12s;
    }
    .lcv-day-act:hover { background: #eef6f1; border-color: #1a7a4c; color: #1a7a4c; }
    .lcv-day-body {
      flex: 1; min-height: 0; overflow-y: auto; padding-top: 8px; font-size: var(--vpg-font-sm);
    }
    .lcv-day-meta {
      display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px;
    }
    .lcv-day-meta .ns-cal-status { margin: 0; font-size: 11px !important; padding: 4px 8px; }
    .lcv-day-ca { font-size: 11px; color: #6b7280; }
    .lcv-day-ct {
      border: 1px solid #eef1ef; border-radius: 8px; margin-bottom: 10px; background: #fafbfb;
    }
    .lcv-day-ct-sum {
      padding: 6px 10px; font-size: 11px; font-weight: 700; color: #4b5563; cursor: pointer; list-style: none;
    }
    .lcv-day-ct-sum::-webkit-details-marker { display: none; }
    .lcv-day-ct-form { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 6px; }
    .lcv-field-compact .kh-label { font-size: 10px !important; margin-bottom: 2px; }
    .lcv-field-compact .kh-input { font-size: 12px !important; padding: 5px 8px; }
    .lcv-day-ca-row { display: flex; gap: 12px; font-size: 11px; }
    .lcv-day-events { border-top: 1px solid #eef1ef; padding-top: 8px; }
    .lcv-day-events-head {
      display: flex; align-items: center; justify-content: space-between;
      font-size: 11px; font-weight: 700; color: #374151; margin-bottom: 6px;
    }
    .lcv-day-events-head small {
      font-size: 10px; font-weight: 700; color: #6b7280; background: #f3f4f6;
      padding: 1px 6px; border-radius: 999px;
    }
    .lcv-day-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
    .lcv-day-item {
      display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px;
      border-radius: 6px; background: #f9fafb; border: 1px solid #f0f2f1;
    }
    .lcv-day-tag {
      flex-shrink: 0; font-size: 9px; font-weight: 800; letter-spacing: .02em;
      padding: 2px 5px; border-radius: 4px; background: #e5e7eb; color: #374151; margin-top: 1px;
    }
    .lcv-day-item-nhac .lcv-day-tag { background: #fee2e2; color: #b91c1c; }
    .lcv-day-item-nghi .lcv-day-tag, .lcv-day-item-nghi-pending .lcv-day-tag { background: #ffedd5; color: #c2410c; }
    .lcv-day-item-bd .lcv-day-tag { background: #fce7f3; color: #be185d; }
    .lcv-day-item-ship .lcv-day-tag { background: #dbeafe; color: #1d4ed8; }
    .lcv-day-item-note .lcv-day-tag { background: #e0e7ff; color: #4338ca; }
    .lcv-day-item-han .lcv-day-tag { background: #ffedd5; color: #c2410c; font-weight: 700; }
    .lcv-day-item-body { flex: 1; min-width: 0; }
    .lcv-day-item-title { font-size: 12px; font-weight: 600; color: #1a1d1f; line-height: 1.35; }
    .lcv-day-item-sub { font-size: 10px; color: #6b7280; margin-top: 2px; line-height: 1.35; }
    .lcv-day-warn { border-color: #fcd34d; background: #fffbeb; }
    .lcv-day-warn-over { border-color: #fca5a5; background: #fef2f2; }
    .lcv-day-warn .lcv-day-item-title, .lcv-day-warn-over .lcv-day-item-title { color: #b45309; }
    .lcv-day-warn-over .lcv-day-item-title { color: #b91c1c; }
    .lcv-day-empty { font-size: 11px; color: #9ca3af; margin: 0; padding: 4px 0; }
    .lcv-day-del {
      margin-top: 4px; font-size: 10px; color: #dc2626; background: none; border: none;
      padding: 0; cursor: pointer; text-decoration: underline;
    }
    #view-lich-cong-viec .ns-cal-section { margin-top: 10px; padding-top: 8px; }
    #view-lich-cong-viec .ns-cal-section-head { font-size: 12px !important; margin-bottom: 6px; }
    #view-lich-cong-viec .ns-cal-status { font-size: 12px !important; padding: 6px 10px; margin-bottom: 8px; }
    .lcv-toolbar-compact .lcv-search-input { flex: 1; min-width: 180px; max-width: 360px; font-size: var(--vpg-font-sm); padding: 8px 12px; }
    .lcv-subtabs { padding: 6px 8px !important; gap: 4px !important; margin-bottom: 12px !important; }
    .lcv-subtabs .ns-tab { padding: 6px 12px; font-size: var(--vpg-font-sm); border-radius: 8px; gap: 6px; }
    .ns-cal-grid-flush {
      border: none; border-radius: 0; overflow: hidden; flex: 1; min-height: 0;
    }
    .ns-cal-grid {
      font-size: 12px; flex: 1; display: flex; flex-direction: column; min-height: 0; height: 100%;
    }
    .ns-cal-head, .ns-cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }
    .ns-cal-head span {
      text-align: center; font-size: 11px !important; font-weight: 700; color: #9ca3af; padding: 5px 2px;
      border-right: 1px solid #e8ecea; border-bottom: 1px solid #e8ecea; background: #f9fafb;
    }
    .ns-cal-head span:last-child { border-right: none; }
    .ns-cal-dow-sun { color: #dc2626 !important; }
    .ns-cal-days { flex: 1; grid-auto-rows: minmax(0, 1fr); align-content: stretch; min-height: 0; }
    .ns-cal-day {
      min-height: 0; height: 100%;
      border: none; border-right: 1px solid #e8ecea; border-bottom: 1px solid #e8ecea;
      border-radius: 0; background: #fff; padding: 3px 0 4px; text-align: left; cursor: pointer;
      display: flex; flex-direction: column; gap: 2px; transition: background .12s;
      overflow: hidden; margin: 0;
    }
    .ns-cal-day:nth-child(7n) { border-right: none; }
    .ns-cal-days .ns-cal-day:nth-last-child(-n+7) { border-bottom: none; }
    .ns-cal-day.empty {
      border-right: 1px solid #e8ecea; border-bottom: 1px solid #e8ecea;
      background: #fafbfb; cursor: default;
    }
    .ns-cal-day.empty:nth-child(7n) { border-right: none; }
    .ns-cal-day-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 2px; flex-shrink: 0; padding: 0 5px; }
    .ns-cal-day b { font-size: 12px !important; font-weight: 800; line-height: 1.2; color: #1a1d1f; }
    .ns-cal-nhac-btn {
      min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
      background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; line-height: 20px;
      text-align: center; flex-shrink: 0; box-shadow: 0 1px 4px rgba(239,68,68,.4);
    }
    .ns-cal-nhac-btn.is-urgent { background: #dc2626; animation: ns-nhac-pulse 1.8s ease-in-out infinite; }
    @keyframes ns-nhac-pulse {
      0%, 100% { box-shadow: 0 1px 4px rgba(239,68,68,.4); }
      50% { box-shadow: 0 0 0 3px rgba(239,68,68,.25); }
    }
    .ns-cal-items { flex: 1; display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow: hidden; padding: 0 5px; }
    .ns-cal-line {
      font-size: 10px !important; line-height: 1.3; padding: 1px 4px; border-radius: 3px;
      font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .ns-cal-line-le { background: #dcfce7; color: #166534; }
    .ns-cal-line-sun { background: #fee2e2; color: #b91c1c; font-weight: 700; }
    .ns-cal-line-off { background: #ffedd5; color: #c2410c; }
    .ns-cal-line-nghi { background: #e6f4ec; color: #1a7a4c; }
    .ns-cal-line-nghi-pending { background: #fef3c7; color: #b45309; }
    .ns-cal-line-bd { background: #fce7f3; color: #be185d; }
    .ns-cal-line-ship { background: #dbeafe; color: #1d4ed8; }
    .ns-cal-line-nhac { background: #fee2e2; color: #b91c1c; font-weight: 700; }
    .ns-cal-line-nhac.nhac-cal {
      background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
      color: #fff; font-weight: 800;
      box-shadow: 0 1px 2px rgba(220,38,38,.35);
    }
    .ns-cal-line-nhac.nhac-soon { background: #ffedd5; color: #c2410c; }
    .ns-cal-line-nhac.nhac-cal.nhac-soon {
      background: linear-gradient(90deg, #ea580c 0%, #f97316 100%);
      color: #fff;
    }
    .ns-cal-line-nhac.nhac-over { background: #fecaca; color: #991b1b; font-weight: 700; }
    .ns-cal-line-nhac.nhac-cal.nhac-over {
      background: linear-gradient(90deg, #991b1b 0%, #b91c1c 100%);
      color: #fff;
    }
    .ns-cal-line-note { background: #eef2ff; color: #4338ca; font-weight: 600; }
    .ns-cal-line-han { background: #ffedd5; color: #c2410c; font-weight: 700; }
    .ns-cal-line-han.han-qt { background: #fee2e2; color: #b91c1c; }
    .ns-cal-spans { display: flex; flex-direction: column; gap: 2px; margin: 0; width: 100%; flex-shrink: 0; }
    .ns-cal-span {
      height: 20px; min-height: 20px;
      display: flex; align-items: center; gap: 4px;
      font-size: 10px !important; font-weight: 600;
      padding: 0 6px; white-space: nowrap; overflow: hidden;
      border-left: 3px solid transparent;
      box-shadow: inset 0 -1px 0 rgba(0,0,0,.04);
    }
    .ns-cal-span-dot { flex-shrink: 0; opacity: .75; font-size: 8px; line-height: 1; }
    .ns-cal-span-txt { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
    .ns-cal-span-single { margin: 0 5px; border-radius: 4px; width: calc(100% - 10px); }
    .ns-cal-span-start { border-radius: 4px 0 0 4px; width: 100%; }
    .ns-cal-span-middle { border-radius: 0; width: 100%; min-height: 20px; }
    .ns-cal-span-end { border-radius: 0 4px 4px 0; width: 100%; min-height: 20px; }
    .ns-cal-span-nghi {
      background: linear-gradient(90deg, #b8e6cc 0%, #e6f4ec 55%, #e6f4ec 100%);
      color: #145c39; border-left-color: #1a7a4c;
    }
    .ns-cal-span-nghi-pending {
      background: linear-gradient(90deg, #fde68a 0%, #fef3c7 100%);
      color: #92400e; border-left-color: #d97706;
    }
    .ns-cal-span-note {
      background: linear-gradient(90deg, #93c5fd 0%, #dbeafe 100%);
      color: #1e40af; border-left-color: #2563eb;
    }
    .ns-cal-span-off { background: #ffedd5; color: #c2410c; border-left-color: #ea580c; }
    .ns-cal-span-start.ns-cal-span-nghi,
    .ns-cal-span-middle.ns-cal-span-nghi,
    .ns-cal-span-end.ns-cal-span-nghi { background: #e6f4ec; }
    .ns-cal-span-middle.ns-cal-span-nghi { border-left-color: #1a7a4c; }
    .ns-cal-empty { font-size: 10px !important; color: #d1d5db; margin-top: 1px; }
    .ns-cal-more { font-size: 9px !important; font-weight: 700; color: #9ca3af; margin-top: auto; padding-top: 1px; }
    .ns-cal-day.is-today { box-shadow: inset 0 0 0 2px #1a7a4c; z-index: 1; position: relative; }
    .ns-cal-day.is-sel { background: #e8f4fd; box-shadow: inset 0 0 0 2px #3b82f6; z-index: 1; position: relative; }
    .ns-cal-day.is-sunday { background: #fff1f2; }
    .ns-cal-day.is-sunday.is-sel { background: #ffe4e6; }
    .ns-cal-day.is-sunday.is-today { box-shadow: inset 0 0 0 2px #dc2626; }
    .ns-cal-day.is-sunday b { color: #dc2626; }
    .ns-cal-day.has-off { background: #f8faf9; }
    .ns-cal-day.has-ct-off { background: #fff7ed; }
    .ns-cal-day.has-bd { box-shadow: inset 0 -3px 0 #f472b6; }
    .ns-cal-day.has-nhac { box-shadow: inset 0 0 0 1px #fca5a5; }
    .lcv-cal-summary {
      margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f2f1; flex-shrink: 0;
    }
    .lcv-sum-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
    .lcv-sum-title { font-size: 12px; font-weight: 700; color: #374151; margin-right: 4px; }
    .lcv-sum-chip {
      font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #f3f5f4; color: #4b5563;
    }
    .lcv-sum-nhac { background: #fee2e2; color: #b91c1c; }
    .lcv-sum-nghi { background: #e6f4ec; color: #1a7a4c; }
    .lcv-sum-bd { background: #fce7f3; color: #be185d; }
    .lcv-sum-ship { background: #dbeafe; color: #1d4ed8; }
    .lcv-sum-muted { background: #f9fafb; color: #9ca3af; }
    .lcv-sum-list { display: flex; flex-wrap: wrap; gap: 6px; }
    .lcv-sum-item {
      border: 1px solid #e8ecea; background: #fff; border-radius: 10px; padding: 6px 10px;
      font-size: 11px; color: #4b5563; cursor: pointer; text-align: left; max-width: 100%;
    }
    .lcv-sum-item:hover { background: #f8faf9; border-color: #d1d5db; }
    .lcv-sum-item b { color: #1a1d1f; font-weight: 700; }
    .lcv-sum-item.soon { border-color: #fdba74; background: #fff7ed; }
    .lcv-sum-item.over { border-color: #fca5a5; background: #fef2f2; color: #b91c1c; }
    .lcv-sum-sources { font-size: 10px; color: #9ca3af; margin-top: 10px; line-height: 1.45; }
    .lcv-gantt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; min-height: 220px; }
    .lcv-gantt-col {
      border: 1px solid #e8ecea; border-radius: 14px; background: #fafbfb;
      display: flex; flex-direction: column; min-height: 200px; overflow: hidden;
    }
    .lcv-gantt-head {
      padding: 10px 12px; font-size: 12px; font-weight: 800; text-align: center;
      background: linear-gradient(180deg, #f3f5f4, #eef1ef); border-bottom: 1px solid #e8ecea;
      color: #374151;
    }
    .lcv-gantt-body { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 360px; }
    .lcv-gantt-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: #d1d5db; font-size: 12px; min-height: 80px; }
    .lcv-gantt-item {
      background: #fff; border: 1px solid #e8ecea; border-radius: 10px; padding: 8px 10px;
      border-left: 3px solid #1a7a4c; box-shadow: 0 1px 2px rgba(0,0,0,.04);
    }
    .lcv-gantt-item-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
    .lcv-gantt-item-top b { font-size: 12px; color: #1a1d1f; }
    .lcv-gantt-item-kh { font-size: 11px; font-weight: 600; color: #374151; margin-bottom: 2px; }
    .lcv-gantt-item-meta { font-size: 10px; color: #6b7280; }
    .lcv-giao-daybar { border-left: 4px solid #1a7a4c; }
    /* ===== Lịch giao hàng — board ===== */
    .lcv-board { display: grid; grid-template-columns: 320px 1fr; gap: 14px; align-items: start; }
    @media (max-width: 860px) { .lcv-board { grid-template-columns: 1fr; } }
    .lcv-board-col { padding: 12px; }
    .lcv-board-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
    .lcv-board-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: #e8f5ee; color: #1a7a4c; font-size: 12px; font-weight: 700; text-align: center; }
    .lcv-board-orders, .lcv-chuyen-list { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow-y: auto; }
    .lcv-board-empty { color: #9ca3af; font-size: 13px; text-align: center; padding: 18px 8px; }
    .lcv-oc { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px 10px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
    .lcv-oc:active { cursor: grabbing; }
    .lcv-oc-top { display: flex; justify-content: space-between; gap: 6px; }
    .lcv-oc-kh { font-weight: 700; font-size: 13px; color: #111827; }
    .lcv-oc-kg { font-size: 12px; font-weight: 700; color: #1a7a4c; }
    .lcv-oc-mid { font-size: 11px; color: #6b7280; margin: 3px 0; }
    .lcv-oc-sp { color: #374151; }
    .lcv-oc-bot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
    .lcv-oc-loc { font-size: 11px; }
    .lcv-oc-loc.ok { color: #16a34a; }
    .lcv-oc-loc.warn { color: #dc2626; font-weight: 600; }
    .lcv-oc-locbtn { border: none; background: #f3f4f6; color: #374151; font-size: 11px; padding: 2px 8px; border-radius: 6px; cursor: pointer; }
    .lcv-oc-locbtn:hover { background: #e5e7eb; }
    .lcv-cc { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; }
    .lcv-cc.over { border-color: #fca5a5; background: #fff7f7; }
    .lcv-cc.lcv-drop-on, #lcvChDrop.lcv-drop-on { outline: 2px dashed #1a7a4c; outline-offset: 2px; }
    .lcv-cc-head { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; }
    .lcv-cc-xe { font-weight: 700; color: #111827; }
    .lcv-cc-load { font-weight: 700; color: #1a7a4c; }
    .lcv-cc-load.over { color: #dc2626; }
    .lcv-cc-crew { font-size: 11px; color: #6b7280; margin-top: 3px; }
    .lcv-cc-crew.warn { color: #d97706; }
    .lcv-cc-over { font-size: 11px; color: #dc2626; font-weight: 600; margin-top: 2px; }
    .lcv-cc-items { list-style: none; margin: 6px 0 0; padding: 0; font-size: 11px; color: #374151; }
    .lcv-cc-items li { display: flex; justify-content: space-between; padding: 1px 0; }
    .lcv-cc-items li.muted { color: #9ca3af; }
    .lcv-cc-kg { color: #1a7a4c; }
    .lcv-cc-foot { margin-top: 6px; text-align: right; }
    /* Chuyến editor */
    .lcv-chuyen-panel { max-width: 560px; width: 92vw; }
    .lcv-loc-panel { max-width: 460px; width: 92vw; }
    .lcv-ch-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .lcv-ch-conflicts { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; color: #c2410c; font-size: 12px; }
    .lcv-ch-conflicts.hidden { display: none; }
    .lcv-ch-load { margin-top: 10px; font-size: 13px; color: #374151; }
    .lcv-ch-load.over { color: #dc2626; font-weight: 700; }
    .lcv-ch-over { color: #dc2626; font-weight: 700; }
    .lcv-ch-drop { margin-top: 10px; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px; min-height: 80px; }
    .lcv-ch-drop-hint { color: #9ca3af; font-size: 12px; text-align: center; }
    .lcv-ch-items { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
    .lcv-ei { display: flex; align-items: center; gap: 8px; background: #f9fafb; border: 1px solid #eef0f2; border-radius: 8px; padding: 5px 8px; }
    .lcv-ei-kh { flex: 1; font-size: 12px; font-weight: 600; color: #111827; }
    .lcv-ei-kg { font-size: 12px; color: #1a7a4c; }
    .lcv-ei-del { border: none; background: transparent; color: #9ca3af; font-size: 18px; line-height: 1; cursor: pointer; }
    .lcv-ei-del:hover { color: #dc2626; }
    .lcv-ch-foot { display: flex; align-items: center; gap: 8px; }
    .lcv-spacer { flex: 1; }
    .lcv-loc-results { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; max-height: 200px; overflow-y: auto; }
    .lcv-loc-item { text-align: left; border: 1px solid #e5e7eb; background: #fff; border-radius: 8px; padding: 6px 8px; font-size: 12px; cursor: pointer; }
    .lcv-loc-item:hover { background: #f0f7ff; }
    .lcv-loc-item .muted { color: #9ca3af; }

    /* ===== Giao hàng — 4 cột (rebuild) ===== */
    .lcv-giao-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; }
    .lcv-giao-day { display: flex; align-items: center; gap: 6px; }
    .lcv-giao-daylbl { font-weight: 800; font-size: 15px; color: #111827; min-width: 120px; text-align: center; }
    .lcv-giao-dayinput { width: 150px; }
    .lcv-giao-topinfo { display: flex; align-items: center; gap: 10px; }
    .lcv-board4 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)) minmax(0,1.15fr); gap: 12px; align-items: stretch; }
    @media (max-width: 1200px) { .lcv-board4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
    @media (max-width: 680px) { .lcv-board4 { grid-template-columns: 1fr; } }
    .lcv-board-col { padding: 10px; display: flex; flex-direction: column; min-height: 420px; max-height: calc(100vh - 250px); }
    .lcv-board-sub { display: block; font-size: 10px; color: #9ca3af; margin-top: 2px; }
    .lcv-col-done .lcv-board-head { border-bottom: 2px solid #bbf7d0; padding-bottom: 8px; }
    .lcv-col-sx .lcv-board-head { border-bottom: 2px solid #fde68a; padding-bottom: 8px; }
    .lcv-col-nb .lcv-board-head { border-bottom: 2px solid #bfdbfe; padding-bottom: 8px; }
    .lcv-col-trip .lcv-board-head { border-bottom: 2px solid #c7d2fe; padding-bottom: 8px; }
    .lcv-board4 .lcv-board-orders, .lcv-board4 .lcv-chuyen-list { flex: 1; min-height: 0; max-height: none; }
    .lcv-oc-dl { font-weight: 700; font-size: 13px; color: #111827; }
    .lcv-oc-don { font-size: 11px; color: #374151; margin-top: 2px; }
    .lcv-oc-glass { font-size: 12px; font-weight: 600; color: #1f2937; margin-top: 2px; }
    .lcv-oc-spec { font-size: 11px; color: #6b7280; margin-top: 1px; }
    .lcv-oc-warnsx { font-size: 10.5px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 2px 6px; margin-top: 4px; }
    .lcv-oc-nb .lcv-oc-don { font-weight: 600; color: #1f2937; }
    .lcv-trip-new { border: 1px dashed #c7d2fe; border-radius: 10px; padding: 8px; text-align: center; font-size: 11px; color: #6366f1; margin-bottom: 8px; background: #f5f7ff; flex-shrink: 0; }
    .lcv-trip-new.lcv-drop-on { outline: 2px dashed #4f46e5; outline-offset: 2px; background: #eef2ff; }
    .lcv-ei { flex-wrap: wrap; }
    .lcv-ei-main { flex: 1; min-width: 120px; display: flex; flex-direction: column; }
    .lcv-ei-sub { font-size: 11px; color: #6b7280; }
    .lcv-ei-sx { font-size: 10px; color: #b45309; }
    .lcv-ei-qty { display: flex; align-items: center; gap: 4px; }
    .lcv-ei-tam { width: 58px; padding: 3px 6px; font-size: 12px; }
    .lcv-ei-qmax { font-size: 11px; color: #9ca3af; }
    /* Xuất hàng theo buổi */
    .lcv-xuat-buoi { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
    @media (max-width: 760px) { .lcv-xuat-buoi { grid-template-columns: 1fr; } }
    .lcv-xb-col { border: 1px solid #eef0f2; border-radius: 10px; overflow: hidden; }
    .lcv-xb-head { background: #f8faf9; padding: 6px 10px; font-weight: 700; font-size: 12px; color: #374151; border-bottom: 1px solid #eef0f2; }
    .lcv-xb-body { padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 60px; }
    .lcv-xb-empty { color: #9ca3af; font-size: 12px; text-align: center; padding: 8px; }
    .lcv-xchip { text-align: left; border: 1px solid #e5e7eb; background: #fff; border-radius: 10px; padding: 7px 9px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
    .lcv-xchip:hover { border-color: #1a7a4c; }
    .lcv-xchip.active { border-color: #1a7a4c; background: #f0fdf6; box-shadow: 0 0 0 2px rgba(26,122,76,.15); }
    .lcv-xchip.done { opacity: .65; }
    .lcv-xchip-xe { font-weight: 700; font-size: 12px; color: #111827; }
    .lcv-xchip-meta { font-size: 10.5px; color: #6b7280; }
    .lcv-xd-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid #eef0f2; margin-bottom: 8px; }
    .lcv-xd-list { display: flex; flex-direction: column; gap: 6px; }
    .lcv-xd-row { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 1px solid #eef0f2; border-radius: 8px; background: #fff; flex-wrap: wrap; }
    .lcv-xd-main { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
    .lcv-xd-kh { font-weight: 600; font-size: 13px; color: #111827; }
    .lcv-xd-sub { font-size: 11px; color: #6b7280; }
    .lcv-xd-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
    .lcv-xd-chk { font-size: 12px; color: #374151; display: flex; align-items: center; gap: 4px; }
    .lcv-xd-sl { width: 58px; padding: 3px 6px; font-size: 12px; }
    .lcv-xd-slmax { font-size: 11px; color: #9ca3af; }
    .lcv-xd-done { font-size: 12px; font-weight: 700; color: #16a34a; }
    .lcv-xd-return { font-size: 12px; font-weight: 600; color: #b45309; }
    .lcv-xd-foot { margin-top: 12px; text-align: right; }
    .lcv-giao-nhac {
      margin-bottom: 12px; padding: 10px 12px; border-radius: 10px;
      border: 1px solid #fecaca; background: linear-gradient(90deg, #fff5f5 0%, #fff 60%);
    }
    .lcv-giao-nhac.hidden { display: none; }
    .lcv-giao-nhac-head {
      display: flex; align-items: center; gap: 6px;
      font-size: 12px; font-weight: 800; color: #b91c1c; margin-bottom: 8px;
    }
    .lcv-giao-nhac-list { display: flex; flex-direction: column; gap: 6px; }
    .lcv-giao-nhac-item {
      display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px;
      border-radius: 8px; background: #fff; border: 1px solid #fecaca;
    }
    .lcv-giao-nhac-tag {
      flex-shrink: 0; font-size: 10px; font-weight: 800; color: #fff;
      background: #dc2626; padding: 2px 6px; border-radius: 4px; line-height: 1.4;
    }
    .lcv-giao-nhac-body { flex: 1; min-width: 0; }
    .lcv-giao-nhac-body b { display: block; font-size: 12px; color: #1a1d1f; margin-bottom: 2px; }
    .lcv-giao-nhac-meta { font-size: 11px; color: #6b7280; }
    .lcv-xuat-order-head { background: #f8faf9; border-bottom: 1px solid #e8ecea; }
    .fleet-tt-bar { border-left: 4px solid #1a7a4c; }
    .fleet-tt-bar-row {
      display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
    }
    .fleet-tt-quy-pill {
      display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px;
      background: #f0fdf4; border-radius: 10px; border: 1px solid #bbf7d0;
    }
    .fleet-tt-quy-lbl { font-size: 11px; font-weight: 700; color: #6b7280; text-transform: uppercase; }
    .fleet-tt-quy-num { font-size: 18px; font-weight: 800; color: #1a7a4c; line-height: 1; }
    .fleet-tt-quy-unit { font-size: 11px; color: #6b7280; }
    .fleet-tt-quy-sep { color: #d1d5db; margin: 0 2px; }
    .fleet-tt-gd-filter {
      display: inline-flex; border: 1px solid #e8ecea; border-radius: 10px; overflow: hidden; background: #fff;
    }
    .fleet-tt-gd-filter-btn {
      border: none; background: transparent; padding: 7px 14px; font-size: 12px; font-weight: 600;
      color: #6b7280; cursor: pointer;
    }
    .fleet-tt-gd-filter-btn.active { background: #374151; color: #fff; }
    .fleet-tt-gd-filter-btn:hover:not(.active) { background: #f3f5f4; }
    .fleet-tt-bar-actions { display: flex; gap: 8px; margin-left: auto; }
    .btn-sm { padding: 6px 12px; font-size: 12px; }
    .fleet-tt-split {
      display: grid; grid-template-columns: minmax(200px, auto) minmax(0, 1fr); gap: 12px; align-items: stretch;
    }
    .fleet-tt-col-xe {
      width: auto; min-width: 200px; align-self: start; overflow: visible;
    }
    .fleet-tt-col-xe .kh-table-wrap {
      width: 100%; overflow-x: visible;
    }
    .fleet-tt-xe-table {
      width: auto !important;
      min-width: 0 !important;
      max-width: none !important;
      table-layout: auto !important;
    }
    .fleet-tt-xe-table th,
    .fleet-tt-xe-table td {
      padding: 8px 12px; white-space: nowrap;
      overflow: visible !important;
      max-width: none !important;
    }
    .fleet-tt-xe-table th:first-child,
    .fleet-tt-xe-table td:first-child {
      width: 1%; padding-right: 10px;
    }
    .fleet-tt-xe-table th:last-child,
    .fleet-tt-xe-table td:last-child {
      width: auto; min-width: 10rem;
    }
    .fleet-tt-col { display: flex; flex-direction: column; min-height: 420px; }
    .fleet-tt-col-head {
      display: flex; align-items: center; justify-content: space-between; gap: 8px;
      padding: 12px 14px; border-bottom: 1px solid #e8ecea; background: #f8faf9;
    }
    .fleet-tt-table-wrap { flex: 1; max-height: calc(100vh - 340px); min-height: 280px; }
    .fleet-tt-loai-switch {
      display: inline-flex; border: 1px solid #e8ecea; border-radius: 12px; overflow: hidden; background: #fff;
    }
    .fleet-tt-loai-btn {
      border: none; background: transparent; padding: 8px 18px; font-size: 13px; font-weight: 700;
      color: #6b7280; cursor: pointer; transition: background .12s, color .12s;
    }
    .fleet-tt-loai-btn.active { background: #1a7a4c; color: #fff; }
    .fleet-tt-loai-btn:hover:not(.active) { background: #f3f5f4; }
    .fleet-tt-gd-table th, .fleet-tt-gd-table td { font-size: 12px; }
    @media (max-width: 1100px) {
      .fleet-tt-split { grid-template-columns: 1fr; }
      .fleet-tt-table-wrap { max-height: 360px; }
    }
    @media (max-width: 900px) { .lcv-gantt { grid-template-columns: 1fr; } }
    .ns-cal-nhac-warn { border-left: 3px solid #f59e0b; padding-left: 8px; }
    .ns-cal-nhac-over { border-left: 3px solid #ef4444; padding-left: 8px; }
    .ns-cal-legend { display: inline-flex; align-items: center; gap: 4px; color: #6b7280; }
    .ns-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
    .ns-dot-le { background: #22c55e; }
    .ns-dot-off { background: #f97316; }
    .ns-dot-bd { background: #ec4899; }
    .ns-dot-sun { background: #ef4444; }
    .ns-dot-ship { background: #3b82f6; }
    .ns-dot-nhac { background: #ef4444; }
    .ns-cal-detail { max-height: none; min-height: 0; overflow: hidden; }
    .ns-cal-status {
      font-size: 12px; font-weight: 700; padding: 8px 10px; border-radius: 10px; margin-bottom: 8px;
    }
    .ns-ct-work { background: #e6f4ec; color: #1a7a4c; }
    .ns-ct-off { background: #ffedd5; color: #c2410c; }
    .ns-ct-holiday { background: #dcfce7; color: #166534; }
    .ns-cal-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0f2f1; }
    .ns-cal-section-head {
      display: flex; align-items: center; justify-content: space-between;
      font-weight: 700; font-size: 12px; margin-bottom: 8px; color: #374151;
    }
    .ns-cal-section-head small { color: #9ca3af; font-weight: 600; }
    .ns-cal-person { padding: 6px 0; border-bottom: 1px solid #f8faf9; font-size: 13px; }
    .ns-cal-person:last-child { border-bottom: none; }
    .ns-cal-pending { opacity: .85; border-left: 3px solid #fbbf24; padding-left: 8px; }
    /* —— Theo dõi GPS —— */
    #fleetPanelTheodoi:not(.hidden) {
      display: flex;
      flex-direction: column;
      height: calc(100vh - var(--vpg-topbar) - 128px);
      min-height: 520px;
      max-height: calc(100vh - var(--vpg-topbar) - 128px);
      overflow: hidden;
    }
    #fleetPanelTheodoi:not(.hidden) > #fleetTheodoiMount {
      flex: 1 1 auto;
      min-height: 0;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    .track-shell {
      flex: 1;
      min-height: 0;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    .track-toolbar {
      flex-shrink: 0;
      padding: 8px 12px !important;
      margin-bottom: 8px !important;
    }
    .track-layout {
      display: flex; gap: 10px; align-items: stretch;
      flex: 1; min-height: 0; overflow: hidden;
    }
    .track-sidebar {
      width: 236px; min-width: 236px; max-width: 236px; flex-shrink: 0;
      display: flex; flex-direction: column; overflow: hidden;
      padding: 0; align-self: stretch; min-height: 440px; height: 100%;
    }
    .track-right-col {
      flex: 1; min-width: 0; min-height: 440px;
      display: flex; flex-direction: column;
    }
    .track-map-card {
      flex: 1; min-height: 440px; border-radius: 14px; overflow: hidden;
      border: 1px solid #dbe4ff;
      box-shadow: 0 4px 24px rgba(72, 128, 255, 0.1);
      position: relative; background: #e8ecea;
    }
    .track-map-inner { position: absolute; inset: 0; }
    #trackingMap { width: 100%; height: 100%; z-index: 1; }
    .track-map-inner .leaflet-top.leaflet-left { top: 58px; }
    .track-map-inner .leaflet-bottom.leaflet-left { bottom: 12px; left: 10px; }
    .track-map-search {
      position: absolute; left: 10px; top: 10px; bottom: auto; z-index: 40;
      width: min(300px, calc(100% - 20px)); pointer-events: auto;
    }
    .track-map-search-box {
      display: flex; align-items: center; gap: 8px;
      background: rgba(255,255,255,.98); backdrop-filter: blur(10px);
      border: 1px solid #e8ecea; border-radius: 12px;
      box-shadow: 0 4px 20px rgba(26,29,31,.12);
      padding: 0 10px 0 12px; min-height: 40px;
    }
    .track-map-search-box:focus-within {
      border-color: #1a7a4c; box-shadow: 0 0 0 3px rgba(26,122,76,.12);
    }
    .track-map-search-ico { color: #9ca3af; flex-shrink: 0; display: flex; }
    .track-map-search-input {
      flex: 1; min-width: 0; border: none; background: transparent;
      font-size: 13px; color: #1a1d1f; outline: none; padding: 8px 0;
    }
    .track-map-search-input::placeholder { color: #9ca3af; }
    .track-map-search-results {
      margin-top: 6px; max-height: 240px; overflow: auto;
      background: rgba(255,255,255,.98); backdrop-filter: blur(10px);
      border: 1px solid #e8ecea; border-radius: 12px;
      box-shadow: 0 8px 28px rgba(26,29,31,.14);
    }
    .track-map-search-results.hidden { display: none; }
    .track-map-search-item {
      display: flex; align-items: flex-start; gap: 10px; width: 100%;
      padding: 9px 12px; border: none; background: transparent; cursor: pointer;
      text-align: left; border-bottom: 1px solid #f3f5f4;
    }
    .track-map-search-item:last-child { border-bottom: none; }
    .track-map-search-item:hover, .track-map-search-item.is-active { background: #f0fdf6; }
    .track-map-search-kind {
      flex-shrink: 0; font-size: 9px; font-weight: 700; text-transform: uppercase;
      letter-spacing: .04em; padding: 3px 6px; border-radius: 6px; margin-top: 2px;
    }
    .track-map-search-kind-xe { background: #e6f4ec; color: #1a7a4c; }
    .track-map-search-kind-kh { background: #fee2e2; color: #b91c1c; }
    .track-map-search-body { min-width: 0; flex: 1; }
    .track-map-search-lbl { font-size: 12px; font-weight: 600; color: #1a1d1f; line-height: 1.3; }
    .track-map-search-sub { font-size: 10px; color: #6b7280; margin-top: 2px; }
    .track-map-search-empty { padding: 12px; font-size: 12px; color: #9ca3af; text-align: center; }
    .track-top-stats {
      position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
      z-index: 35; pointer-events: none;
      display: flex; gap: 0; flex-wrap: nowrap;
      background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
      border: 1px solid #e8ecea; border-radius: 14px;
      box-shadow: 0 4px 24px rgba(26,29,31,.1);
      padding: 4px 6px; max-width: calc(100% - 80px);
      overflow-x: auto;
    }
    .track-top-stat {
      display: flex; align-items: center; gap: 8px;
      padding: 6px 12px; min-width: 0;
      border-right: 1px solid #f0f2f1;
    }
    .track-top-stat:last-child { border-right: none; }
    .track-top-stat-ico {
      width: 32px; height: 32px; border-radius: 10px;
      background: #e6f4ec; color: #1a7a4c;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .track-top-stat-body { min-width: 0; }
    .track-top-stat-lbl {
      display: block; font-size: 9px; font-weight: 600; color: #9ca3af;
      text-transform: uppercase; letter-spacing: .04em; line-height: 1.2;
    }
    .track-top-stat-val {
      display: block; font-size: 12px; font-weight: 700; color: #1a1d1f;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px;
    }
    .track-dash-float {
      position: absolute; left: 10px; top: 58px; z-index: 36;
      pointer-events: none;
      width: min(292px, calc(100% - 180px));
      max-width: 292px;
      right: auto; bottom: auto;
    }
    .track-dash-float.is-empty { visibility: hidden; pointer-events: none; }
    .track-dash-card {
      pointer-events: auto;
      background: rgba(255,255,255,.98); backdrop-filter: blur(10px);
      border: 1px solid #e8ecea; border-radius: 12px;
      box-shadow: 0 4px 20px rgba(26,29,31,.12);
      padding: 0; overflow: hidden;
    }
    .track-dash-panel-compact .track-dash-head {
      padding: 8px 10px 6px; border-bottom: 1px solid #f0f2f1;
    }
    .track-dash-panel-compact .track-dash-body {
      padding: 8px 10px 10px; max-height: 200px; overflow-y: auto;
    }
    .track-dash-panel-compact .track-dash-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px;
    }
    .track-dash-panel-compact .track-dash-lbl { font-size: 8px; }
    .track-dash-panel-compact .track-dash-val {
      font-size: 11px; line-height: 1.3;
      overflow: hidden; text-overflow: ellipsis;
    }
    .track-dash-panel-compact .track-dash-cell-wide .track-dash-val {
      white-space: nowrap;
    }
    .track-dash-panel-compact .track-dash-plate { font-size: 13px !important; }
    .track-dash-panel-compact .track-dash-name { font-size: 11px !important; }
    .track-dash-panel-compact .track-dash-kh-name {
      font-size: 12px !important; font-weight: 700; color: #b91c1c !important; line-height: 1.25;
    }
    .track-dash-panel-compact .track-dash-kh-meta {
      font-size: 10px; color: #6b7280; margin-top: 2px; line-height: 1.35;
    }
    .track-dash-panel-compact .track-dash-kh-route-line { color: #1d4ed8; font-weight: 600; }
    .track-dash-panel-compact .track-dash-tabs { padding: 0 8px; }
    .track-dash-panel-compact .track-dash-tab { padding: 5px 8px; font-size: 10px; }
    .track-dash-panel-compact .track-kh-actions {
      margin-top: 8px; padding-top: 6px; gap: 6px;
    }
    .track-dash-panel-compact .track-kh-actions .btn-xs { font-size: 10px; padding: 4px 8px; }
    .track-top-stats.is-hidden { display: none !important; }
    .track-dash-panel { width: 100%; }
    .track-dash-head {
      display: flex; align-items: flex-start; justify-content: space-between;
      gap: 10px; padding: 12px 14px 8px;
      border-bottom: 1px solid #f0f2f1;
    }
    .track-dash-hero { min-width: 0; }
    .track-dash-tabs {
      display: flex; gap: 0; padding: 0 14px;
      border-bottom: 1px solid #f0f2f1; overflow-x: auto;
    }
    .track-dash-tab {
      flex-shrink: 0; border: none; background: transparent;
      font-size: 11px; font-weight: 600; color: #9ca3af;
      padding: 10px 12px; cursor: pointer; position: relative;
      border-bottom: 2px solid transparent; margin-bottom: -1px;
    }
    .track-dash-tab:hover { color: #374151; }
    .track-dash-tab.active { color: #1a7a4c; border-bottom-color: #1a7a4c; }
    .track-dash-body { padding: 12px 14px 14px; }
    .track-dash-profile {
      display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
    }
    .track-dash-avatar {
      width: 40px; height: 40px; border-radius: 50%;
      background: #e6f4ec; color: #1a7a4c;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .track-dash-profile-name { font-size: 13px; font-weight: 700; color: #1a1d1f; }
    .track-dash-profile-role { font-size: 10px; color: #9ca3af; margin-top: 1px; }
    .track-dash-tel { color: #1a7a4c; font-weight: 600; text-decoration: none; }
    .track-dash-tel:hover { text-decoration: underline; }
    .track-xe-sdt { color: #1a7a4c; font-weight: 500; }
    .track-dash-grid {
      display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px;
    }
    .track-dash-cell { min-width: 0; }
    .track-dash-cell-wide { grid-column: 1 / -1; }
    .track-sidebar-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 12px; border-bottom: 1px solid #eef1ef; flex-shrink: 0;
    }
    .track-sidebar-actions {
      display: flex; align-items: center; gap: 6px;
      padding: 8px 10px; border-bottom: 1px solid #eef1ef; flex-shrink: 0;
    }
    .track-sidebar-actions .track-act-pick {
      flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    }
    .track-sidebar-actions .track-act-icon {
      flex-shrink: 0; padding: 6px 9px; display: inline-flex; align-items: center; justify-content: center;
    }
    .track-filter-tabs {
      display: flex; gap: 4px; padding: 8px 10px; border-bottom: 1px solid #eef1ef; flex-shrink: 0;
    }
    .track-filter-tab {
      flex: 1; font-size: 11px; font-weight: 600; padding: 5px 6px;
      border-radius: 8px; border: none; background: #f3f5f4; color: #6b7280; cursor: pointer;
    }
    .track-filter-tab.active { background: #e6f4ec; color: #1a7a4c; }
    .track-xe-list {
      flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
      padding: 6px; -webkit-overflow-scrolling: touch;
    }
    .map-overlay {
      position: absolute; top: 12px; left: 12px; z-index: 30;
      display: flex; flex-wrap: wrap; gap: 8px; pointer-events: none;
    }
    .map-stat-chip {
      background: rgba(255,255,255,.92); border: 1px solid #e8ecea;
      border-radius: 999px; padding: 4px 12px; font-size: 11px; font-weight: 600; color: #374151;
      box-shadow: 0 2px 8px rgba(0,0,0,.06);
    }
    .track-xe-item {
      display: flex; gap: 8px; width: 100%; text-align: left;
      padding: 8px 8px; margin-bottom: 4px; border-radius: 10px;
      border: 1px solid transparent; background: transparent; cursor: pointer;
      transition: background .15s, border-color .15s;
    }
    .track-xe-item-detail { align-items: flex-start; padding: 7px 8px; }
    .track-xe-item-detail .track-xe-st { margin-top: 4px; }
    .track-xe-item:hover { background: #f8faf9; }
    .track-xe-sel { background: #eef8f2 !important; border-color: #b8dcc8 !important; }
    .track-xe-st {
      width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0;
    }
    .track-xe-st-ok { background: #1a7a4c; }
    .track-xe-st-move { background: #ea580c; }
    .track-xe-st-warn { background: #dc2626; }
    .track-xe-st-off { background: #d1d5db; }
    .track-xe-body { min-width: 0; flex: 1; }
    .track-xe-title { font-size: 12px; font-weight: 700; color: #1a1d1f; line-height: 1.3; }
    .track-xe-meta { font-size: 10px; color: #6b7280; margin-top: 2px; }
    .track-xe-plate { font-weight: 600; letter-spacing: .02em; }
    .track-xe-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
    .track-xe-speed { font-size: 10px; font-weight: 600; color: #374151; }
    .track-xe-loc { font-size: 10px; color: #9ca3af; margin-top: 3px; line-height: 1.35;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .track-xe-badge {
      font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 999px; text-transform: uppercase;
    }
    .track-xe-badge-ok { background: #e6f4ec; color: #1a7a4c; }
    .track-xe-badge-move { background: #ffedd5; color: #c2410c; }
    .track-xe-badge-warn { background: #fee2e2; color: #b91c1c; }
    .track-xe-badge-off { background: #f3f4f6; color: #6b7280; }
    .track-dash-plate { font-size: 15px; font-weight: 800; color: #1a7a4c; letter-spacing: .03em; line-height: 1.2; }
    .track-dash-name { font-size: 11px; color: #6b7280; margin-top: 2px; }
    .track-dash-lbl { display: block; font-size: 9px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: .04em; }
    .track-dash-val { display: block; font-size: 11px; font-weight: 600; color: #1a1d1f; margin-top: 1px; line-height: 1.25; }
    .track-dash-nav { display: flex; gap: 4px; flex-shrink: 0; margin-left: auto; }
    .track-nav-btn {
      width: 28px; height: 28px; border-radius: 8px; border: 1px solid #e8ecea;
      background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    }
    .track-nav-btn:hover { background: #f3f5f4; }
    .vpg-map-pin-wrap { background: transparent; border: none; }
    .vpg-map-pin { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
    .vpg-depot-gmaps-icon-wrap { background: transparent; border: none; }
    .vpg-depot-gmaps-pin {
      display: flex; flex-direction: row; align-items: flex-end; justify-content: flex-end;
      gap: 4px; pointer-events: auto;
    }
    .vpg-depot-gmaps-label {
      font-size: 10px; font-weight: 700; color: #1a7a4c; line-height: 1.2;
      text-align: right; padding-bottom: 4px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      text-shadow: 0 0 4px #fff, 0 0 6px #fff, 1px 1px 0 #fff, -1px -1px 0 #fff;
    }
    .vpg-depot-gmaps-marker {
      flex-shrink: 0; line-height: 0;
      filter: drop-shadow(0 2px 4px rgba(26,122,76,.35));
    }
    .vpg-trail-end-wrap { background: transparent; border: none; }
    .vpg-trail-end-start, .vpg-trail-end-finish {
      width: 22px; height: 22px; border-radius: 50%; border: 2px solid;
      font-size: 9px; font-weight: 800; display: flex; align-items: center;
      justify-content: center; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18);
    }
    .vpg-trail-end-start { border-color: #22c55e; color: #15803d; }
    .vpg-trail-end-finish { border-color: #14532d; background: #15803d; color: #fff; }
    .vpg-trail-arrow-wrap { background: transparent; border: none; }
    .vpg-trail-arrow {
      font-size: 13px; color: #15803d; line-height: 1; font-weight: 700;
      text-shadow: 0 0 3px #fff, 0 0 5px #fff;
    }
    .track-trail-legend {
      display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 10px;
      padding: 6px 8px; background: #f0fdf4; border-radius: 8px; border: 1px solid #bbf7d0;
    }
    .track-trail-legend-item {
      font-size: 10px; color: #374151; display: inline-flex; align-items: center; gap: 4px;
    }
    .track-trail-swatch {
      width: 18px; height: 4px; border-radius: 2px; display: inline-block;
    }
    .track-trail-swatch-old { background: linear-gradient(90deg, #bbf7d0, #86efac); }
    .track-trail-swatch-new { background: linear-gradient(90deg, #22c55e, #15803d); }
    .vpg-trail-legend-start, .vpg-trail-legend-end {
      display: inline-flex; width: 18px; height: 18px; border-radius: 50%;
      align-items: center; justify-content: center; font-size: 8px;
    }
    .vpg-trail-legend-start { border: 2px solid #22c55e; color: #15803d; background: #fff; }
    .vpg-trail-legend-end { border: 2px solid #14532d; background: #15803d; color: #fff; }
    .vpg-kh-gmaps-icon-wrap { background: transparent; border: none; }
    .vpg-kh-gmaps-pin {
      display: flex; flex-direction: row; align-items: flex-end; justify-content: flex-end;
      gap: 6px; pointer-events: auto;
    }
    .vpg-kh-gmaps-pin.is-selected .vpg-kh-gmaps-label { color: #b91c1c; font-weight: 700; }
    .vpg-kh-gmaps-pin.is-selected .vpg-kh-gmaps-marker svg path:first-of-type {
      fill: #dc2626; stroke: #991b1b; stroke-width: 1.3;
    }
    .vpg-kh-gmaps-pin.is-selected .vpg-kh-gmaps-marker svg circle:first-of-type { fill: #991b1b; }
    .vpg-kh-gmaps-pin.is-selected .vpg-kh-gmaps-marker {
      filter: drop-shadow(0 2px 6px rgba(220,38,38,.45));
    }
    .vpg-kh-gmaps-pin:not(.is-selected) .vpg-kh-gmaps-label { color: #6b7280; font-weight: 500; }
    .vpg-kh-gmaps-label {
      font-size: 12px; font-weight: 500; color: #6b7280; line-height: 1.25;
      text-align: right; padding-bottom: 6px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      text-shadow: 0 0 4px #fff, 0 0 6px #fff, 1px 1px 0 #fff, -1px -1px 0 #fff;
    }
    .vpg-kh-gmaps-marker {
      flex-shrink: 0; line-height: 0;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,.22));
    }
    .vpg-kh-gmaps-pin-compact .vpg-kh-gmaps-marker { filter: drop-shadow(0 1px 3px rgba(0,0,0,.18)); }
    .vpg-kh-dot-wrap { background: transparent; border: none; }
    .vpg-kh-dot {
      width: 8px; height: 8px; border-radius: 50%;
      background: #fff; border: 1.5px solid #9ca3af;
      box-shadow: 0 1px 3px rgba(0,0,0,.2);
    }
    .vpg-kh-dot.is-selected { background: #dc2626; border-color: #991b1b; }
    .vpg-kh-cluster-wrap { background: transparent; border: none; }
    .vpg-kh-cluster {
      display: flex; align-items: center; justify-content: center;
      border-radius: 50%; color: #fff; font-weight: 800;
      border: 2px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.22);
    }
    .vpg-kh-cluster span { font-size: 12px; line-height: 1; }
    .vpg-kh-cluster-sm { width: 32px; height: 32px; background: #94a3b8; font-size: 11px; }
    .vpg-kh-cluster-md { width: 38px; height: 38px; background: #64748b; }
    .vpg-kh-cluster-lg { width: 44px; height: 44px; background: #475569; }
    .vpg-kh-cluster span { font-size: inherit; }
    .marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: transparent; }
    .marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: transparent; }
    .track-kh-map-switch {
      position: absolute; top: 10px; right: 12px; z-index: 38;
      pointer-events: auto;
      background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
      border: 1px solid #e8ecea; border-radius: 14px;
      box-shadow: 0 4px 24px rgba(26,29,31,.1);
      padding: 6px 12px 6px 10px;
    }
    .track-kh-switch {
      display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
      margin: 0;
    }
    .track-kh-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
    .track-kh-switch-ico {
      width: 28px; height: 28px; border-radius: 8px;
      background: #f3f4f6; color: #6b7280;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .track-kh-switch input:checked ~ .track-kh-switch-ico { background: #e6f4ec; color: #1a7a4c; }
    .track-kh-switch-text {
      font-size: 11px; font-weight: 600; color: #6b7280;
      text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
    }
    .track-kh-switch-count {
      font-size: 11px; font-weight: 700; color: #9ca3af; min-width: 1.2em;
    }
    .track-kh-switch input:checked ~ .track-kh-switch-text { color: #374151; }
    .track-kh-switch input:checked ~ .track-kh-switch-count { color: #1a7a4c; }
    .track-kh-switch-track {
      position: relative; width: 36px; height: 20px; border-radius: 999px;
      background: #d1d5db; transition: background .2s; flex-shrink: 0;
    }
    .track-kh-switch-track::after {
      content: ""; position: absolute; top: 2px; left: 2px;
      width: 16px; height: 16px; border-radius: 50%; background: #fff;
      box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s;
    }
    .track-kh-switch input:checked ~ .track-kh-switch-track { background: #1a7a4c; }
    .track-kh-switch input:checked ~ .track-kh-switch-track::after { transform: translateX(16px); }
    .track-dash-kh-name { font-size: 15px !important; color: #374151 !important; }
    .track-dash-kh-meta { font-size: 11px; color: #9ca3af; margin-top: 2px; }
    .track-kh-actions { margin-top: 10px; padding-top: 8px; border-top: 1px solid #eef2f7; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
    .track-kh-route {
      display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
      margin-bottom: 10px; padding: 10px 12px; border-radius: 10px;
      background: #eff6ff; border: 1px solid #bfdbfe;
    }
    .track-kh-route-km, .track-kh-route-time {
      font-size: 13px; font-weight: 700; color: #1d4ed8;
    }
    .track-kh-route-hint { font-size: 11px; color: #6b7280; width: 100%; }
    .track-kh-route-loading { font-size: 12px; color: #6b7280; margin-bottom: 10px; padding: 8px 0; }
    .track-kh-route-err { font-size: 12px; color: #b91c1c; margin-bottom: 10px; padding: 8px 0; }
    .track-kh-popup .leaflet-popup-content { min-width: 180px; }
    .track-map-coord-lbl {
      font-size: 9px; font-weight: 700; text-transform: uppercase;
      letter-spacing: .05em; color: #9ca3af; flex-shrink: 0;
    }
    .track-map-coord-val {
      font-size: 12px; font-weight: 700; color: #1a1d1f;
      font-variant-numeric: tabular-nums; flex: 1; min-width: 0;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .track-coord-tag {
      display: inline-block; font-size: 9px; font-weight: 700;
      padding: 1px 5px; border-radius: 4px; background: #e6f4ec; color: #1a7a4c;
      margin-right: 4px; vertical-align: middle;
    }
    .track-map-pick-panel {
      position: absolute; right: 12px; bottom: 12px; z-index: 45;
      width: min(280px, calc(100% - 24px));
      padding: 10px 12px;
      background: rgba(255,255,255,.98); backdrop-filter: blur(10px);
      border: 1px solid #bfdbfe; border-radius: 12px;
      box-shadow: 0 4px 24px rgba(37,99,235,.18);
      pointer-events: auto;
    }
    .track-map-pick-panel.hidden { display: none; }
    .track-map-pick-head {
      display: flex; align-items: center; justify-content: space-between;
      gap: 8px; margin-bottom: 6px;
    }
    .track-map-pick-title {
      font-size: 12px; font-weight: 700; color: #1d4ed8;
      display: flex; align-items: center; gap: 6px;
    }
    .track-map-pick-close {
      background: none; border: none; cursor: pointer;
      color: #9ca3af; padding: 2px; border-radius: 6px;
      display: flex; align-items: center; justify-content: center;
    }
    .track-map-pick-close:hover { color: #374151; background: #f3f4f6; }
    .track-map-pick-hint-txt {
      font-size: 11px; color: #6b7280; margin: 0 0 8px; line-height: 1.35;
    }
    .track-map-pick-coords {
      display: flex; align-items: baseline; gap: 8px;
      padding: 6px 8px; border-radius: 8px; background: #f8fafc;
      border: 1px solid #e8ecea; margin-bottom: 8px;
    }
    .track-map-pick-addr {
      display: flex; flex-direction: column; gap: 2px;
      padding: 6px 8px; border-radius: 8px; background: #f8fafc;
      border: 1px solid #e8ecea; margin-bottom: 8px;
    }
    .track-map-pick-addr-val {
      font-size: 12px; font-weight: 600; color: #1a1d1f; line-height: 1.35;
      word-break: break-word;
    }
    .track-map-pick-actions {
      display: flex; align-items: center; justify-content: flex-end; gap: 6px;
    }
    .track-map-card.track-map-pick-active #trackingMap { cursor: crosshair; }
    .track-map-card.track-map-pick-active .leaflet-interactive { cursor: crosshair; }
    #trackBtnPick.is-active { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
    .track-dash-coord { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
    .vpg-pick-marker-wrap { background: transparent; border: none; }
    .vpg-pick-marker { filter: drop-shadow(0 2px 6px rgba(37,99,235,.45)); }
    .track-map-inner .leaflet-bottom.leaflet-left { bottom: 12px; }
    .vpg-map-tag {
      position: absolute; top: 0; left: 50%; transform: translateX(-50%);
      font-size: 9px; font-weight: 800; letter-spacing: .03em;
      padding: 2px 7px; border-radius: 999px; color: #fff;
      box-shadow: 0 2px 6px rgba(0,0,0,.22); white-space: nowrap; max-width: 96px;
      overflow: hidden; text-overflow: ellipsis;
    }
    .vpg-map-tag-sel { box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(0,0,0,.28); }
    .vpg-arrow-wrap { background: transparent; border: none; }
    .vpg-arrow {
      color: var(--vpg-arrow-color, #1a7a4c);
      transform: rotate(var(--vpg-arrow-rot, 0deg));
      transform-origin: 50% 12.5%;
      filter: drop-shadow(0 1px 3px rgba(0,0,0,.35));
      line-height: 0; flex-shrink: 0;
    }
    .vpg-arrow-moving { animation: vpg-arrow-pulse 1.6s ease-in-out infinite; }
    @keyframes vpg-arrow-pulse {
      0%, 100% { filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
      50% { filter: drop-shadow(0 0 6px rgba(234,88,12,.55)); }
    }
    @media (max-width: 900px) {
      #fleetPanelTheodoi:not(.hidden) { height: auto; max-height: none; min-height: 0; }
      .track-layout { flex-direction: column; }
      .track-sidebar { width: 100%; min-width: 0; max-width: none; max-height: 220px; }
      .track-map-card { min-height: 280px; }
      .track-map-search { top: 8px; left: 8px; width: min(280px, calc(100% - 16px)); }
      .track-map-pick-panel { right: 8px; bottom: 8px; width: min(260px, calc(100% - 16px)); }
      .track-dash-float { top: 54px; width: min(280px, calc(100% - 20px)); max-width: none; }
      .track-top-stats { left: 8px; right: 8px; transform: none; max-width: none; }
      .track-top-stat { padding: 6px 8px; }
      .track-top-stat-val { max-width: 88px; font-size: 11px; }
      .track-dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    .leaflet-popup-content { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12px; margin: 10px 14px; line-height: 1.45; }

    .ns-cal-note {
      background: #f8faf9; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; font-size: 13px;
    }
    .ns-cal-ct-form .kh-field { margin-bottom: 8px; }
    .ns-ca-row { display: flex; gap: 12px; margin: 8px 0; }
    .ns-ca-chk { font-size: 12px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
    .ns-note-del { background: none; border: none; cursor: pointer; padding: 0; font-size: 11px; }
    .ns-tt-pending { background: #fef3c7; color: #b45309; }
    .ns-tt-ok { background: #e6f4ec; color: #1a7a4c; }
    .ns-tt-no { background: #fef2f2; color: #dc2626; }


    /* Panels */
    .view-panel { display: none !important; animation: fadeIn .25s ease; }
    .view-panel.active { display: block !important; }
    #view-lich-cong-viec.active { display: flex !important; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

    .card {
      background: #fff;
      border-radius: var(--vpg-radius);
      border: 1px solid #eef1ef;
      box-shadow: var(--vpg-shadow);
    }

    .empty-module {
      min-height: 420px;
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      text-align: center; padding: 48px 24px;
    }
    .empty-icon {
      width: 72px; height: 72px; border-radius: 22px;
      background: var(--vpg-green-soft);
      color: var(--vpg-green);
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 20px;
    }

    .pill {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 6px 14px; border-radius: 999px;
      font-size: 12px; font-weight: 600;
    }
    .pill-green { background: #e6f4ec; color: #1a7a4c; }
    .pill-gray { background: #f3f5f4; color: #6b7280; }

    .btn-green {
      background: var(--vpg-green); color: #fff;
      padding: 10px 20px; border-radius: 12px;
      font-size: 13px; font-weight: 600; border: none; cursor: pointer;
      transition: background .15s;
    }
    .btn-green:hover { background: #145c39; }
    .btn-red {
      background: #dc2626; color: #fff;
      padding: 10px 20px; border-radius: 12px;
      font-size: 13px; font-weight: 600; border: none; cursor: pointer;
      transition: background .15s;
    }
    .btn-red:hover { background: #b91c1c; }
    .btn-red-ghost {
      background: #fff; color: #dc2626;
      padding: 10px 18px; border-radius: 12px;
      font-size: 13px; font-weight: 600;
      border: 1px solid #fecaca; cursor: pointer;
    }
    .btn-red-ghost:hover { background: #fef2f2; }
    .btn-green-sm, .btn-red-sm, .btn-blue-sm, .btn-cfg-sm {
      padding: 5px 10px !important; font-size: 11px !important; font-weight: 700 !important;
      border-radius: 8px !important; border: none !important; cursor: pointer; min-height: 0 !important;
    }
    .btn-green-sm { background: #1a7a4c; color: #fff; }
    .btn-green-sm:hover { background: #145c39; }
    .btn-red-sm { background: #dc2626; color: #fff; }
    .btn-red-sm:hover { background: #b91c1c; }
    .btn-blue-sm { background: #2563eb; color: #fff; }
    .btn-blue-sm:hover { background: #1d4ed8; }
    .btn-cfg-sm { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db !important; }
    .btn-cfg-sm:hover { background: #e5e7eb; border-color: #9ca3af !important; color: #111827; }
    .btn-blue {
      background: #2563eb; color: #fff;
      padding: 10px 20px; border-radius: 12px;
      font-size: 13px; font-weight: 600; border: none; cursor: pointer;
    }
    .btn-blue:hover { background: #1d4ed8; }
    .btn-ghost {
      background: #fff; color: #4b5563;
      padding: 10px 18px; border-radius: 12px;
      font-size: 13px; font-weight: 500;
      border: 1px solid #e8ecea; cursor: pointer;
    }
    .btn-ghost:hover { background: #f9fafb; }

    .top-search {
      display: flex; align-items: center; gap: 10px;
      background: #f3f5f4; border-radius: 12px;
      padding: 10px 16px; min-width: 220px;
      border: 1px solid transparent;
    }
    .top-search:focus-within { border-color: #b8dcc8; background: #fff; }

    .avatar {
      width: 40px; height: 40px; border-radius: 50%;
      background: linear-gradient(135deg, #1a7a4c, #2d9f6a);
      color: #fff; font-weight: 700; font-size: 14px;
      display: flex; align-items: center; justify-content: center;
    }

    #toast {
      position: fixed; bottom: 24px; right: 24px; z-index: 100;
      padding: 14px 20px; border-radius: 14px;
      background: #1a1d1f; color: #fff; font-size: 13px; font-weight: 500;
      box-shadow: 0 8px 32px rgba(0,0,0,.18);
      transform: translateY(80px); opacity: 0;
      transition: all .3s ease; pointer-events: none;
    }
    #toast.show { transform: none; opacity: 1; }
    #toast.err { background: #b91c1c; }

    /* Module Khách hàng */
    .kh-toolbar-rows { display: flex; flex-direction: column; gap: 12px; }
    .kh-toolbar-top {
      display: flex; flex-wrap: wrap; align-items: center;
      justify-content: space-between; gap: 12px;
    }
    .kh-toolbar-filters {
      display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
      padding-top: 12px; border-top: 1px solid #f0f2f1;
    }
    .kh-toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
    .kh-toolbar .kh-stat {
      display: flex; flex-direction: column; align-items: center;
      padding: 8px 16px; border-radius: 12px; background: #f3f5f4; min-width: 72px;
    }
    .kh-addr-switch {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 7px 12px; border-radius: 12px; border: 1px solid #e8ecea;
      background: #fff; font-size: 12px; cursor: pointer; user-select: none;
    }
    .kh-addr-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
    .kh-addr-switch .kh-switch-track {
      width: 38px; height: 22px; border-radius: 999px; background: #d1d5db;
      position: relative; transition: background .2s; flex-shrink: 0;
    }
    .kh-addr-switch .kh-switch-track::after {
      content: ""; position: absolute; top: 2px; left: 2px;
      width: 18px; height: 18px; border-radius: 50%; background: #fff;
      transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.12);
    }
    .kh-addr-switch input:checked + .kh-switch-track { background: #1a7a4c; }
    .kh-addr-switch input:checked + .kh-switch-track::after { transform: translateX(16px); }
    .kh-addr-switch .kh-switch-cap { font-weight: 600; color: #9ca3af; font-size: 11px; white-space: nowrap; }
    .kh-addr-switch .kh-switch-cap.is-on { color: #1a7a4c; }
    .kh-stat-num { font-size: 20px; font-weight: 700; line-height: 1.2; }
    .kh-stat-lbl { font-size: 11px; color: #6b7280; font-weight: 500; }
    .kh-search-wrap {
      display: flex; align-items: center; gap: 8px;
      background: #f3f5f4; border-radius: 12px; padding: 8px 14px; min-width: 200px;
      border: 1px solid #e8ecea;
    }
    .kh-search-wrap input { background: transparent; border: none; outline: none; font-size: 13px; width: 180px; }
    .kh-select {
      border: 1px solid #e8ecea; border-radius: 12px; padding: 9px 12px;
      font-size: 13px; background: #fff; color: #1a1d1f;
    }
    select.vpg-combo-native {
      position: absolute !important; opacity: 0 !important; pointer-events: none !important;
      width: 0 !important; height: 0 !important; margin: 0 !important; padding: 0 !important;
      border: 0 !important;
    }
    .vpg-combo {
      position: relative; display: block; width: 100%; min-width: 0;
    }
    .kh-toolbar-filters .vpg-combo { width: auto; min-width: 140px; }
    .vpg-combo-input {
      width: 100%; box-sizing: border-box;
      border: 1px solid #e8ecea; border-radius: 12px;
      padding: 9px 34px 9px 12px; font-size: 13px;
      background: #fff; color: #1a1d1f; outline: none;
      transition: border-color .15s, box-shadow .15s;
    }
    .vpg-combo-input:focus {
      border-color: #1a7a4c;
      box-shadow: 0 0 0 3px rgba(26,122,76,.12);
    }
    .vpg-combo-input.is-invalid {
      border-color: #dc2626;
      box-shadow: 0 0 0 3px rgba(220,38,38,.1);
    }
    .vpg-combo-input:disabled { background: #f3f5f4; color: #9ca3af; }
    .vpg-combo-chev {
      position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
      font-size: 12px; color: #6b7280; pointer-events: auto; cursor: pointer;
      user-select: none; line-height: 1;
    }
    .vpg-combo.is-open .vpg-combo-chev { color: #1a7a4c; }
    .vpg-combo-list {
      position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60;
      max-height: 240px; overflow: auto;
      background: #fff; border: 1px solid #e8ecea; border-radius: 12px;
      box-shadow: 0 12px 32px rgba(15,23,42,.12);
      padding: 4px;
    }
    .vpg-combo-item {
      display: block; width: 100%; text-align: left;
      border: none; background: transparent; cursor: pointer;
      padding: 8px 10px; border-radius: 8px;
      font-size: 13px; color: #1a1d1f;
    }
    .vpg-combo-item:hover,
    .vpg-combo-item.is-active { background: #f0fdf6; color: #166534; }
    .vpg-combo-item.is-picked { font-weight: 600; }
    .vpg-combo-empty {
      padding: 10px 12px; font-size: 12px; color: #9ca3af;
    }
    .kh-table .vpg-combo-input { padding: 6px 28px 6px 8px; font-size: 12px; border-radius: 8px; }
    .kh-table .vpg-combo-list { max-height: 180px; }
    .kh-table-wrap {
      max-height: calc(100vh - 320px); overflow: auto;
      border-radius: 0 0 var(--vpg-radius) var(--vpg-radius);
    }
    .kh-table {
      width: 100%; min-width: 920px;
      border-collapse: collapse; font-size: 13px;
      table-layout: fixed;
    }
    .kh-table col.kh-col-ma { width: 90px; }
    .kh-table col.kh-col-ten { width: 15%; }
    .kh-table col.kh-col-tuyen { width: 76px; }
    .kh-table col.kh-col-sdt { width: 132px; }
    .kh-table col.kh-col-vitri { width: auto; min-width: 200px; }
    .kh-table col.kh-col-loai { width: 104px; }
    .kh-table col.kh-col-mapvt { width: 104px; }
    .kh-table col.kh-col-act { width: 72px; }
    .sp-table col.sp-col-ma { width: 108px; }
    .sp-table col.sp-col-ten { width: 22%; }
    .sp-table col.sp-col-loai { width: 110px; }
    .sp-table col.sp-col-nhom { width: 14%; }
    .sp-table col.sp-col-kt { width: 130px; }
    .sp-table col.sp-col-kg { width: 72px; }
    .sp-table col.sp-col-nguon { width: 100px; }
    .sp-table col.sp-col-act { width: 72px; }
    .sp-table .sp-td-kt { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
    .sp-table .sp-td-kg { font-weight: 600; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
    .kh-table thead th {
      position: sticky; top: 0; z-index: 2; background: #fafbfa;
      padding: 11px 12px; text-align: left; font-size: 11px; font-weight: 600;
      text-transform: uppercase; letter-spacing: .04em; color: #6b7280;
      border-bottom: 1px solid #e8ecea;
    }
    .kh-table tbody td {
      padding: 12px; border-bottom: 1px solid #f3f5f4;
      vertical-align: top; line-height: 1.4;
      overflow: hidden; max-width: 0;
    }
    .kh-table tbody tr { cursor: pointer; transition: background .12s; }
    .kh-table tbody tr:hover { background: #f8faf9; }
    .kh-table .kh-td-ma { font-weight: 600; color: #1a7a4c; white-space: nowrap; max-width: none; }
    .kh-table .kh-td-tuyen { font-family: ui-monospace, monospace; font-size: 12px; white-space: nowrap; }
    .kh-table .kh-td-sdt {
      font-size: 12px; white-space: normal;
      word-break: break-word; overflow-wrap: anywhere;
    }
    .kh-table .kh-td-ten { word-break: break-word; }
    .kh-table .kh-td-loai { white-space: nowrap; }
    .kh-table .kh-td-act {
      padding: 8px 10px; vertical-align: middle;
      max-width: none; overflow: visible;
    }
    .kh-vitri {
      white-space: normal; word-break: break-word;
      font-size: 12px; color: #4b5563; line-height: 1.5;
    }
    .kh-sub { font-size: 11px; color: #6b7280; margin-top: 2px; }
    .kh-tag {
      display: inline-flex; padding: 4px 10px; border-radius: 999px;
      font-size: 11px; font-weight: 600;
    }
    .tag-kh { background: #e6f4ec; color: #1a7a4c; }
    .tag-ncc { background: #eef2ff; color: #4338ca; }
    .tag-both { background: #fef3c7; color: #b45309; }
    .kh-td-mapvt { white-space: nowrap; }
    .kh-vt-badge {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
      white-space: nowrap;
    }
    .kh-vt-badge i, .kh-vt-badge svg { width: 13px; height: 13px; }
    .kh-vt-badge.is-on { background: #e6f4ec; color: #1a7a4c; }
    .kh-vt-badge.is-off { background: #f3f4f6; color: #9ca3af; }
    .kh-row-edit {
      width: 34px; height: 34px; border-radius: 10px; border: 1px solid #e8ecea;
      background: #fff; color: #6b7280; cursor: pointer; display: inline-flex;
      align-items: center; justify-content: center;
    }
    .kh-row-edit:hover { background: #e6f4ec; color: #1a7a4c; border-color: #b8dcc8; }
    .kh-empty { padding: 48px; text-align: center; color: #6b7280; font-size: 14px; }
    .kh-loading {
      padding: 24px; text-align: center; color: #6b7280; font-size: 13px;
      display: flex; align-items: center; justify-content: center; gap: 10px;
    }
    .kh-spinner {
      width: 18px; height: 18px; border: 2px solid #e8ecea;
      border-top-color: #1a7a4c; border-radius: 50%;
      animation: khSpin .7s linear infinite;
    }
    @keyframes khSpin { to { transform: rotate(360deg); } }

    .kh-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; }
    .kh-modal.hidden { display: none; }
    .kh-modal-backdrop { position: absolute; inset: 0; background: rgba(26,29,31,.35); backdrop-filter: blur(4px); }
    .kh-modal-panel {
      position: relative; width: 100%; max-width: 700px; max-height: 90vh;
      display: flex; flex-direction: column; overflow: hidden;
      font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    }
    .kh-modal-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 18px 22px; border-bottom: 1px solid #e8ecea;
    }
    .kh-modal-head h3 { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; color: #1a1d1f; letter-spacing: -.01em; }
    .kh-modal-x {
      display: inline-flex; align-items: center; justify-content: center;
      flex-shrink: 0; padding: 0; margin: 0;
      border: none; background: #f3f5f4; color: #6b7280;
      width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
      line-height: 0; transition: background .15s, color .15s;
    }
    .kh-modal-x:hover { background: #e8ecea; color: #1a1d1f; }
    .kh-modal-x svg { width: 18px; height: 18px; display: block; }
    .kh-modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
    .kh-modal-foot {
      display: flex; align-items: center; gap: 8px;
      padding: 14px 22px; border-top: 1px solid #e8ecea; background: #fafbfa;
    }
    .kh-form-box {
      border: 1px solid #d1d9d5; border-radius: 14px; padding: 16px 18px;
      margin-bottom: 12px; background: #fff;
    }
    .kh-form-box-top { border-color: #b8dcc8; background: #f8fcf9; }
    .kh-form-box:last-child { margin-bottom: 0; }
    .kh-box-title {
      font-size: 14px; font-weight: 700; color: #1a1d1f;
      margin: 0 0 4px; letter-spacing: -.01em;
    }
    .kh-box-desc {
      font-size: 12px; font-weight: 500; color: #6b7280;
      margin: 0 0 14px; line-height: 1.45;
    }
    .kh-label { font-size: 13px; font-weight: 600; color: #374151; display: block; }
    .kh-hint {
      font-size: 11px; font-weight: 500; color: #9ca3af;
      display: block; margin: -2px 0 4px;
    }
    .kh-hint-inline { font-size: 11px; font-weight: 500; color: #9ca3af; margin-left: 4px; }
    .kh-label .req { color: #dc2626; }
    .kh-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: end; }
    .kh-form-grid-4 { grid-template-columns: repeat(4, 1fr); }
    .kh-form-grid-3 { grid-template-columns: repeat(3, 1fr); }
    @media (max-width: 720px) { .kh-form-grid-4, .kh-form-grid-3 { grid-template-columns: 1fr 1fr; } }
    @media (max-width: 560px) { .kh-form-grid, .kh-form-grid-4, .kh-form-grid-3 { grid-template-columns: 1fr; } }
    .kh-field { display: flex; flex-direction: column; gap: 6px; }
    .kh-field-full { grid-column: 1 / -1; }
    .kh-field.hidden { display: none; }
    .kh-input,
    .kh-field input:not([type="checkbox"]):not([type="radio"]) {
      width: 100%; box-sizing: border-box;
      border: 1px solid #d1d5db; border-radius: 10px; padding: 10px 14px;
      font-size: 14px; font-weight: 500; color: #1a1d1f;
      outline: none; background: #fff; font-family: inherit;
      transition: border-color .15s, box-shadow .15s;
    }
    .kh-input::placeholder, .kh-field input::placeholder { color: #9ca3af; font-weight: 400; }
    .kh-input:focus, .kh-field input:not([type="checkbox"]):not([type="radio"]):focus {
      border-color: #1a7a4c; box-shadow: 0 0 0 3px #e6f4ec;
    }
    .kh-dc-type {
      display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
    }
    .kh-dc-opt {
      display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 140px;
      padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 12px;
      font-size: 13px; font-weight: 600; color: #374151; cursor: pointer; background: #fff;
    }
    .kh-dc-opt:has(input:checked) { border-color: #1a7a4c; background: #e6f4ec; color: #145c39; }
    .kh-preview-label {
      font-size: 11px; font-weight: 600; text-transform: uppercase;
      letter-spacing: .05em; color: #6b7280; margin: 14px 0 6px;
    }
    .kh-vitri-preview {
      padding: 12px 14px; border-radius: 10px;
      background: #f3faf6; border: 1px solid #b8dcc8;
      font-size: 13px; font-weight: 500; color: #145c39;
      min-height: 42px; line-height: 1.5;
    }
    .kh-vitri-preview.is-empty { color: #6b9a7e; font-style: italic; font-weight: 400; }
    .kh-vitri-preview.is-empty:empty::before { content: "VD: Thôn A, Xã B, Huyện C, Tỉnh D"; }
    .kh-table thead th.kh-sort-th {
      cursor: pointer; user-select: none; white-space: nowrap;
    }
    .kh-table thead th.kh-sort-th:hover { color: #1a7a4c; }
    .kh-sort-icon { display: inline-block; margin-left: 4px; opacity: .35; font-size: 10px; }
    .kh-sort-th.is-sorted .kh-sort-icon { opacity: 1; color: #1a7a4c; }
    .kh-row-actions { display: flex; gap: 4px; justify-content: flex-end; }
    .kh-row-btn {
      border: 1px solid #e8ecea; background: #fff; width: 32px; height: 32px;
      border-radius: 8px; cursor: pointer; display: inline-flex;
      align-items: center; justify-content: center; color: #6b7280;
    }
    .kh-row-btn:hover { background: #e6f4ec; color: #1a7a4c; border-color: #b8dcc8; }
    .kh-row-btn.kh-row-del:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
    .kh-ma-row { display: flex; gap: 8px; align-items: center; }
    .kh-ma-row .kh-input { flex: 1; min-width: 0; }
    .kh-ma-row .btn-ghost {
      flex-shrink: 0; height: 42px; padding: 0 14px;
      border: 1px solid #d1d5db; border-radius: 10px; font-size: 13px; font-weight: 600;
    }
    .kh-loai-group { display: flex; flex-wrap: wrap; gap: 8px; }
    .kh-loai-opt {
      display: flex; align-items: center; gap: 8px; padding: 11px 16px;
      border: 1px solid #d1d5db; border-radius: 12px;
      font-size: 14px; font-weight: 600; color: #374151; cursor: pointer; background: #fff;
    }
    .kh-loai-opt:has(input:checked) { border-color: #1a7a4c; background: #e6f4ec; color: #145c39; }
    .kh-check { flex-direction: row; align-items: center; gap: 8px; padding-top: 8px; }
    .kh-check .kh-label { margin: 0; }
    body.kh-modal-open { overflow: hidden; }

    .kh-confirm {
      position: fixed; inset: 0; z-index: 90;
      display: flex; align-items: center; justify-content: center; padding: 16px;
    }
    .kh-confirm.hidden { display: none; }
    .kh-confirm-backdrop { position: absolute; inset: 0; background: rgba(26,29,31,.45); backdrop-filter: blur(4px); }
    .kh-confirm-panel {
      position: relative; width: 100%; max-width: 420px;
      padding: 22px 24px; border-radius: 16px; background: #fff;
      box-shadow: 0 20px 50px rgba(26,29,31,.18);
    }
    .kh-confirm-icon {
      width: 44px; height: 44px; border-radius: 12px;
      display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
    }
    .kh-confirm-icon.save { background: #e6f4ec; color: #1a7a4c; }
    .kh-confirm-icon.delete { background: #fef2f2; color: #dc2626; }
    .kh-confirm-icon.warn { background: #fef3c7; color: #b45309; }
    .kh-confirm-title { font-size: 17px; font-weight: 700; color: #1a1d1f; margin: 0 0 8px; }
    .kh-confirm-msg { font-size: 14px; color: #4b5563; line-height: 1.55; margin: 0 0 6px; white-space: pre-line; }
    .kh-confirm-detail {
      margin: 12px 0 0; padding: 12px 14px; border-radius: 10px;
      background: #f8faf9; border: 1px solid #e8ecea; font-size: 13px; color: #374151; line-height: 1.5;
    }
    .kh-confirm-detail b { color: #1a1d1f; font-weight: 600; }
    .kh-confirm-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
    .kh-confirm-ok { min-width: 100px; }
    .kh-confirm-ok.is-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
    .kh-confirm-ok.is-danger:hover { background: #b91c1c; }
    .kh-chuan-hoa-wrap { display: inline-flex; align-items: center; gap: 4px; }
    .kh-chuan-hoa-help {
      width: 28px; height: 28px; border-radius: 8px; border: 1px solid #e8ecea;
      background: #fff; color: #6b7280; cursor: help; display: inline-flex;
      align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
    }
    .kh-chuan-hoa-help:hover { background: #f3f5f4; color: #1a7a4c; border-color: #b8dcc8; }

    #welcomeStrip.hidden { display: none; }

    /* Quản lý kho */
    .kh-page-head { margin-bottom: 12px; }
    .kh-page-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
    .kh-page-title { font-size: 18px; font-weight: 800; color: #1a1d1f; margin: 0; display: flex; align-items: center; gap: 8px; }
    .kh-page-sub { display: none; }
    .kh-page-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
    .tk-top-bar {
      display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
      padding: 10px 12px; border-radius: 14px; border: 1px solid #e8ecea; background: #fff; margin-bottom: 10px;
    }
    #view-ton-kho .tk-unified-bar {
      display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
      padding: 8px 10px; border-radius: 14px; border: 1px solid #e8ecea; background: #fff; margin-bottom: 10px;
    }
    #view-ton-kho .tk-bar-actions {
      display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto;
    }
    #view-ton-kho .tk-btn-report {
      display: inline-flex; align-items: center; gap: 6px;
      border: 1px solid #e5e7eb; background: #fff; color: #374151;
      font-size: 12px; font-weight: 700; padding: 8px 14px; border-radius: 10px; cursor: pointer;
      transition: background .12s, border-color .12s, color .12s;
    }
    #view-ton-kho .tk-btn-report:hover { border-color: #b8dcc8; background: #f0fdf4; color: #145c39; }
    #view-ton-kho .tk-btn-report.tk-btn-back:hover { border-color: #cbd5e1; background: #f8faf9; color: #374151; }
    #view-ton-kho .tk-catalog-toolbar {
      display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px;
    }
    #view-ton-kho .tk-catalog-toolbar .kh-search-wrap { flex: 1; min-width: 180px; }
    #view-ton-kho .tk-catalog-dash .tk-catalog-main {
      display: flex; flex-direction: column; min-height: 0; padding: 10px 12px;
    }
    #view-ton-kho .tk-groups:has(.tk-catalog-dash) { max-height: none; overflow: visible; }
    #view-ton-kho .tk-catalog-dash .tk-sx-split {
      min-height: 520px; max-height: calc(100vh - 220px);
    }
    #view-ton-kho .tk-nk-split {
      display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
      flex: 1; min-height: 0; align-items: stretch;
    }
    #view-ton-kho .tk-nk-pane {
      display: flex; flex-direction: column; min-height: 420px;
      border: 1px solid #dfe4e2; border-radius: 12px; overflow: hidden; background: #fff;
      box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    }
    #view-ton-kho .tk-nk-pane-noi { border-top: 3px solid #2563eb; }
    #view-ton-kho .tk-nk-pane-dan { border-top: 3px solid #047857; }
    #view-ton-kho .tk-nk-pane-head {
      display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: 10px;
      padding: 10px 12px; background: #f8faf9; border-bottom: 1px solid #eef1f0; flex-shrink: 0;
    }
    #view-ton-kho .tk-nk-pane-title { margin: 0; font-size: 13px; font-weight: 800; color: #111827; }
    #view-ton-kho .tk-nk-pane-meta { font-size: 11px; font-weight: 600; color: #6b7280; }
    #view-ton-kho .tk-nk-pane-body { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; }
    #view-ton-kho .tk-nk-pane-empty {
      padding: 24px 12px; text-align: center; color: #9ca3af; font-size: 12px; font-style: italic;
    }
    #view-ton-kho .tk-nk-pane-search {
      padding: 5px 8px; border-bottom: 1px solid #eef1f0; flex-shrink: 0; background: #fafbfa;
    }
    #view-ton-kho .tk-nk-search-inp {
      width: 100%; box-sizing: border-box;
      border: 1px solid #e5e7eb; border-radius: 8px; background: #fff;
      font-size: 11px; padding: 5px 8px; color: #374151;
      transition: border-color .12s, box-shadow .12s;
    }
    #view-ton-kho .tk-nk-search-inp:focus {
      outline: none; border-color: #a7d4bc; box-shadow: 0 0 0 2px rgba(26,122,76,.08);
    }
    #view-ton-kho .tk-nk-search-inp::placeholder { color: #9ca3af; }
    #view-ton-kho .tk-nk-search-wrap { min-width: 0; }
    #view-ton-kho .tk-nk-search-wrap input { font-size: 12px; padding: 6px 8px 6px 28px; }
    #view-ton-kho .tk-nk-table {
      width: 100%; max-width: 100%; min-width: 0 !important;
      table-layout: fixed; border-collapse: collapse;
      font-size: var(--vpg-font-sm);
    }
    #view-ton-kho .tk-nk-table col.tk-nk-col-ten { width: 52%; }
    #view-ton-kho .tk-nk-table col.tk-nk-col-ton { width: 18%; }
    #view-ton-kho .tk-nk-table col.tk-nk-col-kien { width: 30%; }
    #view-ton-kho .tk-nk-table thead th {
      position: sticky; top: 0; z-index: 1; background: #fafbfa;
      padding: 6px 4px; text-align: left; white-space: nowrap;
      font-size: 10px !important; font-weight: 700; text-transform: uppercase;
      letter-spacing: .03em; color: #6b7280; border-bottom: 1px solid #e8ecea;
    }
    #view-ton-kho .tk-nk-table thead th.tk-th-num { text-align: right; padding-right: 6px; }
    #view-ton-kho .tk-nk-table tbody td {
      padding: 5px 4px; border-bottom: 1px solid #f3f5f4;
      vertical-align: middle; line-height: 1.3;
      overflow: hidden; text-overflow: ellipsis; max-width: none;
      font-size: var(--vpg-font-sm);
    }
    #view-ton-kho .tk-nk-table tbody tr:hover { background: #f8faf9; }
    #view-ton-kho .tk-nk-td-ten {
      font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      padding-right: 6px;
    }
    #view-ton-kho .tk-nk-td-ton {
      white-space: nowrap; font-weight: 700; text-align: right; color: #1a7a4c;
      padding-right: 6px;
    }
    #view-ton-kho .tk-unit-sm { font-size: 9px; font-weight: 600; color: #9ca3af; margin-left: 1px; }
    #view-ton-kho .tk-nk-td-kh, #view-ton-kho .tk-nk-td-kien {
      text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 11px !important;
    }
    #view-ton-kho .tk-nk-td-nhap { font-size: 10px; white-space: nowrap; }
    #view-ton-kho .tk-auto-tag { font-size: 8px; opacity: .7; margin-left: 1px; }
    #view-ton-kho .tk-nk-td-act {
      padding-left: 2px !important; padding-right: 6px !important;
      overflow: visible; text-align: right; white-space: nowrap;
    }
    #view-ton-kho .tk-nk-td-act .kh-row-actions-compact { justify-content: flex-end; flex-wrap: nowrap; gap: 2px; }
    #view-ton-kho .kh-row-actions-compact .kh-row-btn { min-width: 26px; padding: 2px 4px; font-size: 11px; }
    #view-ton-kho .tk-nk-cfg-modal .tk-nk-cfg-panel { max-width: min(960px, 96vw); width: 100%; max-height: 90vh; display: flex; flex-direction: column; }
    #view-ton-kho .tk-nk-cfg-sub { margin: 4px 0 0; font-size: 12px; color: #6b7280; font-weight: 500; line-height: 1.4; }
    #view-ton-kho .tk-nk-cfg-toolbar { padding: 10px 18px 12px; border-bottom: 1px solid #eef1f0; background: #fafbfb; }
    #view-ton-kho .tk-nk-cfg-form {
      display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px;
    }
    #view-ton-kho .tk-nk-cfg-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
    #view-ton-kho .tk-nk-cfg-field .kh-input { font-size: 12px; padding: 6px 10px; min-width: 0; }
    #view-ton-kho .tk-nk-cfg-field:first-child { flex: 1; min-width: 180px; max-width: 280px; }
    #view-ton-kho .tk-nk-cfg-field:nth-child(2), #view-ton-kho .tk-nk-cfg-field:nth-child(3) { width: 120px; }
    #view-ton-kho .tk-nk-cfg-lbl { font-size: 10px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; }
    #view-ton-kho .tk-nk-cfg-apply { align-self: flex-end; margin-bottom: 1px; white-space: nowrap; }
    #view-ton-kho .tk-nk-cfg-list-head { margin-bottom: 8px; }
    #view-ton-kho .tk-nk-cfg-list-meta { font-size: 11px; font-weight: 600; color: #9ca3af; }
    #view-ton-kho .tk-nk-cfg-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 18px; }
    #view-ton-kho .tk-nk-cfg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    #view-ton-kho .tk-nk-cfg-pane h4 {
      margin: 0 0 8px; font-size: 13px; font-weight: 800; color: #111827;
      display: flex; align-items: baseline; gap: 8px;
    }
    #view-ton-kho .tk-nk-cfg-table-wrap { max-height: 52vh; overflow: auto; border: 1px solid #eef1f0; border-radius: 10px; }
    #view-ton-kho .tk-nk-cfg-table { font-size: 12px; width: 100%; }
    #view-ton-kho .tk-nk-cfg-ten { font-weight: 600; max-width: 220px; word-break: break-word; }
    #view-ton-kho .tk-nk-cfg-inp { width: 100%; min-width: 0; padding: 5px 8px; font-size: 12px; }
    #view-ton-kho .tk-nk-cfg-foot {
      display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px;
      padding: 12px 18px 16px; border-top: 1px solid #eef1f0;
    }
    #view-ton-kho .tk-nk-cfg-actions { display: flex; gap: 8px; flex-shrink: 0; }
    #view-ton-kho .tk-nk-cfg-pane-full { grid-column: 1 / -1; }
    @media (max-width: 1100px) {
      #view-ton-kho .tk-nk-split, #view-ton-kho .tk-nk-cfg-split { grid-template-columns: 1fr; }
      #view-ton-kho .tk-nk-pane { min-height: 320px; }
    }
    #view-ton-kho .tk-kpi-nk .tk-sx-kpi-icon { background: #e0f2fe; color: #0369a1; }
    #view-ton-kho .tk-kpi-pk .tk-sx-kpi-icon { background: #f1f5f9; color: #64748b; }
    .tk-kho-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; border: none; overflow: visible; }
    .tk-kho-btn {
      border: 1px solid #e8ecea; background: #f8faf9; color: #6b7280; font-size: 12px; font-weight: 700;
      padding: 8px 14px; border-radius: 10px; cursor: pointer; transition: background .12s, color .12s, border-color .12s;
    }
    .tk-kho-btn:hover { background: #f3f5f4; color: #374151; }
    .tk-kho-btn.is-on { background: #1a7a4c; color: #fff; border-color: transparent; }
    .tk-kho-btn.is-on[data-kho="NGUYEN_KHO"] { background: #0369a1; }
    .tk-kho-btn.is-on[data-kho="BAN_THANH_PHAM"] { background: #d97706; }
    .tk-kho-btn.is-on[data-kho="THANH_PHAM"] { background: #7c3aed; }
    .tk-kho-btn.is-on[data-kho="PHU_KIEN"] { background: #64748b; }
    #view-ton-kho .tk-tp-cat-wrap { margin-bottom: 10px; }
    #view-ton-kho .tk-tp-cat-seg {
      display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px;
      border-radius: 14px; border: 1px solid #e8ecea; background: #faf8ff;
    }
    #view-ton-kho .tk-tp-cat-btn {
      border: 1px solid #e5e7eb; background: #fff; color: #374151;
      font-size: 12px; font-weight: 700; padding: 8px 14px; border-radius: 10px; cursor: pointer;
      transition: background .12s, border-color .12s, color .12s;
    }
    #view-ton-kho .tk-tp-cat-btn:hover { border-color: #c4b5fd; background: #f5f3ff; }
    #view-ton-kho .tk-tp-cat-btn.is-on { color: #fff; border-color: transparent; }
    #view-ton-kho .tk-tp-cat-btn.is-on { background: #7c3aed; }
    #view-ton-kho .tk-tp-cat-btn.tk-tp-cat-toi.is-on { background: #1a7a4c; }
    #view-ton-kho .tk-tp-cat-btn.tk-tp-cat-dan.is-on { background: #2563eb; }
    #view-ton-kho .tk-tp-cat-btn.tk-tp-cat-hop.is-on { background: #047857; }
    #view-ton-kho .tk-tp-cat-btn.tk-tp-cat-phun.is-on { background: #c2410c; }
    #view-ton-kho .tk-tp-cat-btn.tk-tp-cat-son.is-on { background: #be185d; }
    #view-ton-kho .tk-tp-cat-count { font-weight: 600; opacity: .85; margin-left: 4px; }
    #view-ton-kho .tk-tp-batch-card { padding: 0; margin-top: 0; border: none; box-shadow: none; background: transparent; }
    #view-ton-kho .tk-tp-batch.sx-batch-shell {
      display: flex; min-height: 400px; max-height: calc(100vh - 320px);
    }
    /* Gộp cột Đại lý + Đơn — bằng nhau, khác màu */
    #view-ton-kho .tk-tp-nav-panel {
      width: 300px; min-width: 260px; max-width: 36%; flex-shrink: 0;
      display: flex; flex-direction: column;
      border-right: 1px solid #e8ecea; background: #fff;
    }
    #view-ton-kho .tk-tp-dl-search-wrap {
      padding: 6px 8px; border-bottom: 1px solid rgba(0,0,0,.06); flex-shrink: 0; background: #fff;
    }
    #view-ton-kho .tk-tp-dl-search-wrap .tk-tp-dl-search-input {
      width: 100%; box-sizing: border-box; font-size: 11px; padding: 6px 8px;
      border: 1px solid #bbf7d0; border-radius: 8px; background: #fff;
    }
    #view-ton-kho .tk-tp-nav-search {
      padding: 6px 8px; border-bottom: 1px solid #e8ecea; background: #fafbfa;
    }
    #view-ton-kho .tk-tp-nav-search .tk-tp-dl-search-input {
      width: 100%; box-sizing: border-box; font-size: 12px; padding: 8px 10px;
      border: 1px solid #e5e7eb; border-radius: 10px; background: #fff;
    }
    #view-ton-kho .tk-tp-nav-cols { display: flex; flex: 1; min-height: 0; }
    #view-ton-kho .tk-tp-nav-col {
      flex: 1; min-width: 0; display: flex; flex-direction: column;
      border-right: 1px solid #e8ecea;
    }
    #view-ton-kho .tk-tp-nav-col:last-child { border-right: none; }
    #view-ton-kho .tk-tp-nav-dl { background: #f0fdf4; }
    #view-ton-kho .tk-tp-nav-order { background: #faf5ff; }
    #view-ton-kho .tk-tp-nav-head {
      display: flex; justify-content: space-between; align-items: center;
      padding: 10px 12px; font-size: 10px; font-weight: 800; letter-spacing: .05em;
      text-transform: uppercase; border-bottom: 1px solid rgba(0,0,0,.06);
    }
    #view-ton-kho .tk-tp-nav-dl .tk-tp-nav-head { color: #047857; }
    #view-ton-kho .tk-tp-nav-order .tk-tp-nav-head { color: #7c3aed; }
    #view-ton-kho .tk-tp-nav-badge {
      font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
      background: rgba(255,255,255,.7);
    }
    #view-ton-kho .tk-tp-nav-dl .tk-tp-nav-badge { color: #047857; }
    #view-ton-kho .tk-tp-nav-order .tk-tp-nav-badge { color: #7c3aed; }
    #view-ton-kho .tk-tp-nav-list { flex: 1; overflow-y: auto; padding: 8px; }
    #view-ton-kho .tk-tp-nav-col .sx-lo-card {
      display: block; width: 100%; text-align: left; border: 1px solid rgba(0,0,0,.08);
      border-radius: 10px; background: #fff; padding: 8px 10px; margin-bottom: 6px;
      cursor: pointer; transition: border-color .12s, box-shadow .12s;
    }
    #view-ton-kho .tk-tp-nav-dl .sx-lo-card.is-active {
      border-color: #047857; background: #ecfdf5; box-shadow: 0 0 0 1px #047857;
    }
    #view-ton-kho .tk-tp-nav-order .sx-lo-card.is-active {
      border-color: #7c3aed; background: #f3e8ff; box-shadow: 0 0 0 1px #7c3aed;
    }
    #view-ton-kho .tk-tp-batch .tk-tp-col-detail { flex: 1; min-width: 0; }
    #view-ton-kho .tk-tp-3col.tk-tp-batch .tk-tp-col-dl { width: 158px; min-width: 158px; }
    #view-ton-kho .tk-tp-3col.tk-tp-batch .tk-tp-col-order { width: 168px; min-width: 168px; }
    #view-ton-kho .tk-tp-3col.tk-tp-batch .tk-tp-col-detail { flex: 1; min-width: 0; max-width: none; }
    #view-ton-kho .tk-tp-3col.tk-tp-batch .sx-lo-sidebar { width: auto; }
    #view-ton-kho .tk-tp-dl-search { padding: 8px 10px 4px; border-bottom: 1px solid #e8ecea; }
    #view-ton-kho .tk-tp-dl-search-input {
      width: 100%; box-sizing: border-box; font-size: 12px; padding: 6px 8px;
      border: 1px solid #e5e7eb; border-radius: 8px; background: #fff;
    }
    #view-ton-kho .tk-tp-batch .sx-lo-card { padding: 8px 10px; margin-bottom: 6px; border-radius: 10px; }
    #view-ton-kho .tk-tp-batch .sx-lo-card-name { font-size: 12px; }
    #view-ton-kho .tk-tp-batch .sx-lo-card-meta { font-size: 10px; line-height: 1.35; }
    #view-ton-kho .tk-tp-order-card .tk-tp-don-label { font-size: 12px; }
    #view-ton-kho .tk-tp-plate-compact { width: 100%; min-width: 0; table-layout: fixed; font-size: 12px; }
    #view-ton-kho .tk-tp-plate-compact .tk-tp-th-stt, #view-ton-kho .tk-tp-plate-compact .tk-tp-c-stt { width: 44px; }
    #view-ton-kho .tk-tp-plate-compact .tk-tp-th-loai, #view-ton-kho .tk-tp-plate-compact .tk-tp-c-loai { width: 22%; }
    #view-ton-kho .tk-tp-plate-compact .tk-tp-th-kt, #view-ton-kho .tk-tp-plate-compact .tk-tp-c-kt { width: 18%; }
    #view-ton-kho .tk-tp-plate-compact .tk-tp-th-gc, #view-ton-kho .tk-tp-plate-compact .tk-tp-c-gc { width: 28%; }
    #view-ton-kho .tk-tp-plate-compact .tk-tp-th-ht, #view-ton-kho .tk-tp-plate-compact .tk-tp-c-ht { width: 88px; min-width: 88px; }
    #view-ton-kho .tk-tp-plate-compact .tk-tp-c-ht { font-size: 10px; white-space: nowrap; line-height: 1.25; }
    #view-ton-kho .tk-tp-plate-compact .tk-tp-th-gc, #view-ton-kho .tk-tp-plate-compact .tk-tp-c-gc { width: 26%; }
    #view-ton-kho .tk-btp-toolbar { margin-bottom: 8px; }
    #view-ton-kho .tk-btp-search-wrap { max-width: 260px; }
    #view-ton-kho .tk-btp-search-wrap input { font-size: 12px; }
    #view-ton-kho .tk-sx-dash-compact .tk-sx-hist-panel {
      width: 200px; min-width: 176px; max-width: 22%;
    }
    #view-ton-kho .tk-sx-dash-compact .tk-sx-hist-head { padding: 8px 10px 6px; }
    #view-ton-kho .tk-sx-dash-compact .tk-sx-hist-title { font-size: 12px; margin-bottom: 6px; }
    #view-ton-kho .tk-sx-dash-compact .tk-ls-filter-btn { font-size: 10px; padding: 3px 9px; }
    #view-ton-kho .tk-sx-dash-compact .tk-sx-hist-list { padding: 5px 6px; }
    #view-ton-kho .tk-sx-dash-compact .tk-hist-item { padding: 6px 7px; margin-bottom: 4px; border-radius: 8px; }
    #view-ton-kho .tk-sx-dash-compact .tk-hist-avatar { width: 20px; height: 20px; font-size: 9px; border-radius: 5px; }
    #view-ton-kho .tk-sx-dash-compact .tk-hist-title { font-size: 10px; line-height: 1.25; }
    #view-ton-kho .tk-sx-dash-compact .tk-hist-sub { font-size: 9px; margin-top: 1px; }
    #view-ton-kho .tk-sx-dash-compact .tk-hist-time { font-size: 9px; margin-top: 2px; }
    #view-ton-kho .tk-sx-dash-compact .tk-hist-amt { font-size: 10px; }
    #view-ton-kho .tk-tp-plate-compact thead th {
      position: sticky; top: 0; z-index: 2; background: #f1f5f4; font-size: 10px;
      padding: 8px 6px; white-space: nowrap;
    }
    #view-ton-kho .tk-tp-plate-compact td { padding: 8px 6px; vertical-align: top; word-break: break-word; }
    #view-ton-kho .tk-tp-plate-compact .tk-tp-kt { font-size: 12px; font-weight: 800; }
    #view-ton-kho .tk-tp-plate-compact .tk-tp-sl { font-size: 10px; color: #6b7280; }
    #view-ton-kho .tk-tp-col-detail .sx-batch-scroll { padding: 0; }
    #view-ton-kho .tk-tp-dl-card .sx-lo-card-name { color: #047857; }
    #view-ton-kho .tk-tp-dl-card.is-active { border-color: #047857; background: #ecfdf5; box-shadow: 0 0 0 1px #047857; }
    #view-ton-kho .tk-tp-order-card .tk-tp-don-label { font-weight: 700; color: #374151; }
    #view-ton-kho .tk-tp-order-card.is-active { border-color: #7c3aed; background: #faf5ff; }
    #view-ton-kho .tk-tp-order-ht { font-size: 10px; color: #9ca3af; margin-top: 4px; }
    #view-ton-kho .tk-tp-overview { padding: 16px 8px; }
    #view-ton-kho .tk-tp-overview-stats {
      display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px;
    }
    #view-ton-kho .tk-tp-stat {
      background: #f8faf9; border: 1px solid #e8ecea; border-radius: 12px; padding: 14px; text-align: center;
    }
    #view-ton-kho .tk-tp-stat-n { display: block; font-size: 22px; font-weight: 800; color: #047857; }
    #view-ton-kho .tk-tp-stat-l { display: block; font-size: 11px; color: #6b7280; margin-top: 4px; }
    #view-ton-kho .tk-tp-overview-hint { padding: 24px; text-align: center; color: #6b7280; font-size: 13px; }
    #view-ton-kho .tk-tp-search-empty {
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      padding: 56px 24px; text-align: center; min-height: 260px;
    }
    #view-ton-kho .tk-tp-search-empty-icon {
      width: 64px; height: 64px; border-radius: 50%; background: #f3f4f6; color: #9ca3af;
      display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
    }
    #view-ton-kho .tk-tp-search-empty-title {
      margin: 0 0 8px; font-size: 16px; font-weight: 800; color: #374151;
    }
    #view-ton-kho .tk-tp-search-empty-sub {
      margin: 0 0 8px; font-size: 13px; color: #6b7280; max-width: 360px; line-height: 1.5;
    }
    #view-ton-kho .tk-tp-search-empty-hint {
      margin: 0 0 16px; font-size: 12px; color: #9ca3af; max-width: 320px;
    }
    #view-ton-kho .tk-sx-ls-card { margin-bottom: 0; }
    #view-ton-kho .tk-sx-ls-hint { margin: 0 0 10px; font-size: 12px; color: #6b7280; }
    /* Dashboard kho SX — Bán TP / Thành phẩm */
    #view-ton-kho .tk-btn-report.is-on { background: #e6f4ec; border-color: #1a7a4c; color: #145c39; }
    #view-ton-kho .tk-panel-inner { min-height: 420px; }
    #view-ton-kho #tkPanelTonInner { background: #eef1f0; border-radius: 14px; padding: 10px; }
    #view-ton-kho .tk-sx-dash { display: flex; flex-direction: column; gap: 10px; min-height: 400px; }
    #view-ton-kho .tk-sx-kpi-grid {
      display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
    }
    #view-ton-kho .tk-sx-kpi-card {
      display: flex; align-items: center; gap: 12px;
      background: #fff; border: 1px solid #eef1f0; border-radius: 16px; padding: 14px 16px;
      box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
    }
    #view-ton-kho .tk-sx-kpi-icon {
      width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
      background: #f3f4f6; color: #374151; flex-shrink: 0;
    }
    #view-ton-kho .tk-kpi-btp .tk-sx-kpi-icon { background: #fff7ed; color: #c2410c; }
    #view-ton-kho .tk-kpi-tp .tk-sx-kpi-icon { background: #f5f3ff; color: #7c3aed; }
    #view-ton-kho .tk-kpi-in .tk-sx-kpi-icon { background: #ecfdf5; color: #047857; }
    #view-ton-kho .tk-kpi-out .tk-sx-kpi-icon { background: #fef2f2; color: #dc2626; }
    #view-ton-kho .tk-sx-kpi-val { display: block; font-size: 22px; font-weight: 800; color: #111827; line-height: 1.1; }
    #view-ton-kho .tk-val-in { color: #047857; }
    #view-ton-kho .tk-val-out { color: #dc2626; }
    #view-ton-kho .tk-sx-kpi-lbl { display: block; font-size: 11px; color: #9ca3af; margin-top: 2px; }
    #view-ton-kho .tk-sx-split {
      display: flex; gap: 0; min-height: 460px; max-height: calc(100vh - 300px);
      background: #fff; border: 1px solid #dfe4e2; border-radius: 12px; overflow: hidden;
      box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    }
    #view-ton-kho .tk-sx-main { flex: 1; min-width: 0; overflow: auto; padding: 12px 14px; background: #fff; }
    #view-ton-kho .tk-sx-hist-panel {
      width: 300px; min-width: 260px; max-width: 34%;
      border-left: 1px solid #e8ecea; background: #f8faf9;
      display: flex; flex-direction: column;
    }
    #view-ton-kho .tk-sx-hist-head {
      padding: 14px 16px 10px; border-bottom: 1px solid #eef1f0;
    }
    #view-ton-kho .tk-sx-hist-title { margin: 0 0 10px; font-size: 14px; font-weight: 800; color: #111827; }
    #view-ton-kho .tk-ls-filters { display: flex; gap: 6px; flex-wrap: wrap; }
    #view-ton-kho .tk-ls-filter-btn {
      border: 1px solid #e5e7eb; background: #f9fafb; color: #6b7280;
      font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer;
      transition: all .12s;
    }
    #view-ton-kho .tk-ls-filter-btn:hover { border-color: #cbd5e1; color: #374151; }
    #view-ton-kho .tk-ls-filter-btn.is-on { background: #111827; border-color: #111827; color: #fff; }
    #view-ton-kho .tk-sx-hist-list { flex: 1; overflow-y: auto; padding: 8px 10px; }
    #view-ton-kho .tk-sx-hist-full { max-height: 520px; padding: 12px 16px; }
    #view-ton-kho .tk-sx-hist-empty, #view-ton-kho .tk-hist-empty {
      padding: 32px 16px; text-align: center; color: #9ca3af; font-size: 13px;
    }
    #view-ton-kho .tk-hist-item {
      display: flex; align-items: flex-start; gap: 8px;
      padding: 10px; border-radius: 10px; margin-bottom: 6px;
      border: 1px solid #f1f5f4; background: #fafbfa; transition: background .12s;
    }
    #view-ton-kho .tk-hist-item:hover { background: #f3f4f6; }
    #view-ton-kho .tk-hist-in { border-left: 3px solid #10b981; }
    #view-ton-kho .tk-hist-out { border-left: 3px solid #ef4444; }
    #view-ton-kho .tk-hist-avatar {
      width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: 12px; font-weight: 800;
    }
    #view-ton-kho .tk-hist-in .tk-hist-avatar { background: #d1fae5; color: #047857; }
    #view-ton-kho .tk-hist-out .tk-hist-avatar { background: #fee2e2; color: #dc2626; }
    #view-ton-kho .tk-hist-main { flex: 1; min-width: 0; }
    #view-ton-kho .tk-hist-title {
      font-size: 12px; font-weight: 800; color: #111827; line-height: 1.3;
      display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
    }
    #view-ton-kho .tk-hist-amt { font-size: 12px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
    #view-ton-kho .tk-hist-in .tk-hist-amt { color: #047857; }
    #view-ton-kho .tk-hist-out .tk-hist-amt { color: #dc2626; }
    #view-ton-kho .tk-hist-sub { font-size: 11px; color: #6b7280; margin-top: 2px; line-height: 1.35; }
    #view-ton-kho .tk-hist-time { font-size: 10px; color: #9ca3af; margin-top: 3px; }
    #view-ton-kho .tk-ls-sx-card { padding: 0; overflow: hidden; }
    #view-ton-kho .tk-ls-sx-head {
      display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px;
      padding: 16px 18px; border-bottom: 1px solid #eef1f0;
    }
    #view-ton-kho .tk-ls-sx-title { margin: 0; font-size: 16px; font-weight: 800; color: #111827; }
    #view-ton-kho .tk-ls-sx-sub { margin: 4px 0 0; font-size: 12px; color: #6b7280; }
    #view-ton-kho .tk-ls-kpi-inline { padding: 12px 18px; border-bottom: 1px solid #eef1f0; }
    #view-ton-kho .tk-quick-acts.hidden { display: none; }
    @media (max-width: 1100px) {
      #view-ton-kho .tk-sx-kpi-grid { grid-template-columns: repeat(2, 1fr); }
      #view-ton-kho .tk-sx-split { flex-direction: column; max-height: none; }
      #view-ton-kho .tk-sx-hist-panel { width: 100%; max-width: none; border-left: none; border-top: 1px solid #eef1f0; max-height: 360px; }
    }
    #view-ton-kho .tk-sx-ls-table { font-size: 11px; min-width: 1100px; }
    #view-ton-kho .tk-sx-ls-table .tk-ls-note { max-width: 220px; font-size: 11px; line-height: 1.35; }
    #view-ton-kho .tk-tp-batch .sx-lo-sidebar {
      width: 248px; flex-shrink: 0; border-right: 1px solid #e8ecea;
      display: flex; flex-direction: column; background: #f8faf9;
    }
    #view-ton-kho .tk-tp-batch .sx-lo-side-head {
      display: flex; justify-content: space-between; align-items: center;
      padding: 12px 14px; font-size: 11px; font-weight: 800; color: #6b7280; letter-spacing: .04em;
      border-bottom: 1px solid #e8ecea;
    }
    #view-ton-kho .tk-tp-batch .sx-lo-side-badge {
      background: #ede9fe; color: #6d28d9; padding: 2px 8px; border-radius: 999px; font-size: 10px;
    }
    #view-ton-kho .tk-tp-batch .sx-lo-list { flex: 1; overflow-y: auto; padding: 10px; }
    #view-ton-kho .tk-tp-batch .sx-lo-card {
      display: block; width: 100%; text-align: left; border: 1px solid #e8ecea; border-radius: 12px;
      background: #fff; padding: 12px; margin-bottom: 8px; cursor: pointer; position: relative;
      transition: border-color .12s, box-shadow .12s;
    }
    #view-ton-kho .tk-tp-batch .sx-lo-card:hover { border-color: #a7d4bc; box-shadow: 0 2px 8px rgba(26,122,76,.08); }
    #view-ton-kho .tk-tp-batch .sx-lo-card.is-active {
      border-color: #7c3aed; background: #faf5ff; box-shadow: 0 0 0 1px #7c3aed;
    }
    #view-ton-kho .tk-tp-batch .sx-lo-card-name { font-size: 13px; font-weight: 800; color: #111827; line-height: 1.3; }
    #view-ton-kho .tk-tp-dl-name {
      font-size: 14px; font-weight: 800; color: #047857; line-height: 1.3;
    }
    #view-ton-kho .tk-tp-don-label {
      font-size: 12px; font-weight: 600; color: #374151; margin-top: 3px; line-height: 1.3;
    }
    #view-ton-kho .tk-tp-batch .sx-lo-card-meta { font-size: 11px; color: #9ca3af; margin-top: 4px; }
    #view-ton-kho .tk-tp-batch .sx-lo-main-title .tk-tp-dl-name {
      font-size: 17px; color: #047857;
    }
    #view-ton-kho .tk-tp-batch .sx-lo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
    #view-ton-kho .tk-tp-batch .sx-lo-main-head {
      padding: 14px 16px; border-bottom: 1px solid #e8ecea; background: #fff;
    }
    #view-ton-kho .tk-tp-batch .sx-lo-main-title { margin: 0; font-size: 14px; font-weight: 800; color: #111827; }
    #view-ton-kho .tk-tp-batch .sx-lo-main-title span { color: #7c3aed; }
    #view-ton-kho .tk-tp-batch .sx-lo-main-sub { margin: 4px 0 0; font-size: 12px; color: #6b7280; }
    #view-ton-kho .tk-tp-batch .sx-batch-scroll { flex: 1; overflow: auto; }
    #view-ton-kho .tk-tp-plate-table { min-width: 0; font-size: 12px; }
    #view-ton-kho .tk-tp-plate-table .sx-td-kt { font-weight: 800; font-size: 14px; color: #111827; }
    #view-ton-kho .tk-tp-plate-table thead th {
      position: sticky; top: 0; z-index: 2; background: #f1f5f4; font-size: 10px;
    }
    #view-ton-kho .tk-tp-plate-table .sx-b-stick-1,
    #view-ton-kho .tk-tp-plate-table .sx-b-stick-2 {
      position: sticky; left: 0; z-index: 1; background: #fff;
    }
    #view-ton-kho .tk-tp-plate-table .sx-b-stick-2 { left: 56px; }
    #view-ton-kho .tk-td-kt-sl { white-space: nowrap; font-variant-numeric: tabular-nums; }
    #view-ton-kho .tk-tp-kt { display: block; font-weight: 800; font-size: 13px; color: #111827; }
    #view-ton-kho .tk-tp-sl { display: block; font-size: 11px; color: #6b7280; margin-top: 2px; }
    #view-ton-kho .tk-kh-plan-table .tk-td-kt-sl { min-width: 108px; }
    #view-ton-kho .tk-tp-plate-table thead .sx-b-stick-1,
    #view-ton-kho .tk-tp-plate-table thead .sx-b-stick-2 { z-index: 3; background: #f1f5f4; }
    #view-ton-kho .tk-btp-section { margin-bottom: 14px; }
    #view-ton-kho .tk-btp-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 8px 10px; background: #fffbeb; border-radius: 8px; margin-bottom: 8px;
    }
    #view-ton-kho .tk-btp-table, #view-ton-kho .tk-kh-plan-table { font-size: 12px; }
    #view-ton-kho .tk-kh-plan-table { min-width: 900px; }
    .tk-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
    .tk-chip {
      font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
      background: #f3f5f4; color: #4b5563; white-space: nowrap;
    }
    .tk-chip-warn { background: #fee2e2; color: #b91c1c; }
    .tk-chip-ok { background: #dcfce7; color: #166534; }
    .tk-quick-acts { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
    .tk-stats { display: none; }
    .tk-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
    .tk-tab {
      border: 1px solid #e8ecea; background: #fff; border-radius: 10px;
      padding: 8px 14px; font-size: 13px; font-weight: 600; color: #4b5563; cursor: pointer;
    }
    .tk-tab:hover { border-color: #b8dcc8; color: #1a7a4c; }
    .tk-tab.is-on { background: #e6f4ec; border-color: #1a7a4c; color: #145c39; }
    .tk-panel { margin-bottom: 16px; }
    .tk-panel.hidden { display: none; }
    .tk-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
    .tk-badge-kd { background: #e0f2fe; color: #0369a1; }
    .tk-badge-pk { background: #fef3c7; color: #b45309; }
    .tk-badge-nk { background: #e0f2fe; color: #0369a1; }
    .tk-badge-tp { background: #ede9fe; color: #6d28d9; }
    /* Module kho — typography & bảng thống nhất */
    #view-ton-kho {
      font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
      font-size: 13px;
      line-height: 1.45;
      color: #1a1d1f;
    }
    #view-ton-kho .tk-row-warn { background: #fff7f7; }
    #view-ton-kho .tk-warn-icon { color: #dc2626; font-size: 11px; font-weight: 700; }
    #view-ton-kho .kh-table.tk-table:not(.tk-nk-table) { min-width: 960px; }
    #view-ton-kho .kh-table.tk-table .kh-td-ma { max-width: none; }
    #view-ton-kho .kh-table.tk-table .kh-td-act { max-width: none; overflow: visible; vertical-align: middle; }
    #view-ton-kho .kh-table.tk-table .tk-td-num,
    #view-ton-kho .kh-table.tk-table .tk-td-ton { max-width: none; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
    #view-ton-kho .kh-table.tk-table .tk-th-num { text-align: right; }
    #view-ton-kho .kh-table.tk-table .tk-td-ton { font-weight: 700; color: #1a7a4c; }
    #view-ton-kho .kh-table.tk-table .tk-unit { font-weight: 500; font-size: 12px; color: #6b7280; }
    #view-ton-kho .kh-table.tk-table .tk-td-date { max-width: none; font-size: 12px; color: #6b7280; white-space: nowrap; font-variant-numeric: tabular-nums; }
    #view-ton-kho .kh-table.tk-table tbody tr { cursor: default; }
    #view-ton-kho .kh-row-btn.tk-btn-nhap { background: #1a7a4c; border-color: #1a7a4c; color: #fff; font-weight: 700; }
    #view-ton-kho .kh-row-btn.tk-btn-nhap:hover { background: #145c39; border-color: #145c39; color: #fff; }
    #view-ton-kho .kh-row-btn.tk-btn-xuat { background: #dc2626; border-color: #dc2626; color: #fff; font-weight: 700; }
    #view-ton-kho .kh-row-btn.tk-btn-xuat:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }
    #view-ton-kho .kh-row-btn.tk-btn-kiem { background: #2563eb; border-color: #2563eb; color: #fff; font-size: 10px; font-weight: 800; width: auto; min-width: 32px; padding: 0 6px; }
    #view-ton-kho .kh-row-btn.tk-btn-kiem:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
    #view-ton-kho .tk-badge { font-family: inherit; font-size: 11px; font-weight: 700; }
    #view-ton-kho .tk-bc-tbl {
      width: 100%; table-layout: fixed; border-collapse: collapse;
      font-family: inherit; font-size: 13px; line-height: 1.45; color: #1a1d1f;
    }
    #view-ton-kho .tk-bc-tbl thead th {
      padding: 11px 12px; text-align: left; vertical-align: middle;
      font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
      color: #6b7280; background: #fafbfa; border-bottom: 1px solid #e8ecea;
      white-space: nowrap; font-family: inherit; position: static;
    }
    #view-ton-kho .tk-bc-tbl tbody td {
      padding: 12px; vertical-align: middle; border-bottom: 1px solid #f3f5f4;
      font-size: 13px; font-family: inherit;
    }
    #view-ton-kho .tk-bc-tbl tbody tr:hover { background: #f8faf9; }
    #view-ton-kho .tk-bc-col-n, #view-ton-kho .tk-bc-tbl .tk-td-num { text-align: right; font-variant-numeric: tabular-nums; }
    #view-ton-kho .tk-ls-nhap { color: #1a7a4c; font-weight: 600; }
    #view-ton-kho .tk-ls-xuat { color: #dc2626; font-weight: 600; }
    #view-ton-kho .tk-ls-kiem { color: #2563eb; font-weight: 600; }
    #view-ton-kho .tk-ls-chuyen { color: #7c3aed; font-weight: 600; }
    .tk-phieu-head.chuyen { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
    .tk-dt-hist { margin: -6px 0 8px; padding: 8px 10px; border-radius: 8px; background: #f8faf9; border: 1px solid #e8ecea; font-size: 12px; }
    .tk-dt-hist-title { font-weight: 700; color: #374151; margin-bottom: 4px; }
    .tk-dt-hist-row { color: #6b7280; line-height: 1.45; }
    /* Ô gợi ý datalist — tránh viền xanh :valid của trình duyệt */
    .tk-phieu-body .tk-ac-input:valid,
    .tk-phieu-body .tk-ac-input:invalid {
      border-color: #d1d5db;
      box-shadow: none;
    }
    .tk-phieu-body .tk-ac-input:focus {
      border-color: #1a7a4c;
      box-shadow: 0 0 0 3px #e6f4ec;
    }
    .tk-phieu-body .tk-ac-input.tk-ac-ok:not(:focus) { border-color: #d1d5db; }
    .tk-phieu-body .tk-ac-input.tk-ac-warn:not(:focus) { border-color: #f59e0b; box-shadow: 0 0 0 2px #fef3c7; }
    #view-ton-kho .kh-table.tk-ls-table { min-width: 980px; font-size: 12px; table-layout: fixed; width: 100%; }
    #view-ton-kho .kh-table.tk-ls-table thead th { padding: 8px 10px; font-size: 10px; }
    #view-ton-kho .kh-table.tk-ls-table tbody td { padding: 8px 10px; font-size: 12px; }
    #view-ton-kho .kh-table.tk-ls-table col.tk-ls-c-date { width: 124px; }
    #view-ton-kho .kh-table.tk-ls-table col.tk-ls-c-phieu { width: 100px; }
    #view-ton-kho .kh-table.tk-ls-table col.tk-ls-c-loai { width: 58px; }
    #view-ton-kho .kh-table.tk-ls-table col.tk-ls-c-kho { width: 136px; }
    #view-ton-kho .kh-table.tk-ls-table col.tk-ls-c-sp { width: auto; }
    #view-ton-kho .kh-table.tk-ls-table col.tk-ls-c-sl { width: 44px; }
    #view-ton-kho .kh-table.tk-ls-table col.tk-ls-c-dt { width: 112px; }
    #view-ton-kho .kh-table.tk-ls-table col.tk-ls-c-ton { width: 64px; }
    #view-ton-kho .kh-table.tk-ls-table col.tk-ls-c-note { width: auto; }
    #view-ton-kho .tk-td-phieu { font-size: 11px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    #view-ton-kho .tk-ls-kho,
    #view-ton-kho .tk-ls-dt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #view-ton-kho .tk-ls-sp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #view-ton-kho .tk-ls-ton { font-size: 11px; }
    #view-ton-kho .tk-ls-note { font-size: 12px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #view-ton-kho .tk-ls-nhap,
    #view-ton-kho .tk-ls-xuat,
    #view-ton-kho .tk-ls-chuyen,
    #view-ton-kho .tk-ls-kiem { white-space: nowrap; }
    #view-ton-kho .tk-bc-nhap { color: #1a7a4c; }
    #view-ton-kho .tk-bc-xuat { color: #dc2626; font-weight: 700; }
    #view-ton-kho .tk-bc-warn { color: #dc2626; font-weight: 700; }
    .btn-xs { padding: 4px 8px !important; font-size: 12px !important; min-height: 0 !important; }
    .tk-gd-form { padding: 20px 22px; max-width: 520px; }
    .tk-gd-title { font-size: 17px; font-weight: 700; margin: 0 0 16px; }
    .tk-gd-inner { display: flex; flex-direction: column; gap: 14px; }
    .tk-gd-foot { margin-top: 8px; }
    .tk-hint { font-size: 13px; color: #6b7280; margin: -8px 0 12px; }
    .tk-tam-hint {
      margin: 10px 0 0; padding: 8px 10px; font-size: 11px; line-height: 1.45;
      color: #6b7280; background: #f8faf9; border: 1px solid #e8ecea; border-radius: 8px;
    }
    .tk-tam-hint.hidden { display: none; }
    .tk-auto-tag {
      display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 4px;
      font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
      color: #1a7a4c; background: #e6f4ec; vertical-align: middle;
    }
    .tk-bc-toolbar { margin-bottom: 12px; }
    .tk-bc-toolbar-compact { padding: 10px 14px; }
    .tk-bc-toolbar-inner {
      display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
    }
    .tk-bc-preset-sel { width: 128px; min-width: 0; font-size: 12px; height: 34px; padding: 0 8px; }
    .tk-bc-loai-sel { width: 148px; min-width: 0; max-width: 180px; font-size: 12px; height: 34px; padding: 0 8px; }
    .tk-bc-date-lbl {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .03em;
    }
    .tk-bc-date {
      width: 118px; min-width: 0; padding: 5px 8px; font-size: 12px; height: 34px;
    }
    .tk-bc-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
    @media (max-width: 720px) {
      .tk-bc-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
    }
    .tk-bc-dash { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
    .tk-bc-hero {
      display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
      padding: 18px 20px; border-radius: 16px;
      background: linear-gradient(135deg, #1a7a4c 0%, #145c39 100%); color: #fff;
      box-shadow: 0 4px 20px rgba(26, 122, 76, 0.25);
    }
    .tk-bc-hero-val { font-size: 36px; font-weight: 800; line-height: 1; }
    .tk-bc-hero-lbl { font-size: 12px; font-weight: 600; opacity: .9; text-transform: uppercase; letter-spacing: .05em; }
    .tk-bc-hero-sub { font-size: 13px; opacity: .8; margin-top: 4px; }
    .tk-bc-hero-meta { margin-left: auto; text-align: right; font-size: 12px; opacity: .85; }
    .tk-kpi-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    @media (max-width: 700px) { .tk-kpi-row { grid-template-columns: 1fr; } }
    .tk-kpi {
      padding: 16px 18px; border-radius: 16px; border: 1px solid #e8ecea; background: #fff;
      box-shadow: var(--vpg-shadow); position: relative; overflow: hidden;
    }
    .tk-kpi-primary { background: linear-gradient(135deg, #1a7a4c 0%, #145c39 100%); border: none; color: #fff; }
    .tk-kpi-primary .tk-kpi-lbl { color: rgba(255,255,255,.85); }
    .tk-kpi-val { font-size: 26px; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
    .tk-kpi-lbl { font-size: 12px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
    .tk-kpi-sub { font-size: 11px; color: #9ca3af; margin-top: 6px; }
    .tk-kpi-primary .tk-kpi-sub { color: rgba(255,255,255,.7); }
    .tk-bc-mid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; min-width: 0; }
    .tk-bc-mid-3 { grid-template-columns: repeat(3, 1fr); }
    @media (max-width: 1100px) { .tk-bc-mid-3 { grid-template-columns: 1fr; } }
    .tk-bc-bottom-2 { grid-template-columns: 1fr 1fr; }
    .tk-bar-gd { width: 100%; border-radius: 4px 4px 0 0; background: #6366f1; min-height: 2px; }
    .tk-bc-tbl .tk-bc-col-sp { width: auto; }
    .tk-bc-tbl .tk-bc-col-n { width: 88px; }
    .tk-bc-tbl td, .tk-bc-tbl th { font-size: var(--vpg-font-sm); }
    @media (max-width: 960px) { .tk-bc-mid { grid-template-columns: 1fr; } }
    .tk-bc-mid > *, .tk-bc-bottom > * { min-width: 0; }
    .tk-bc-card { padding: 16px 18px; border-radius: 14px; border: 1px solid #e8ecea; background: #fff; box-shadow: var(--vpg-shadow); }
    .tk-bc-chart-box { min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end; }
    .tk-bc-chart-empty {
      flex: 1; display: flex; align-items: center; justify-content: center;
      min-height: 160px; font-size: 13px; color: #9ca3af; text-align: center; padding: 20px;
      background: #f8faf9; border-radius: 12px; border: 1px dashed #e8ecea;
    }
    .tk-bc-card h4 { font-size: 15px; font-weight: 700; margin: 0 0 4px; color: #1a1d1f; }
    .tk-bc-card-sub { font-size: 12px; color: #9ca3af; margin: 0 0 16px; }
    .tk-bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 8px; }
    .tk-bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
    .tk-bar-stack { width: 100%; max-width: 36px; display: flex; flex-direction: column-reverse; gap: 2px; }
    .tk-bar-nhap { background: #1a7a4c; border-radius: 4px 4px 0 0; min-height: 2px; }
    .tk-bar-xuat { background: #dc2626; border-radius: 4px 4px 0 0; min-height: 2px; }
    .tk-bar-lbl { font-size: 10px; color: #9ca3af; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .tk-bc-legend { display: flex; gap: 14px; margin-top: 12px; font-size: 12px; color: #6b7280; }
    .tk-bc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
    .tk-bc-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    @media (max-width: 900px) { .tk-bc-bottom { grid-template-columns: 1fr; } }
    .tk-bc-summary {
      padding: 14px 18px; border-radius: 14px; border: 1px solid #e8ecea; background: #f8faf9;
      display: flex; flex-wrap: wrap; gap: 16px 24px; font-size: 13px; align-items: center;
    }
    .tk-bc-summary b { font-weight: 800; }
    .tk-bc-tbl-wrap { width: 100%; overflow-x: auto; }
    #view-ton-kho .tk-bc-tbl .tk-bc-col-sp { width: 56%; }
    #view-ton-kho .tk-bc-tbl .tk-bc-col-n { width: 22%; }
    .tk-bc-summary .tk-bc-kiem { color: #2563eb; font-weight: 800; }
    .tk-kpi-sub-kiem { color: #2563eb !important; font-weight: 700; }
    .tk-donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
    .tk-donut {
      width: 120px; height: 120px; border-radius: 50%; flex-shrink: 0;
      background: conic-gradient(#e8ecea 0deg 360deg);
    }
    .tk-donut-legend { flex: 1; min-width: 140px; }
    .tk-donut-leg { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 6px; color: #374151; }
    .tk-donut-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
    .tk-phieu-modal .kh-modal-panel { max-width: 480px; overflow: hidden; padding: 0; }
    .tk-phieu-head {
      padding: 20px 22px; color: #fff; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    }
    .tk-phieu-head.nhap { background: linear-gradient(135deg, #1a7a4c, #145c39); }
    .tk-phieu-head.xuat { background: linear-gradient(135deg, #dc2626, #b91c1c); }
    .tk-phieu-head.kiem { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
    .tk-phieu-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
    .tk-phieu-head p { margin: 4px 0 0; font-size: 12px; opacity: .9; }
    .tk-phieu-x { background: rgba(255,255,255,.2); border: none; color: #fff; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
    .tk-phieu-body { padding: 20px 22px; }
    .tk-phieu-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 20px; }
    .tk-groups { max-height: calc(100vh - 280px); overflow: auto; padding: 4px 0; }
    .tk-nhom .kh-table-wrap { border-radius: 0 0 10px 10px; }
    .tk-flat-table { margin: 0; }
    .tk-group { border: 1px solid #e8ecea; border-radius: 12px; margin-bottom: 8px; overflow: hidden; background: #fff; }
    .tk-group-tp { border-style: dashed; background: #fafbfa; }
    .tk-group-head {
      width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
      padding: 10px 12px; background: #f8faf9; border: none; cursor: pointer; text-align: left; font: inherit;
    }
    .tk-group-tp .tk-group-head { cursor: default; background: #f3f5f4; }
    .tk-group-head b { font-size: 15px; color: #1a1d1f; display: block; }
    .tk-group-meta { font-size: 12px; font-weight: 500; color: #6b7280; margin-left: 8px; }
    .tk-warn-txt { color: #dc2626; font-weight: 700; }
    .tk-group-body { padding: 0 12px 12px; }
    .tk-group.is-collapsed .tk-group-body { display: none; }
    .tk-group.is-collapsed .tk-chev { transform: rotate(-90deg); }
    .tk-chev { transition: transform .15s; color: #6b7280; }
    .tk-nhom { margin-top: 6px; }
    .tk-nhom-head { font-size: 12px; font-weight: 700; color: #374151; padding: 6px 4px; border-bottom: 1px solid #f0f2f1; }
    .tk-bc-loading { padding: 40px; text-align: center; color: #6b7280; font-size: 13px; }
    .tk-bc-err { padding: 16px; border-radius: 12px; background: #fee2e2; color: #991b1b; font-size: 13px; font-weight: 600; }
    .tk-group-empty { padding: 16px; font-size: 13px; color: #6b7280; font-style: italic; }
    #view-ton-kho .tk-sx-tp-section { margin-top: 14px; padding-top: 8px; border-top: 2px solid #e8ecea; }
    #view-ton-kho .tk-sx-tp-section-head {
      display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700;
      color: #7c3aed; margin: 0 0 10px 4px;
    }
    #view-ton-kho .tk-tp-size { margin-bottom: 12px; }
    #view-ton-kho .tk-tp-size-head {
      display: flex; align-items: center; justify-content: space-between; gap: 8px;
      padding: 6px 8px; background: #f8faf9; border-radius: 8px; margin-bottom: 6px;
    }
    #view-ton-kho .tk-tp-kt { font-weight: 700; font-size: 13px; color: #1a7a4c; }
    #view-ton-kho .tk-tp-tam-table { font-size: 12px; }
    #view-ton-kho .tk-badge-tp {
      display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 6px;
      border-radius: 6px; background: #ede9fe; color: #7c3aed; margin-left: 6px;
    }
    #view-ton-kho .tk-badge-warn { background: #fef3c7; color: #b45309; }
    #view-ton-kho .tk-badge-btp-dan { background: #dbeafe; color: #1d4ed8; }
    #view-ton-kho .tk-badge-btp-hop { background: #d1fae5; color: #047857; }
    #view-ton-kho .tk-badge-btp-phun { background: #ffedd5; color: #c2410c; }
    #view-ton-kho .tk-badge-btp-son { background: #fce7f3; color: #be185d; }
    #view-ton-kho .tk-sub { font-size: 11px; color: #6b7280; }
    #view-ton-kho .tk-btp-head .tk-badge { margin-right: 8px; }

    /* Gia công sau — đồng bộ ns-tabs + kh-toolbar + kh-table */
    #view-san-xuat-kinh-dan .sx-kd-form-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px;
    }
    #view-san-xuat-kinh-dan .sx-kd-form-grid label {
      display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: #6b7280;
    }
    #view-san-xuat-kinh-dan .sx-kd-form-grid input,
    #view-san-xuat-kinh-dan .sx-kd-form-grid select {
      font-size: 13px; padding: 6px 8px; border: 1px solid #e5e7eb; border-radius: 6px;
    }
    #view-san-xuat-kinh-dan .sx-kd-bom-preview {
      margin-top: 12px; padding: 10px; background: #f9fafb; border-radius: 8px; font-size: 12px;
    }
    #view-san-xuat-kinh-dan .sx-kd-modal-card { max-width: 520px; }
    #view-san-xuat-gia-cong .gc-tab-meta {
      margin-left: 6px; font-size: 10px; font-weight: 600; opacity: .75;
    }
    #view-san-xuat-gia-cong .gc-unified-bar {
      display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
      padding: 8px 10px; border-radius: 14px; border: 1px solid #e8ecea; background: #fff; margin-bottom: 10px;
    }
    #view-san-xuat-gia-cong .gc-kho-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
    #view-san-xuat-gia-cong .gc-kho-btn {
      display: inline-flex; align-items: center; gap: 5px;
      border: 1px solid #e8ecea; background: #f8faf9; color: #6b7280;
      font-size: 12px; font-weight: 700; padding: 8px 12px; border-radius: 10px; cursor: pointer;
      transition: background .12s, color .12s, border-color .12s;
    }
    #view-san-xuat-gia-cong .gc-kho-btn:hover { background: #f3f5f4; color: #374151; }
    #view-san-xuat-gia-cong .gc-kho-btn.is-on { color: #fff; border-color: transparent; }
    #view-san-xuat-gia-cong .gc-kho-kinh_dan.is-on { background: #2563eb; }
    #view-san-xuat-gia-cong .gc-kho-kinh_hop.is-on { background: #047857; }
    #view-san-xuat-gia-cong .gc-kho-phun_cat.is-on { background: #c2410c; }
    #view-san-xuat-gia-cong .gc-kho-kinh_son.is-on { background: #be185d; }
    #view-san-xuat-gia-cong .gc-bar-tools {
      display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto;
    }
    #view-san-xuat-gia-cong .gc-search-wrap { min-width: 160px; flex: 1; max-width: 240px; }
    #view-san-xuat-gia-cong .gc-filter-st { min-width: 120px; }
    /* Dashboard Gia công sau */
    #view-san-xuat-gia-cong .gc-panel-inner {
      background: #eef1f0; border-radius: 14px; padding: 10px; min-height: 420px;
    }
    #view-san-xuat-gia-cong .gc-sau-dash {
      display: flex; flex-direction: column; gap: 10px; min-height: 400px;
    }
    #view-san-xuat-gia-cong .gc-kpi-grid {
      display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
    }
    #view-san-xuat-gia-cong .gc-kpi-card {
      display: flex; align-items: center; gap: 12px;
      background: #fff; border: 1px solid #eef1f0; border-radius: 14px; padding: 12px 14px;
      box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
    }
    #view-san-xuat-gia-cong .gc-kpi-icon {
      width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
      background: #f3f4f6; color: #374151; flex-shrink: 0;
    }
    #view-san-xuat-gia-cong .gc-kpi-val {
      display: block; font-size: 22px; font-weight: 800; color: #111827; line-height: 1.1;
    }
    #view-san-xuat-gia-cong .gc-val-active { color: #2563eb; }
    #view-san-xuat-gia-cong .gc-kpi-lbl {
      display: block; font-size: 11px; color: #9ca3af; margin-top: 2px;
    }
    #view-san-xuat-gia-cong .gc-kpi-warn .gc-kpi-icon { background: #fffbeb; color: #d97706; }
    #view-san-xuat-gia-cong .gc-kpi-active .gc-kpi-icon { background: #eff6ff; color: #2563eb; }
    #view-san-xuat-gia-cong .gc-kpi-done .gc-kpi-icon { background: #ecfdf5; color: #047857; }
    #view-san-xuat-gia-cong .gc-kpi-kinh-dan .gc-kpi-icon { background: #dbeafe; color: #1d4ed8; }
    #view-san-xuat-gia-cong .gc-kpi-kinh-hop .gc-kpi-icon { background: #dcfce7; color: #15803d; }
    #view-san-xuat-gia-cong .gc-kpi-phun-cat .gc-kpi-icon { background: #ffedd5; color: #c2410c; }
    #view-san-xuat-gia-cong .gc-kpi-kinh-son .gc-kpi-icon { background: #fce7f3; color: #be185d; }
    #view-san-xuat-gia-cong .gc-sau-split {
      display: flex; flex: 1; min-height: 0; min-height: 420px; max-height: calc(100vh - 320px);
      background: #fff; border: 1px solid #dfe4e2; border-radius: 12px; overflow: hidden;
      box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    }
    #view-san-xuat-gia-cong .gc-sau-main {
      flex: 1; min-width: 0; overflow: auto; padding: 10px 12px; background: #fff;
      display: flex; flex-direction: column;
    }
    #view-san-xuat-gia-cong .gc-sau-main .kh-table-wrap { flex: 1; min-height: 0; }
    #view-san-xuat-gia-cong .gc-sau-empty {
      padding: 48px 20px; text-align: center; color: #9ca3af; font-size: 13px; line-height: 1.5;
    }
    #view-san-xuat-gia-cong .gc-hist-panel {
      width: 280px; min-width: 240px; max-width: 32%; flex-shrink: 0;
      display: flex; flex-direction: column;
      background: #f8faf9; border-left: 1px solid #e8ecea;
    }
    #view-san-xuat-gia-cong .gc-hist-head {
      padding: 14px 14px 10px; border-bottom: 1px solid #eef1f0; flex-shrink: 0;
    }
    #view-san-xuat-gia-cong .gc-hist-title {
      margin: 0 0 10px; font-size: 14px; font-weight: 800; color: #111827;
    }
    #view-san-xuat-gia-cong .gc-ls-filters { display: flex; gap: 6px; flex-wrap: wrap; }
    #view-san-xuat-gia-cong .gc-ls-filter-btn {
      border: 1px solid #e5e7eb; background: #f9fafb; color: #6b7280;
      font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer;
      transition: all .12s;
    }
    #view-san-xuat-gia-cong .gc-ls-filter-btn:hover { border-color: #cbd5e1; color: #374151; }
    #view-san-xuat-gia-cong .gc-ls-filter-btn.is-on { background: #111827; border-color: #111827; color: #fff; }
    #view-san-xuat-gia-cong .gc-hist-list { flex: 1; overflow-y: auto; padding: 8px 10px; min-height: 0; }
    #view-san-xuat-gia-cong .gc-hist-empty {
      padding: 32px 12px; text-align: center; color: #9ca3af; font-size: 13px;
    }
    #view-san-xuat-gia-cong .gc-hist-item {
      display: flex; align-items: flex-start; gap: 8px;
      padding: 10px; border-radius: 10px; margin-bottom: 6px;
      border: 1px solid #f1f5f4; background: #fff; transition: background .12s;
    }
    #view-san-xuat-gia-cong .gc-hist-item:hover { background: #f9fafb; }
    #view-san-xuat-gia-cong .gc-hist-in { border-left: 3px solid #10b981; }
    #view-san-xuat-gia-cong .gc-hist-out { border-left: 3px solid #3b82f6; }
    #view-san-xuat-gia-cong .gc-hist-avatar {
      width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
      font-size: 12px; font-weight: 800; flex-shrink: 0;
    }
    #view-san-xuat-gia-cong .gc-hist-in .gc-hist-avatar { background: #d1fae5; color: #047857; }
    #view-san-xuat-gia-cong .gc-hist-out .gc-hist-avatar { background: #dbeafe; color: #2563eb; }
    #view-san-xuat-gia-cong .gc-hist-main { flex: 1; min-width: 0; }
    #view-san-xuat-gia-cong .gc-hist-row-title {
      display: flex; justify-content: space-between; align-items: flex-start; gap: 6px;
      font-size: 12px; font-weight: 700; color: #111827; line-height: 1.35;
    }
    #view-san-xuat-gia-cong .gc-hist-amt { font-size: 12px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
    #view-san-xuat-gia-cong .gc-hist-in .gc-hist-amt { color: #047857; }
    #view-san-xuat-gia-cong .gc-hist-out .gc-hist-amt { color: #2563eb; }
    #view-san-xuat-gia-cong .gc-hist-sub { font-size: 11px; color: #6b7280; margin-top: 2px; line-height: 1.35; }
    #view-san-xuat-gia-cong .gc-hist-time { font-size: 10px; color: #9ca3af; margin-top: 3px; }
    @media (max-width: 1100px) {
      #view-san-xuat-gia-cong .gc-kpi-grid { grid-template-columns: repeat(2, 1fr); }
      #view-san-xuat-gia-cong .gc-sau-split { flex-direction: column; max-height: none; }
      #view-san-xuat-gia-cong .gc-hist-panel { width: 100%; max-width: none; border-left: none; border-top: 1px solid #e8ecea; max-height: 280px; }
    }
    #view-ton-kho .tk-btp-dash-intro { padding: 4px 0 12px; }
    #view-ton-kho .tk-btp-summary-card {
      display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
      padding: 14px 16px; border-radius: 12px; border: 1px solid #fde68a; background: #fffbeb;
    }
    #view-ton-kho .tk-btp-summary-n { font-size: 28px; font-weight: 800; color: #b45309; margin-right: 8px; }
    #view-ton-kho .tk-btp-summary-l { font-size: 13px; color: #92400e; font-weight: 600; }
    #view-ton-kho .tk-btp-summary-hint { margin: 0; font-size: 12px; color: #78716c; flex: 1; min-width: 200px; }
    #view-ton-kho .tk-btp-legacy-section { margin-top: 14px; }
    #view-san-xuat-gia-cong .ns-tab.active .gc-tab-meta { color: #1a7a4c; }
    #view-san-xuat-gia-cong .gc-sau-table {
      min-width: 980px;
      table-layout: fixed;
    }
    #view-san-xuat-gia-cong .gc-sau-table col.gc-col-stt { width: 48px; }
    #view-san-xuat-gia-cong .gc-sau-table col.gc-col-dl { width: 96px; }
    #view-san-xuat-gia-cong .gc-sau-table col.gc-col-don { width: 100px; }
    #view-san-xuat-gia-cong .gc-sau-table col.gc-col-btp { width: 82px; }
    #view-san-xuat-gia-cong .gc-sau-table col.gc-col-lk { width: 130px; }
    #view-san-xuat-gia-cong .gc-sau-table col.gc-col-ktsl { width: 108px; }
    #view-san-xuat-gia-cong .gc-sau-table col.gc-col-gc { width: 128px; }
    #view-san-xuat-gia-cong .gc-sau-table col.gc-col-progress { width: 168px; }
    #view-san-xuat-gia-cong .gc-th-progress { text-align: center; }
    #view-san-xuat-gia-cong .gc-sau-table tbody tr { cursor: default; }
    #view-san-xuat-gia-cong .gc-sau-table tbody tr.gc-row-ht { opacity: .7; }
    #view-san-xuat-gia-cong .gc-sau-table tbody td {
      overflow: visible !important;
      max-width: none !important;
    }
    #view-san-xuat-gia-cong .gc-th-stt,
    #view-san-xuat-gia-cong .gc-td-stt { text-align: center; }
    #view-san-xuat-gia-cong .gc-td-ktsl { font-variant-numeric: tabular-nums; white-space: nowrap; }
    #view-san-xuat-gia-cong .gc-kt-sl { display: inline-flex; align-items: baseline; gap: 6px; }
    #view-san-xuat-gia-cong .gc-kt-val { font-size: 12px; color: #374151; }
    #view-san-xuat-gia-cong .gc-sl-val { font-weight: 800; color: #111827; font-size: 12px; }
    #view-san-xuat-gia-cong .gc-lk-kh {
      display: block; font-size: 10px; color: #9ca3af; margin-top: 2px; line-height: 1.3;
      word-break: break-word;
    }
    #view-san-xuat-gia-cong .gc-spec-lbl {
      display: block; font-size: 9px; font-weight: 800; text-transform: uppercase;
      letter-spacing: .05em; color: #9ca3af; margin-bottom: 1px;
    }
    #view-san-xuat-gia-cong .gc-spec-val {
      display: block; font-weight: 700; font-size: 12px; color: #1a1d1f;
      line-height: 1.35; word-break: break-word;
    }
    #view-san-xuat-gia-cong .gc-code-sub {
      display: block; font-size: 10px; color: #9ca3af; margin-top: 3px;
      font-family: ui-monospace, monospace;
    }
    #view-san-xuat-gia-cong .gc-td-progress {
      padding-left: 8px !important; padding-right: 8px !important;
      vertical-align: middle !important;
    }
    #view-san-xuat-gia-cong .gc-progress {
      display: inline-flex; align-items: center; justify-content: center;
      gap: 4px; width: 100%;
    }
    #view-san-xuat-gia-cong .gc-progress-step { flex: 0 0 auto; min-width: 0; }
    #view-san-xuat-gia-cong .gc-progress-arrow {
      flex: 0 0 auto; font-size: 11px; color: #d1d5db; font-weight: 700; line-height: 1;
    }
    #view-san-xuat-gia-cong .gc-stt-num {
      display: inline-flex; align-items: center; justify-content: center;
      min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px;
      background: #111827; color: #fff; font-weight: 800; font-size: 13px;
    }
    #view-san-xuat-gia-cong .gc-td-dl { font-weight: 600; word-break: break-word; }
    #view-san-xuat-gia-cong .gc-td-don { white-space: nowrap; }
    #view-san-xuat-gia-cong .gc-td-lk { font-size: 12px; word-break: break-word; }
    #view-san-xuat-gia-cong .gc-badge-dan, #view-san-xuat-gia-cong .gc-btp-badge.gc-badge-dan { background: #dbeafe; color: #1d4ed8; }
    #view-san-xuat-gia-cong .gc-badge-hop, #view-san-xuat-gia-cong .gc-btp-badge.gc-badge-hop { background: #dcfce7; color: #15803d; }
    #view-san-xuat-gia-cong .gc-badge-phun, #view-san-xuat-gia-cong .gc-btp-badge.gc-badge-phun { background: #ffedd5; color: #c2410c; }
    #view-san-xuat-gia-cong .gc-badge-son, #view-san-xuat-gia-cong .gc-btp-badge.gc-badge-son { background: #fce7f3; color: #be185d; }
    #view-san-xuat-gia-cong .gc-btp-badge {
      display: inline-block; padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 700;
    }
    #view-san-xuat-gia-cong .gc-pair-hint {
      display: inline-block; margin-left: 4px; font-size: 10px; font-weight: 700;
      padding: 2px 6px; border-radius: 6px; background: #eff6ff; color: #1d4ed8;
    }
    #view-san-xuat-gia-cong .gc-stt-tag { display: none; }
    #view-san-xuat-gia-cong .gc-td-kt { display: none; }
    #view-san-xuat-gia-cong .gc-kh-name, #view-san-xuat-gia-cong .gc-kh-gc { display: none; }
    #view-san-xuat-gia-cong .gc-td-mile,
    #view-san-xuat-gia-cong .gc-td-progress .gc-pill-ts {
      display: inline-flex; align-items: center; justify-content: center;
      font-size: 10px; font-weight: 600; white-space: nowrap;
      padding: 3px 5px; min-width: 0; line-height: 1.15;
    }
    #view-san-xuat-gia-cong .gc-ts-block { display: flex; flex-direction: column; align-items: center; gap: 1px; }
    #view-san-xuat-gia-cong .gc-ts-t { font-weight: 700; }
    #view-san-xuat-gia-cong .gc-ts-d { font-size: 9px; opacity: .85; }
    #view-san-xuat-gia-cong .gc-td-progress .btn-xs { min-width: 48px; padding: 3px 5px; font-size: 10px; }
    #view-ton-kho .kh-page-title, #view-ton-kho .kh-input, #view-ton-kho .kh-select,
    #view-ton-kho .kh-label, #view-ton-kho .kh-empty, #view-ton-kho .kh-loading,
    #view-ton-kho .tk-kho-btn, #view-ton-kho .tk-chip, #view-ton-kho .tk-tab,
    #view-ton-kho .tk-bc-preset, #view-ton-kho .tk-bc-toolbar-lbl, #view-ton-kho .tk-group-head,
    #view-ton-kho .tk-nhom-head, #view-ton-kho .tk-bc-card h4, #view-ton-kho .tk-bc-card-sub,
    #view-ton-kho .tk-bc-summary, #view-ton-kho .tk-kpi-lbl, #view-ton-kho .tk-kpi-val,
    #view-ton-kho .tk-bc-hero-val, #view-ton-kho .tk-bc-hero-lbl, #view-ton-kho .tk-bc-hero-sub,
    #view-ton-kho .btn-green-sm, #view-ton-kho .btn-red-sm, #view-ton-kho .btn-blue-sm, #view-ton-kho .btn-cfg-sm,
    #view-ton-kho .btn-green, #view-ton-kho .btn-ghost, #view-ton-kho .btn-red-ghost {
      font-family: inherit;
    }
    #view-san-xuat-cuong-luc .erp-top-bar,
    #view-san-xuat-thanh-pham .erp-top-bar {
      display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
      justify-content: space-between; margin-top: 8px;
    }
    #view-san-xuat-cuong-luc .erp-chips,
    #view-san-xuat-thanh-pham .erp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
    #view-san-xuat-cuong-luc .erp-hint,
    #view-san-xuat-thanh-pham .erp-hint {
      margin: 10px 0 0; font-size: 12px; color: #6b7280; line-height: 1.45;
    }
    #view-san-xuat-cuong-luc .kh-table.erp-table.sx-a-o-table,
    #view-san-xuat-thanh-pham .kh-table.erp-table.sx-a-o-table { min-width: 1400px; font-size: 12px; }
    .sx-line-panel .kh-table.sx-smart-table {
      width: 100%; min-width: 0; font-size: 13px; table-layout: auto;
    }
    .sx-line-panel .sx-smart-card .kh-table-wrap { overflow-x: auto; }
    .sx-line-panel .sx-smart-table thead th {
      background: #f1f5f4; color: #374151; font-size: 10px; font-weight: 800;
      text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px;
      border-bottom: 1px solid #e5e7eb; white-space: nowrap;
    }
    .sx-line-panel .sx-smart-table tbody td {
      padding: 12px 12px; vertical-align: middle; border-bottom: 1px solid #f0f2f1;
    }
    .sx-line-panel .sx-smart-table tbody tr:hover { background: #f8faf9; }
    .sx-line-panel .sx-th-stt, .sx-line-panel .sx-td-stt {
      width: 52px; font-weight: 800; font-size: 15px; color: #111827; text-align: center;
    }
    .sx-line-panel .sx-th-kh, .sx-line-panel .sx-td-kh { min-width: 200px; max-width: 280px; }
    .sx-line-panel .sx-dl {
      font-weight: 800; font-size: 13px; color: #1a7a4c; line-height: 1.3;
      text-transform: uppercase; letter-spacing: .02em;
    }
    .sx-line-panel .sx-kh {
      font-size: 12px; color: #4b5563; margin-top: 3px; line-height: 1.35;
    }
    .sx-line-panel .sx-loai-pill {
      display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 700;
      padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #4338ca;
    }
    .sx-line-panel .sx-th-kt, .sx-line-panel .sx-td-kt {
      white-space: nowrap; font-weight: 800; font-size: 14px; color: #111827;
      font-variant-numeric: tabular-nums;
    }
    .sx-line-panel .sx-th-sl, .sx-line-panel .sx-td-qty { white-space: nowrap; text-align: center; }
    .sx-line-panel .sx-sl {
      font-weight: 800; font-size: 15px; color: #1a7a4c; font-variant-numeric: tabular-nums;
    }
    .sx-line-panel .sx-sl-u { font-size: 12px; font-weight: 700; }
    .sx-line-panel .sx-m2 { font-size: 11px; color: #9ca3af; margin-top: 2px; }
    .sx-line-panel .sx-th-gc, .sx-line-panel .sx-td-gc { min-width: 220px; }
    .sx-line-panel .sx-gc-badges {
      display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
    }
    .sx-line-panel .sx-badge {
      display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.25;
      padding: 4px 8px; border-radius: 8px; white-space: nowrap; max-width: 100%;
    }
    .sx-line-panel .sx-badge-gc { background: #f3f4f6; color: #374151; }
    .sx-line-panel .sx-badge-gcct { background: #f3e8ff; color: #7c3aed; }
    .sx-line-panel .sx-badge-progress {
      background: #fffbeb; color: #b45309; border: 1px solid #fcd34d;
    }
    .sx-line-panel .sx-gc-empty { color: #9ca3af; font-size: 12px; }
    .sx-line-panel .sx-th-don, .sx-line-panel .sx-td-don { min-width: 140px; }
    .sx-line-panel .sx-don { font-weight: 700; font-size: 12px; color: #111827; }
    .sx-line-panel .sx-dates { font-size: 11px; color: #9ca3af; margin-top: 3px; white-space: nowrap; }
    .sx-line-panel .sx-th-note, .sx-line-panel .sx-td-note {
      min-width: 120px; max-width: 200px; font-size: 12px; color: #6b7280;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .sx-line-panel .sx-th-st { width: 56px; }
    .sx-line-panel .sx-smart-table .erp-td-st { max-width: none; text-align: center; }
    .sx-live-pill {
      display: inline-flex; align-items: center; gap: 6px;
      font-size: 11px; font-weight: 600; color: #1a7a4c;
      padding: 4px 10px; border-radius: 999px; background: #ecfdf3; border: 1px solid #bbf7d0;
      margin-right: 6px;
    }
    .sx-live-dot {
      width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
      box-shadow: 0 0 0 0 rgba(34,197,94,.5);
      animation: sx-live-pulse 2s ease-out infinite;
    }
    @keyframes sx-live-pulse {
      0% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
      70% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
      100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
    }
    .sx-batch-panel .sx-batch-card { padding: 0; }
    .sx-batch-panel .sx-batch-shell {
      display: flex; height: calc(100vh - 220px); min-height: 480px; max-height: 780px;
      align-items: stretch; overflow: hidden;
    }
    .sx-batch-panel .sx-lo-sidebar {
      width: 260px; flex-shrink: 0; border-right: 1px solid #e8ecea;
      background: #f8faf9; display: flex; flex-direction: column; overflow: hidden;
    }
    .sx-batch-panel .sx-lo-side-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 14px; font-size: 10px; font-weight: 800; letter-spacing: .06em;
      color: #6b7280; text-transform: uppercase; border-bottom: 1px solid #e8ecea;
    }
    .sx-batch-panel .sx-lo-side-badge {
      font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
      background: #e6f4ec; color: #1a7a4c;
    }
    .sx-batch-panel .sx-lo-list {
      flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px;
      display: flex; flex-direction: column; gap: 8px;
    }
    .sx-batch-panel .sx-lo-foot {
      flex-shrink: 0; padding: 12px 14px; border-top: 1px solid #e8ecea; background: #fff;
    }
    .sx-batch-panel .sx-lo-foot-lbl {
      font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #9ca3af;
    }
    .sx-batch-panel .sx-lo-foot-row {
      display: flex; justify-content: space-between; margin-top: 6px;
      font-size: 12px; font-weight: 700; color: #374151;
    }
    .sx-batch-panel .sx-lo-empty {
      font-size: 12px; color: #9ca3af; padding: 16px 8px; text-align: center;
    }
    .sx-batch-panel .sx-lo-card {
      position: relative; width: 100%; text-align: left; border: 1px solid #e5e7eb;
      background: #fff; border-radius: 12px; padding: 12px 12px 10px; cursor: pointer;
      transition: border-color .15s, box-shadow .15s;
    }
    .sx-batch-panel .sx-lo-card:hover { border-color: #a7d4bc; box-shadow: 0 2px 8px rgba(26,122,76,.08); }
    .sx-batch-panel .sx-lo-card.is-active {
      border-color: #1a7a4c; background: #f0fdf6; box-shadow: 0 0 0 1px #1a7a4c;
    }
    .sx-batch-panel .sx-lo-dot {
      position: absolute; top: 10px; right: 10px; width: 8px; height: 8px;
      border-radius: 50%; background: #1a7a4c;
    }
    .sx-batch-panel .sx-lo-dot-warn { right: 22px; background: #dc2626; }
    .sx-batch-panel .sx-lo-card-name {
      font-size: 13px; font-weight: 800; color: #111827; line-height: 1.25;
      padding-right: 18px;
    }
    .sx-batch-panel .sx-lo-card-meta { font-size: 11px; color: #9ca3af; margin-top: 4px; }
    .sx-batch-panel .sx-lo-card-row {
      display: flex; justify-content: space-between; align-items: center;
      margin-top: 8px; font-size: 11px; font-weight: 700;
    }
    .sx-batch-panel .sx-lo-card-pct { color: #1a7a4c; }
    .sx-batch-panel .sx-lo-card-sl { color: #374151; }
    .sx-batch-panel .sx-lo-bar {
      height: 6px; border-radius: 999px; background: #e5e7eb; margin-top: 8px; overflow: hidden;
    }
    .sx-batch-panel .sx-lo-bar-fill {
      height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1a7a4c, #34d399);
      transition: width .2s;
    }
    .sx-batch-panel .sx-lo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
    .sx-batch-panel .sx-lo-main-head {
      display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
      padding: 14px 16px 10px; border-bottom: 1px solid #f0f2f1; flex-shrink: 0;
    }
    .sx-batch-panel .sx-lo-main-title {
      margin: 0; font-size: 15px; font-weight: 800; color: #111827; letter-spacing: .02em;
    }
    .sx-batch-panel .sx-lo-main-title span { color: #1a7a4c; }
    .sx-batch-panel .sx-lo-main-sub { margin: 4px 0 0; font-size: 12px; color: #6b7280; }
    .sx-batch-panel .sx-lo-main-meta { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
    .sx-batch-panel .sx-lo-meta-chip {
      font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
      background: #f3f4f6; color: #374151;
    }
    .sx-batch-panel .sx-lo-meta-warn { background: #fee2e2; color: #b91c1c; }
    .sx-batch-panel .sx-batch-scroll {
      flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 8px 8px; position: relative;
    }
    .sx-batch-panel .sx-batch-table {
      width: 100%; table-layout: fixed; font-size: 13px; border-collapse: separate; border-spacing: 0;
    }
    .sx-batch-panel .sx-batch-table thead th {
      position: sticky; top: 0; z-index: 4;
      background: #f1f5f4; color: #374151; font-size: 10px; font-weight: 800;
      text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px;
      border-bottom: 1px solid #e5e7eb;
    }
    .sx-batch-panel .sx-batch-table tbody td {
      padding: 11px 12px; vertical-align: middle; border-bottom: 1px solid #f0f2f1; background: #fff;
    }
    .sx-batch-panel .sx-batch-table tbody tr:hover td { background: #f8faf9; }
    .sx-batch-panel .sx-batch-table tbody tr:hover td.sx-b-stick-1,
    .sx-batch-panel .sx-batch-table tbody tr:hover td.sx-b-stick-2,
    .sx-batch-panel .sx-batch-table tbody tr:hover td.sx-b-stick-3 { background: #f0fdf6; }
    .sx-batch-panel .sx-b-stick-1 {
      position: sticky; left: 0; z-index: 3; width: 40px; min-width: 40px;
      box-shadow: 2px 0 6px rgba(0,0,0,.04);
    }
    .sx-batch-panel .sx-b-stick-2 {
      position: sticky; left: 40px; z-index: 3; width: 52px; min-width: 52px;
      box-shadow: 2px 0 6px rgba(0,0,0,.04);
    }
    .sx-batch-panel .sx-b-stick-3 {
      position: sticky; left: 92px; z-index: 3; width: 118px; min-width: 118px;
      box-shadow: 4px 0 8px rgba(0,0,0,.05);
    }
    .sx-batch-panel thead .sx-b-stick-1,
    .sx-batch-panel thead .sx-b-stick-2,
    .sx-batch-panel thead .sx-b-stick-3 { z-index: 5; background: #f1f5f4; }
    .sx-batch-panel .sx-td-kt { font-weight: 800; font-size: 14px; color: #111827; }
    .sx-batch-panel .sx-th-kh { width: 26%; }
    .sx-batch-panel .sx-th-gc { width: 22%; }
    .sx-batch-panel .sx-th-don { width: 14%; }
    .sx-batch-panel .sx-th-sl { width: 68px; }
    .sx-batch-panel .sx-batch-table .erp-btn-tick { min-width: 52px; font-weight: 800; }
    .sx-batch-panel .sx-batch-table .erp-td-act { width: 72px; }
    .sx-batch-panel .sx-th-phase { width: 148px; }
    .sx-batch-panel .sx-td-phase { vertical-align: middle; }
    .sx-batch-panel .sx-lo-card { padding-bottom: 12px; }
    /* Bảng theo dõi gọn — Cường lực & Thành phẩm */
    .sx-batch-track .kh-page-title { font-size: 17px; }
    .sx-batch-track .sx-btn-refresh {
      font-size: 12px; font-weight: 700; padding: 6px 12px; min-width: 0;
    }
    .sx-batch-track .sx-batch-shell {
      height: calc(100vh - 168px); min-height: 480px; max-height: 820px;
    }
    .sx-batch-track .sx-track-head {
      align-items: center; padding: 10px 14px 8px; gap: 10px;
    }
    .sx-batch-track .sx-track-head-main {
      flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
    }
    .sx-batch-track .sx-lo-main-title { font-size: 14px; margin: 0; white-space: nowrap; }
    .sx-batch-track .sx-track-search {
      flex: 0 1 220px; min-width: 140px; max-width: 280px;
      border: 1px solid #e5e7eb; border-radius: 8px; background: #f9fafb;
      font-size: 12px; padding: 5px 10px; color: #374151;
    }
    .sx-batch-track .sx-track-search:focus {
      outline: none; border-color: #a7d4bc; background: #fff;
      box-shadow: 0 0 0 2px rgba(26,122,76,.08);
    }
    .sx-batch-track .sx-track-search::placeholder { color: #9ca3af; }
    .sx-batch-track .sx-lo-main-meta { flex-shrink: 0; }
    .sx-batch-track .sx-track-table { font-size: 12px; }
    .sx-batch-track .sx-track-table thead th {
      padding: 8px 10px; font-size: 10px;
    }
    .sx-batch-track .sx-track-table tbody td {
      padding: 8px 10px; vertical-align: top;
    }
    .sx-batch-track .sx-tr-th-stt, .sx-batch-track .sx-tr-stt { width: 44px; text-align: center; }
    .sx-batch-track .sx-tr-th-kt, .sx-batch-track .sx-td-kt-sl { width: 14%; }
    .sx-batch-track .sx-tr-th-dl, .sx-batch-track .sx-tr-dl { width: 18%; }
    .sx-batch-track .sx-tr-th-gc, .sx-batch-track .sx-tr-gc { width: 16%; }
    .sx-batch-track .sx-tr-th-gcct, .sx-batch-track .sx-tr-gcct { width: 18%; }
    .sx-batch-track .sx-tr-th-phase, .sx-batch-track .sx-tr-phase { width: 20%; }
    .sx-batch-track .sx-tr-kt { font-weight: 800; font-size: 13px; color: #111827; line-height: 1.25; }
    .sx-batch-track .sx-tr-sl { font-size: 11px; font-weight: 700; color: #1a7a4c; margin-top: 2px; }
    .sx-batch-track .sx-tr-m2 { font-weight: 600; color: #6b7280; }
    .sx-batch-track .sx-tr-dl { font-weight: 800; color: #047857; line-height: 1.35; }
    .sx-batch-track .sx-tr-gc .sx-gc-badges,
    .sx-batch-track .sx-tr-gcct .sx-gc-badges { gap: 3px; }
    .sx-batch-track .sx-tr-gc .sx-badge,
    .sx-batch-track .sx-tr-gcct .sx-badge { font-size: 10px; padding: 2px 6px; }
    .sx-batch-track .kh-loading-bottom {
      position: sticky; bottom: 0; left: 0; right: 0;
      background: rgba(255,255,255,.92); border-top: 1px solid #eef1f0;
      padding: 10px; margin-top: 4px; backdrop-filter: blur(4px);
    }
    .sx-batch-track .kh-empty { display: none !important; }
    .sx-monitor-panel .sx-monitor-badge {
      font-size: 11px; font-weight: 700; color: #6b7280; padding: 4px 10px;
      border-radius: 999px; background: #f3f4f6; white-space: nowrap;
    }
    .sx-monitor-panel .sx-m-stick-2 {
      position: sticky; left: 0; z-index: 3; width: 52px; min-width: 52px;
      box-shadow: 2px 0 6px rgba(0,0,0,.04);
    }
    .sx-monitor-panel .sx-m-stick-3 {
      position: sticky; left: 52px; z-index: 3; width: 118px; min-width: 118px;
      box-shadow: 4px 0 8px rgba(0,0,0,.05);
    }
    .sx-monitor-panel thead .sx-m-stick-2,
    .sx-monitor-panel thead .sx-m-stick-3 { z-index: 5; background: #f1f5f4; }
    .sx-monitor-panel .sx-th-phase { width: 168px; }
    .sx-monitor-panel .sx-td-phase { vertical-align: middle; }
    .sx-phase-block { display: flex; flex-direction: column; gap: 5px; }
    .sx-phase-block-sm { gap: 4px; }
    .sx-phase-row {
      display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700;
    }
    .sx-phase-lbl {
      width: 22px; flex-shrink: 0; color: #6b7280; text-transform: uppercase; letter-spacing: .03em;
    }
    .sx-phase-bar {
      flex: 1; height: 6px; border-radius: 999px; background: #e5e7eb; overflow: hidden; min-width: 48px;
    }
    .sx-phase-fill { height: 100%; border-radius: 999px; transition: width .2s; }
    .sx-phase-fill.sx-phase-gc { background: linear-gradient(90deg, #94a3b8, #64748b); }
    .sx-phase-fill.sx-phase-toi { background: linear-gradient(90deg, #1a7a4c, #34d399); }
    .sx-phase-num { font-size: 10px; font-weight: 800; color: #374151; min-width: 36px; text-align: right; }
    .sx-phase-dot {
      width: 8px; height: 8px; border-radius: 50%; background: #e5e7eb; flex-shrink: 0;
    }
    .sx-phase-dot.is-on { background: #1a7a4c; }
    .sx-phase-note { font-size: 10px; color: #9ca3af; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sx-monitor-panel .sx-lo-card { padding-bottom: 12px; }
    .sx-list-panel .sx-list-card { padding: 0; }
    .sx-list-panel .sx-list-scroll {
      max-height: calc(100vh - 230px); min-height: 420px;
      overflow-y: auto; overflow-x: hidden; position: relative;
    }
    .sx-list-panel .sx-list-table {
      width: 100%; table-layout: fixed; font-size: 13px; border-collapse: separate; border-spacing: 0;
    }
    .sx-list-panel .sx-list-table thead th {
      position: sticky; top: 0; z-index: 4;
      background: #f1f5f4; color: #374151; font-size: 10px; font-weight: 800;
      text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px;
      border-bottom: 1px solid #e5e7eb;
    }
    .sx-list-panel .sx-list-table tbody td {
      padding: 11px 12px; vertical-align: middle; border-bottom: 1px solid #f0f2f1;
      background: #fff;
    }
    .sx-list-panel .sx-list-table tbody tr:hover td { background: #f8faf9; }
    .sx-list-panel .sx-list-table tbody tr:hover td.sx-stick-1,
    .sx-list-panel .sx-list-table tbody tr:hover td.sx-stick-2,
    .sx-list-panel .sx-list-table tbody tr:hover td.sx-stick-3 { background: #f0fdf6; }
    .sx-list-panel .sx-stick-1 {
      position: sticky; left: 0; z-index: 3; width: 40px; min-width: 40px;
      box-shadow: 2px 0 6px rgba(0,0,0,.04);
    }
    .sx-list-panel .sx-stick-2 {
      position: sticky; left: 40px; z-index: 3; width: 52px; min-width: 52px;
      box-shadow: 2px 0 6px rgba(0,0,0,.04);
    }
    .sx-list-panel .sx-stick-3 {
      position: sticky; left: 92px; z-index: 3; width: 118px; min-width: 118px;
      box-shadow: 4px 0 8px rgba(0,0,0,.05);
    }
    .sx-list-panel thead .sx-stick-1,
    .sx-list-panel thead .sx-stick-2,
    .sx-list-panel thead .sx-stick-3 { z-index: 5; background: #f1f5f4; }
    .sx-list-panel .sx-td-kt { font-weight: 800; font-size: 14px; color: #111827; }
    .sx-list-panel .sx-th-kh { width: 28%; }
    .sx-list-panel .sx-th-gc { width: 24%; }
    .sx-list-panel .sx-th-don { width: 14%; }
    .sx-list-panel .sx-th-sl { width: 72px; }
    .sx-list-panel .sx-group-row td { padding: 0; border: none; background: transparent !important; }
    .sx-list-panel .sx-group-cell {
      padding: 10px 12px 6px !important; background: #f8faf9 !important;
      border-top: 2px solid #e8ecea;
    }
    .sx-list-panel .sx-group-name {
      font-size: 12px; font-weight: 800; color: #1a7a4c; letter-spacing: .03em; text-transform: uppercase;
    }
    .sx-list-panel .sx-list-foot {
      position: sticky; bottom: 0; z-index: 4;
      display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
      padding: 10px 14px; background: #fff; border-top: 1px solid #e8ecea;
      font-size: 12px; color: #6b7280;
    }
    .sx-list-panel .sx-list-foot-lbl {
      font-weight: 800; text-transform: uppercase; font-size: 10px; letter-spacing: .05em; color: #9ca3af;
    }
    .sx-list-panel .sx-list-foot-chip {
      padding: 4px 10px; border-radius: 999px; background: #f3f4f6; color: #374151; font-weight: 600;
    }
    .sx-list-panel .sx-list-foot-total { margin-left: auto; font-weight: 700; color: #1a7a4c; }
    .sx-list-panel .erp-btn-tick { min-width: 52px; font-weight: 800; }
    #view-san-xuat-cuong-luc .sx-a-o-table .sx-td-date,
    #view-san-xuat-thanh-pham .sx-a-o-table .sx-td-date { white-space: nowrap; width: 72px; }
    #view-san-xuat-cuong-luc .erp-th-chk,
    #view-san-xuat-cuong-luc .erp-td-chk,
    #view-san-xuat-thanh-pham .erp-th-chk,
    #view-san-xuat-thanh-pham .erp-td-chk { width: 36px; text-align: center; }
    #view-san-xuat-cuong-luc .erp-th-act,
    #view-san-xuat-cuong-luc .erp-td-act,
    #view-san-xuat-thanh-pham .erp-th-act,
    #view-san-xuat-thanh-pham .erp-td-act { width: 52px; text-align: center; }
    #view-san-xuat-cuong-luc .erp-td-st,
    #view-san-xuat-thanh-pham .erp-td-st { max-width: 180px; }
    #view-san-xuat-cuong-luc .erp-st,
    #view-san-xuat-thanh-pham .erp-st {
      display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 6px;
      border-radius: 6px; text-transform: uppercase; letter-spacing: .03em;
    }
    #view-san-xuat-cuong-luc .erp-st-run,
    #view-san-xuat-thanh-pham .erp-st-run { background: #dbeafe; color: #1d4ed8; }
    #view-san-xuat-cuong-luc .erp-st-ok,
    #view-san-xuat-thanh-pham .erp-st-ok { background: #e6f4ec; color: #1a7a4c; }
    #view-san-xuat-cuong-luc .erp-st-err,
    #view-san-xuat-thanh-pham .erp-st-err { background: #fee2e2; color: #b91c1c; }
    #view-san-xuat-cuong-luc .erp-st-txt,
    #view-san-xuat-thanh-pham .erp-st-txt { font-size: 11px; color: #6b7280; margin-left: 4px; }
    #view-san-xuat-cuong-luc .erp-row-done,
    #view-san-xuat-thanh-pham .erp-row-done { opacity: .72; }
    #view-san-xuat-cuong-luc .erp-row-err,
    #view-san-xuat-thanh-pham .erp-row-err { background: #fff7f7; }
    #view-san-xuat-cuong-luc .erp-chk,
    #view-san-xuat-thanh-pham .erp-chk { width: 15px; height: 15px; cursor: pointer; }
    #view-san-xuat-cuong-luc .erp-btn-tick,
    #view-san-xuat-thanh-pham .erp-btn-tick { min-width: 32px; padding: 4px 8px !important; }
    #view-san-xuat-dashboard .sx-dash-grid-2 {
      display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px;
    }
    @media (max-width: 900px) { #view-san-xuat-dashboard .sx-dash-grid-2 { grid-template-columns: 1fr; } }
    #view-san-xuat-dashboard .sx-dash-line-card {
      background: #fff; border: 1px solid #e8ecea; border-radius: 14px; padding: 14px 16px;
    }
    #view-san-xuat-dashboard .sx-dash-line-title { margin: 0 0 10px; font-size: var(--vpg-font-sm); font-weight: 800; }
    #view-san-xuat-dashboard .sx-dash-line-stats { display: flex; flex-wrap: wrap; gap: 10px; }
    #view-san-xuat-dashboard .sx-dash-mini { min-width: 72px; }
    #view-san-xuat-dashboard .sx-dash-mini-v { display: block; font-size: 22px; font-weight: 800; color: #111827; line-height: 1.1; }
    #view-san-xuat-dashboard .sx-dash-mini-l { display: block; font-size: var(--vpg-font-sm); color: #6b7280; margin-top: 2px; }
    #view-san-xuat-dashboard .sx-dash-mini-err .sx-dash-mini-v { color: #b91c1c; }
    #view-san-xuat-dashboard .sx-dash-line-cl { border-top: 3px solid #1a7a4c; }
    #view-san-xuat-dashboard .sx-dash-line-tp { border-top: 3px solid #7c3aed; }
    #view-san-xuat-dashboard .sx-dash-line-kd { border-top: 3px solid #2563eb; }
    #view-san-xuat-dashboard .sx-dash-line-gc { border-top: 3px solid #c2410c; }
    #view-san-xuat-dashboard .sx-work-chart { display: flex; gap: 6px; align-items: flex-end; min-height: 120px; overflow-x: auto; padding: 8px 0; }
    #view-san-xuat-dashboard .sx-work-col { flex: 0 0 52px; text-align: center; }
    #view-san-xuat-dashboard .sx-work-stack { width: 100%; background: #e5e7eb; border-radius: 6px 6px 0 0; position: relative; min-height: 4px; }
    #view-san-xuat-dashboard .sx-work-done { position: absolute; bottom: 0; left: 0; right: 0; background: #1a7a4c; border-radius: 0 0 6px 6px; }
    #view-san-xuat-dashboard .sx-work-lbl { display: block; font-size: var(--vpg-font-sm); color: #6b7280; margin-top: 4px; }
    #view-san-xuat-dashboard .sx-work-meta { display: block; font-size: var(--vpg-font-sm); color: #9ca3af; margin-top: 2px; line-height: 1.2; }
    #view-san-xuat-dashboard .sx-work-legend { display: flex; gap: 14px; margin-top: 8px; font-size: var(--vpg-font-sm); color: #6b7280; }
    #view-san-xuat-dashboard .sx-leg-push, #view-san-xuat-dashboard .sx-leg-done { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
    #view-san-xuat-dashboard .sx-leg-push { background: #e5e7eb; }
    #view-san-xuat-dashboard .sx-leg-done { background: #1a7a4c; }
    #view-san-xuat-dashboard .sx-dash-card { padding: 14px 16px; margin-bottom: 12px; }
    #view-san-xuat-dashboard .sx-dash-card-sub { margin: 0 0 10px; font-size: var(--vpg-font-sm); color: #6b7280; }
    #view-san-xuat-dashboard .sx-dash-stats {
      display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
      gap: 12px; margin-bottom: 14px;
    }
    #view-san-xuat-dashboard .sx-dash-stat {
      background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px;
    }
    #view-san-xuat-dashboard .sx-dash-stat-val { font-size: 26px; font-weight: 800; color: #111827; }
    #view-san-xuat-dashboard .sx-dash-stat-lbl { font-size: 12px; color: #6b7280; margin-top: 2px; }
    #view-san-xuat-dashboard .sx-dash-stat-sub { font-size: 11px; color: #9ca3af; margin-top: 4px; }
    #view-san-xuat-dashboard .sx-dash-stat-run .sx-dash-stat-val { color: #1d4ed8; }
    #view-san-xuat-dashboard .sx-dash-stat-ok .sx-dash-stat-val { color: #1a7a4c; }
    #view-san-xuat-dashboard .sx-dash-stat-err .sx-dash-stat-val { color: #b91c1c; }
    #view-san-xuat-dashboard .sx-dash-grid {
      display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      gap: 12px; margin-bottom: 12px;
    }
    #view-san-xuat-dashboard .sx-dash-card-title {
      font-size: 14px; font-weight: 700; margin: 0 0 10px; color: #111827;
    }
    #view-san-xuat-dashboard .sx-dash-empty { font-size: 13px; color: #6b7280; margin: 0; }
    #view-san-xuat-dashboard .sx-dash-table { font-size: 12px; }
    #view-san-xuat-dashboard .sx-td-num { text-align: right; font-variant-numeric: tabular-nums; }
    #view-san-xuat-dashboard .sx-kho-group { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f3f4f6; }
    #view-san-xuat-dashboard .sx-kho-group-head {
      display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
    }
    #view-san-xuat-dashboard .sx-kho-loai { font-weight: 700; font-size: 13px; color: #1a7a4c; }

/* TMS dashboard */
.tms-dash-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tms-dash-stat { background: #fff; border: 1px solid #e8ecea; border-radius: 14px; padding: 14px 16px; }
.tms-dash-stat-val { font-size: 26px; font-weight: 800; color: #111827; }
.tms-dash-stat-lbl { font-size: 12px; color: #6b7280; margin-top: 2px; }
.tms-dash-stat-sub { font-size: 11px; color: #9ca3af; margin-top: 4px; }
.tms-dash-stat-warn .tms-dash-stat-val { color: #b45309; }
.tms-dash-stat-run .tms-dash-stat-val { color: #1d4ed8; }
.tms-dash-stat-info .tms-dash-stat-val { color: #7c3aed; }
.tms-dash-stat-ok .tms-dash-stat-val { color: #1a7a4c; }
.tms-dash-card { padding: 14px 16px; margin-bottom: 12px; }
.tms-dash-card-title { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.tms-dash-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tms-dash-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1px solid #e8ecea; background: #fff; font-size: 13px; font-weight: 600; color: #1a1d1f; cursor: pointer; }
.tms-dash-link:hover { border-color: #1a7a4c; color: #1a7a4c; }

/* SX dashboard — compact KPI (2025) */
#view-san-xuat-dashboard .sx-dash-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 720px;
  margin-bottom: 12px;
}
#view-san-xuat-dashboard .sx-dash-main-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 720px;
  margin-bottom: 12px;
}
#view-san-xuat-dashboard .sx-dash-block {
  background: #fff;
  border: 1px solid #e8ecea;
  border-radius: 12px;
  padding: 10px 10px 8px;
}
#view-san-xuat-dashboard .sx-dash-block-cl { border-top: 3px solid #1a7a4c; }
#view-san-xuat-dashboard .sx-dash-block-tp { border-top: 3px solid #7c3aed; }
#view-san-xuat-dashboard .sx-dash-block-kd { border-top: 3px solid #2563eb; }
#view-san-xuat-dashboard .sx-dash-block-gc { border-top: 3px solid #c2410c; }
#view-san-xuat-dashboard .sx-dash-block-title {
  font-size: 12px;
  font-weight: 800;
  color: #374151;
  margin-bottom: 8px;
  line-height: 1.2;
}
#view-san-xuat-dashboard .sx-dash-block-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
#view-san-xuat-dashboard .sx-dash-kpi {
  text-align: center;
  padding: 6px 2px;
  background: #f9fafb;
  border-radius: 8px;
  min-width: 0;
}
#view-san-xuat-dashboard .sx-dash-kpi-v {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
#view-san-xuat-dashboard .sx-dash-kpi-l {
  display: block;
  font-size: 10px;
  color: #6b7280;
  margin-top: 2px;
  line-height: 1.15;
}
#view-san-xuat-dashboard .sx-dash-kpi-run .sx-dash-kpi-v { color: #1d4ed8; }
#view-san-xuat-dashboard .sx-dash-kpi-ok .sx-dash-kpi-v { color: #1a7a4c; }
#view-san-xuat-dashboard .sx-dash-kpi-err .sx-dash-kpi-v { color: #b91c1c; }
#view-san-xuat-dashboard .sx-dash-kpi-info .sx-dash-kpi-v { color: #7c3aed; }
#view-san-xuat-dashboard .sx-dash-links-card {
  padding: 12px 14px;
  max-width: 720px;
}
#view-san-xuat-dashboard .sx-dash-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#view-san-xuat-dashboard .sx-dash-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e8ecea;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #1a1d1f;
  cursor: pointer;
}
#view-san-xuat-dashboard .sx-dash-link:hover {
  border-color: #1a7a4c;
  color: #1a7a4c;
}
@media (max-width: 900px) {
  #view-san-xuat-dashboard .sx-dash-summary,
  #view-san-xuat-dashboard .sx-dash-main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }
}
@media (max-width: 480px) {
  #view-san-xuat-dashboard .sx-dash-summary,
  #view-san-xuat-dashboard .sx-dash-main-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* NOIBO — danh sách + modal */
.nb-modal-panel { max-width: 640px; width: 100%; }
.nb-modal-panel.nb-pl-thuong { box-shadow: inset 4px 0 0 #64748b; }
.nb-modal-panel.nb-pl-gap { box-shadow: inset 4px 0 0 #ea580c; }
.nb-modal-panel.nb-pl-yeu_cau { box-shadow: inset 4px 0 0 #7c3aed; }
.nb-modal-panel.nb-pl-quan_trong { box-shadow: inset 4px 0 0 #dc2626; }
.nb-pl-strip { border-left: 4px solid #64748b; }
.nb-phieu-scroll { overflow-x: auto; margin: 0.5rem 0; border: 1px solid #e8ecea; border-radius: 10px; }
.nb-add-line { margin-top: 0.35rem; }
.nb-col-vt { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-kpi-thuong b { color: #475569; }
.nb-kpi-gap b { color: #c2410c; }
.nb-kpi-yeu_cau b { color: #6d28d9; }
.nb-kpi-quan_trong b { color: #b91c1c; }
.nb-kpi-khac b { color: #64748b; }
.nb-kpi-thuong { border-color: #cbd5e1; }
.nb-kpi-gap { border-color: #fdba74; background: #fffbf5; }
.nb-kpi-yeu_cau { border-color: #c4b5fd; background: #faf5ff; }
.nb-kpi-quan_trong { border-color: #fca5a5; background: #fef2f2; }
.nb-kpi-khac { border-color: #e2e8f0; }
.nb-phieu-table { font-size: 0.8125rem; width: 100%; }
.nb-phieu-table .kh-input { font-size: 0.8125rem; padding: 0.3rem 0.4rem; min-width: 0; }
.nb-phieu-table .nb-l-sp { min-width: 140px; max-width: 100%; }
.nb-phieu-stt { width: 28px; text-align: center; color: #94a3b8; font-weight: 600; }
.nb-badge-thuong { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.nb-badge-gap { background: #ffedd5; color: #c2410c; border: 1px solid #fdba74; }
.nb-badge-yeu_cau { background: #ede9fe; color: #6d28d9; border: 1px solid #c4b5fd; }
.nb-badge-quan_trong { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.nb-row.nb-row-pl-thuong { border-left: 3px solid #64748b; }
.nb-row.nb-row-pl-gap { border-left: 3px solid #ea580c; }
.nb-row.nb-row-pl-yeu_cau { border-left: 3px solid #7c3aed; }
.nb-row.nb-row-pl-quan_trong { border-left: 3px solid #dc2626; }
.nb-sheet-wrap { border: 1px solid #e2e8f0; border-radius: 8px; }
.nb-sheet { font-size: 0.8125rem; }
.nb-sheet th { background: #f1f5f9; position: sticky; top: 0; z-index: 1; }
.nb-col-dh { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-row { cursor: pointer; }
.nb-row:hover { background: #f8fafc; }
.nb-row-active { background: #ecfdf5 !important; }
.nb-giuc-list { display: flex; flex-direction: column; gap: 0.35rem; max-height: 160px; overflow-y: auto; }
.nb-giuc-item {
  display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.5rem;
  padding: 0.4rem 0.5rem; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 0.75rem; cursor: pointer;
}
.nb-giuc-item:hover { border-color: #86efac; background: #f8fcf9; }
.nb-giuc-detail { grid-column: 2; color: #64748b; font-size: 0.6875rem; }
.nb-modal-wide { max-width: 720px; width: 100%; }
.nb-form-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.nb-span-2 { grid-column: span 2; }
.nb-block-head { font-weight: 600; font-size: 0.8125rem; margin: 0.75rem 0 0.5rem; color: var(--vpg-muted, #64748b); }
.nb-don-block, .nb-yeu-block { margin-top: 0.5rem; }
.nb-inline { display: inline-flex; align-items: center; gap: 0.25rem; margin-right: 0.75rem; font-weight: normal; }
.nb-lines-table { font-size: 0.8125rem; margin: 0.5rem 0; }
.nb-lines-table .kh-input { padding: 0.25rem 0.35rem; font-size: 0.8125rem; }
.nb-textarea { min-height: 88px; resize: vertical; width: 100%; }
.nb-kpi-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 0.75rem; }
.nb-kpi { flex: 1; min-width: 88px; padding: 0.5rem 0.65rem; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; text-align: center; }
.nb-kpi b { display: block; font-size: 1.25rem; line-height: 1.2; }
.nb-kpi span { font-size: 0.6875rem; color: #64748b; }
.nb-kpi-warn b { color: #b45309; }
.nb-toolbar { flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.nb-filter-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.nb-chip { font-size: 0.75rem; padding: 0.25rem 0.55rem; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; cursor: pointer; }
.nb-chip.active { background: #166534; color: #fff; border-color: #166534; }
.nb-don-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin-bottom: 0.5rem; font-size: 0.8125rem; }
.nb-don-label { font-weight: 600; color: #64748b; }
.nb-sl-label { display: flex; align-items: center; gap: 0.35rem; }
.nb-sl-label input { width: 72px; }
.nb-kien-hint { font-size: 0.75rem; color: #64748b; }
.nb-col-dh { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* NOIBO v7 — gọn kiểu sổ nhật ký */
.nb-head-compact .kh-page-title { font-size: 1.125rem; }
.nb-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid #e5e7eb; margin: 0.25rem 0; }
.nb-tab { border: none; background: transparent; padding: 6px 14px; font-size: 0.85rem; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.nb-tab:hover { color: #111827; }
.nb-tab.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }
.nb-detail-giao { font-size: 0.72rem; color: #16a34a; margin-top: 2px; }
.nb-chk-inline { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; color: #4b5563; margin-top: 3px; cursor: pointer; }
.nb-chk-inline input { margin: 0; }
.nb-inp-disabled { background: #f3f4f6 !important; color: #9ca3af; }
.nb-overdue-block { margin-top: 0.5rem; padding: 0.5rem 0.6rem; border: 1px solid #fecaca; background: #fef2f2; border-radius: 8px; }
.nb-overdue-warn { color: #dc2626; font-weight: 600; font-size: 0.82rem; margin-bottom: 0.4rem; }
.nb-toolbar-line { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.35rem; }
.nb-srch { flex: 1; min-width: 140px; max-width: 280px; font-size: 0.8125rem; padding: 0.35rem 0.6rem; border: 1px solid #e2e8f0; border-radius: 8px; }
.nb-list-wrap { margin-top: 0.5rem; }
.nb-list { font-size: 0.8125rem; }
.nb-list th { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.03em; color: #64748b; background: #f8fafc; }
.nb-list td { padding: 0.35rem 0.5rem; vertical-align: middle; }
.nb-col-txt { width: 100%; white-space: normal; word-break: break-word; line-height: 1.4; }
.nb-num { text-align: right; font-variant-numeric: tabular-nums; width: 48px; }
.nb-act { white-space: nowrap; width: 72px; }
.nb-empty { text-align: center; color: #94a3b8; padding: 1.5rem !important; }
.nb-row-dh { background: #f0fdf4; }
.nb-row-gap { background: #fff7ed; }
.nb-row-yc { background: #fefce8; }
.nb-row-qt { background: #fef2f2; }
.nb-row-dh:hover, .nb-row-gap:hover, .nb-row-yc:hover, .nb-row-qt:hover { filter: brightness(0.98); }

/* NOIBO list — cột co giãn, kẻ ô, chi tiết theo dòng, ghi chú */
.nb-list-grid { border-collapse: collapse; table-layout: fixed; width: 100%; }
.nb-list-grid th, .nb-list-grid td { border: 1px solid #e5e7eb; }
.nb-list-grid col.nb-c-ngay { width: 76px; }
.nb-list-grid col.nb-c-ma { width: 76px; }
.nb-list-grid col.nb-c-loai { width: 88px; }
.nb-list-grid col.nb-c-khach { width: 128px; }
.nb-list-grid col.nb-c-detail { width: auto; }
.nb-list-grid col.nb-c-ghichu { width: 150px; }
.nb-list-grid col.nb-c-act { width: 74px; }
.nb-list-grid td { vertical-align: top; }
.nb-dl-item { display: flex; flex-wrap: wrap; gap: 0.2rem 0.4rem; align-items: baseline; padding: 2px 0; }
.nb-dl-item + .nb-dl-item { border-top: 1px dashed #e5e7eb; }
.nb-dl-sp { font-weight: 600; color: #1f2937; }
.nb-dl-sl { color: #2563eb; font-variant-numeric: tabular-nums; }
.nb-dl-note { color: #6b7280; font-style: italic; }
.nb-gap-flag { display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.03em; color: #c2410c; background: #ffedd5; border: 1px solid #fed7aa; border-radius: 4px; padding: 1px 6px; margin-bottom: 3px; }
.nb-detail-han { margin-top: 3px; font-size: 0.72rem; font-weight: 700; color: #b91c1c; }
.nb-col-ghichu { font-size: 0.78rem; color: #475569; white-space: normal; word-break: break-word; }
.nb-ghichu-empty { color: #cbd5e1; }

/* NOIBO toolbar — sắp xếp */
.nb-toolbar-spacer { flex: 1 1 auto; }
.nb-sort-sel { font-size: 0.8125rem; padding: 0.32rem 0.5rem; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; }
.nb-sort-dir { font-size: 0.95rem; line-height: 1; padding: 0.3rem 0.55rem; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; cursor: pointer; color: #334155; }
.nb-sort-dir:hover { background: #f1f5f9; }
.nb-sort-th { cursor: pointer; user-select: none; }
.nb-sort-th:hover { color: #0f172a; }
.nb-sort-th.is-sorted { color: #0f766e; }
.nb-sort-ic { font-size: 0.6rem; }
.nb-modal { max-width: min(900px, 94vw); width: 100%; }
.nb-modal-head { padding: 0.65rem 1.25rem; }
.nb-modal-head h3 { font-size: 0.9375rem; margin: 0; }
.nb-modal-body { padding: 0.85rem 1.25rem 0.9rem; }

/* NOIBO — lưới thông tin gọn (vị trí giao đầy hàng, Mã·Ngày·Loại·Khách cùng hàng) */
.nb-form-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem 0.75rem; margin-bottom: 0.7rem;
  padding-bottom: 0.65rem; border-bottom: 1px solid #e8ecea;
}
.nb-fg-field { display: flex; flex-direction: column; gap: 0.22rem; min-width: 0; }
.nb-fg-full { grid-column: 1 / -1; }
.nb-fg-2 { grid-column: span 2; }
.nb-fg-3 { grid-column: span 3; }
.nb-form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nb-fg-lbl { font-size: 0.7rem; font-weight: 600; color: #64748b; }
.nb-fg-field .nb-hint { margin-top: 0; }
@media (max-width: 640px) {
  .nb-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nb-fg-2, .nb-fg-3, .nb-fg-full { grid-column: 1 / -1; }
}
.nb-modal-foot { padding: 0.5rem 1rem; gap: 0.5rem; }
.nb-form-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; margin-bottom: 0.5rem; }
.nb-form-table td { padding: 0.2rem 0.35rem; vertical-align: middle; }
.nb-ft-lbl { width: 56px; color: #64748b; font-weight: 600; font-size: 0.75rem; white-space: nowrap; }
.nb-ft-block { margin: 0.35rem 0 0.2rem; }
.nb-vt-row { margin-top: 0.35rem; }
.nb-inp, .nb-sel, .nb-txt {
  width: 100%; box-sizing: border-box; font-size: 0.8125rem; font-family: inherit;
  border: 1px solid #d1d5db; border-radius: 6px; padding: 0.3rem 0.45rem;
  background: #fff; color: #1a1d1f; outline: none;
}
.nb-inp:focus, .nb-sel:focus, .nb-txt:focus { border-color: #1a7a4c; box-shadow: 0 0 0 2px #e6f4ec; }
.nb-txt { resize: vertical; min-height: 52px; }
.nb-lines { width: 100%; border-collapse: collapse; font-size: 0.8125rem; margin: 0.35rem 0 0.15rem; }
.nb-lines th { text-align: left; font-size: 0.6875rem; text-transform: uppercase; color: #64748b; padding: 0.2rem 0.35rem; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.nb-lines td { padding: 0.2rem 0.25rem; vertical-align: middle; }
.nb-w-tam, .nb-w-kien { width: 56px; text-align: center; }
.nb-lines .nb-inp { text-align: right; padding: 0.25rem 0.35rem; }
.nb-lines .nb-l-sp { min-width: 0; }
.nb-link-btn { background: none; border: none; color: #166534; font-size: 0.75rem; cursor: pointer; padding: 0.15rem 0.25rem; font-weight: 600; }
.nb-link-btn:hover { text-decoration: underline; }
.nb-del { color: #b91c1c; }
.nb-hint { display: block; font-size: 0.6875rem; color: #94a3b8; margin-top: 0.15rem; }
.nb-opt { font-weight: 400; color: #94a3b8; font-size: 0.6875rem; }
.nb-giuc-item { display: flex; align-items: flex-start; gap: 0.4rem; padding: 0.3rem 0.45rem; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 0.75rem; cursor: pointer; }
.nb-giuc-item:hover { background: #fefce8; border-color: #fde047; }

/* NOIBO v8 — vị trí trên đầu, bảng Excel, combo khách/SP */
.nb-vt-top { margin-bottom: 0.5rem; padding-bottom: 0.35rem; border-bottom: 1px solid #e8ecea; }
.nb-vt-top .nb-inp { font-size: 0.8125rem; }
.nb-modal .vpg-combo-input {
  padding: 0.3rem 28px 0.3rem 0.45rem; font-size: 0.8125rem; border-radius: 6px;
  border: 1px solid #d1d5db; width: 100%; box-sizing: border-box;
}
.nb-modal .vpg-combo-input:focus { border-color: #1a7a4c; box-shadow: 0 0 0 2px #e6f4ec; }
.nb-xls-wrap { border: 1px solid #a6a6a6; margin: 0.35rem 0 0.15rem; background: #fff; }
.nb-xls { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.8125rem; }
.nb-xls th, .nb-xls td { border: 1px solid #d0d0d0; padding: 0; vertical-align: middle; }
.nb-xls th { background: #e8e8e8; font-weight: 600; font-size: 0.6875rem; text-transform: uppercase; color: #333; padding: 4px 6px; text-align: center; }
.nb-xls tbody tr:nth-child(even) { background: #fafafa; }
.nb-xls tbody tr:hover { background: #f0f7ff; }
.nb-xls .nb-col-no { width: 28px; text-align: center; background: #f5f5f5; color: #666; font-size: 0.75rem; padding: 2px; }
.nb-xls .nb-col-sp { min-width: 0; }
.nb-xls .nb-col-qty { width: 56px; }
.nb-xls .nb-col-del { width: 26px; text-align: center; }
.nb-xls .nb-col-note { width: 30%; }
.nb-xls .nb-l-note { text-align: left; }
.nb-l-ton { font-size: 0.7rem; color: #16a34a; padding: 0 6px 3px; line-height: 1.2; }
.nb-l-ton-warn { color: #dc2626; font-weight: 600; }
.nb-xls-inp {
  border: none !important; border-radius: 0 !important; box-shadow: none !important;
  text-align: right; width: 100%; padding: 5px 6px !important; background: transparent;
}
.nb-xls-inp:focus { outline: 2px solid #217346; outline-offset: -2px; }
.nb-xls .vpg-combo { height: 100%; min-width: 0; }
.nb-xls .vpg-combo-input {
  border: none !important; border-radius: 0 !important; box-shadow: none !important;
  padding: 5px 28px 5px 6px !important; font-size: 0.8125rem; background: transparent;
}
.nb-xls .vpg-combo-input:focus { outline: 2px solid #217346; outline-offset: -2px; box-shadow: none !important; }
.nb-xls .vpg-combo-list { z-index: 80; font-size: 0.8125rem; }
.nb-xls-del { background: none; border: none; color: #888; font-size: 1rem; line-height: 1; cursor: pointer; padding: 2px 4px; }
.nb-xls-del:hover { color: #b91c1c; }
.nb-don-note { margin-top: 0.55rem; }
.nb-foot-save { justify-content: stretch; padding: 0.65rem 1rem 0.85rem; border-top: 1px solid #e8ecea; }
.nb-foot-save .btn-green { width: 100%; padding: 0.55rem 1rem; font-size: 0.9375rem; font-weight: 600; border-radius: 8px; }

.nb-modal-panel.nb-pl-khac { box-shadow: inset 4px 0 0 #64748b; }
.nb-badge-khac { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.nb-row-khac { background: #f8fafc; }

/* Giục giao — tick + tìm đơn + xem chi tiết */
.nb-giuc-check { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8125rem; font-weight: 600; margin: 0.5rem 0 0.25rem; cursor: pointer; }
.nb-giuc-picker { margin-top: 0.35rem; position: relative; }
.nb-giuc-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 70;
  max-height: 200px; overflow: auto; background: #fff; border: 1px solid #d1d5db;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.12);
}
.nb-giuc-hit {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.35rem 0.5rem; align-items: center;
  width: 100%; text-align: left; border: none; background: transparent; cursor: pointer;
  padding: 0.45rem 0.55rem; font-size: 0.75rem; border-bottom: 1px solid #f1f5f9;
}
.nb-giuc-hit:hover { background: #f0fdf4; }
.nb-giuc-hit.is-attached { opacity: 0.55; }
.nb-giuc-empty { padding: 0.65rem; font-size: 0.75rem; color: #94a3b8; }
.nb-giuc-src { font-size: 0.625rem; font-weight: 700; text-transform: uppercase; padding: 0.1rem 0.35rem; border-radius: 4px; white-space: nowrap; }
.nb-giuc-nb { background: #e0e7ff; color: #3730a3; }
.nb-giuc-sx { background: #ffedd5; color: #c2410c; }
.nb-giuc-tp { background: #dcfce7; color: #166534; }
.nb-giuc-st { font-size: 0.6875rem; color: #64748b; white-space: nowrap; }
.nb-giuc-preview {
  margin-top: 0.5rem; padding: 0.55rem 0.65rem; border: 1px solid #e2e8f0; border-radius: 8px; background: #fafafa;
}
.nb-giuc-preview-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.nb-giuc-preview-body { font-size: 0.75rem; line-height: 1.45; color: #374151; }
.nb-giuc-preview-body div { margin-bottom: 0.15rem; }
.nb-giuc-lines { margin: 0.35rem 0 0 1rem; padding: 0; font-size: 0.6875rem; color: #64748b; }
.nb-giuc-attached { margin-top: 0.45rem; }
.nb-giuc-chip {
  display: inline-flex; align-items: center; gap: 0.25rem; margin: 0.15rem 0.35rem 0.15rem 0;
  padding: 0.2rem 0.45rem; border-radius: 999px; background: #f0fdf4; border: 1px solid #bbf7d0; font-size: 0.75rem;
}
.nb-giuc-rm { background: none; border: none; color: #b91c1c; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0.15rem; }
.nb-detail-main { white-space: normal; word-break: break-word; }
.nb-detail-giuc { margin-top: 0.3rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.nb-giuc-tag { display: inline-flex; align-items: center; font-size: 0.72rem; font-weight: 700; color: #b45309; background: #fef3c7; border: 1px solid #fde68a; border-radius: 999px; padding: 0.1rem 0.45rem; }
.nb-giuc-chip-sm { margin: 0; padding: 0.1rem 0.4rem; font-size: 0.72rem; }
