body { -webkit-font-smoothing: antialiased; background: #fafbfc; color: #1f2937; }
  .scrollbar-thin::-webkit-scrollbar { width: 6px; height: 6px; }
  .scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
  .scrollbar-thin::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

  .table-row-hover:hover { background: #f8fafc; }

  /* Status badges - pastel mờ, low saturation */
  .badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
  .badge-new { background: #f0f7ff; color: #1e40af; border-color: #dbeafe; }
  .badge-aging { background: #fffbeb; color: #92400e; border-color: #fef3c7; }
  .badge-ready { background: #f0fdf4; color: #166534; border-color: #dcfce7; }
  .badge-sold { background: #f5f3ff; color: #5b21b6; border-color: #ede9fe; }
  .badge-die { background: #fef2f2; color: #991b1b; border-color: #fee2e2; }
  .badge-pending { background: #fffbeb; color: #92400e; border-color: #fef3c7; }
  .badge-approved { background: #f0fdf4; color: #166534; border-color: #dcfce7; }
  .badge-rejected { background: #fef2f2; color: #991b1b; border-color: #fee2e2; }
  .badge-exported { background: #eff6ff; color: #1e40af; border-color: #dbeafe; }
  .badge-cancelled { background: #f8fafc; color: #475569; border-color: #e2e8f0; }

  /* Nav item - flat sidebar, indicator left bar khi active */
  .nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; color: #334155; font-weight: 550; font-size: 14px; cursor: pointer; transition: all .12s; position: relative; line-height: 1.2; }
  .nav-item:hover { background: #f8fafc; color: #0f172a; }
  .nav-item.active { background: linear-gradient(90deg, #eef4ff 0%, #e9f1ff 100%); color: #1d4ed8; font-weight: 650; box-shadow: inset 0 0 0 1px #dbeafe; }
  .nav-item.active::before { content: ''; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; background: #2563eb; border-radius: 0 3px 3px 0; }
  .nav-item svg { width: 17px; height: 17px; flex-shrink: 0; color: #64748b; }
  .nav-item.active svg { color: #2563eb; }
  /* Badge số ở nav-item — vd "5 shop chưa check" trên menu Check Mail */
  .nav-item-label { flex: 1; min-width: 0; }
  .nav-item-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    background: #ef4444; color: #fff;
    border-radius: 9px; font-size: 11px; font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
  }
  .nav-item.active .nav-item-badge { background: #dc2626; }
  .nav-item-badge.muted { background: #94a3b8; }

  /* Nav group with submenu (luôn hiện) */
  .nav-group { margin-bottom: 6px; margin-top: 8px; }
  .nav-group-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 4px 10px;
    color: #475569;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .nav-group-label svg { width: 14px; height: 14px; flex-shrink: 0; color: #94a3b8; }
  .nav-group-label.has-active { color: #4338ca; }
  .nav-group-label.has-active svg { color: #4f46e5; }
  .nav-subitems { margin-left: 8px; padding-left: 12px; border-left: 1px solid #e2e8f0; }
  .nav-subitem { display: flex; align-items: center; padding: 8px 9px; margin: 2px 0; border-radius: 8px; color: #475569; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; line-height: 1.2; }
  .nav-subitem:hover { background: #f8fafc; color: #0f172a; }
  .nav-subitem.active { background: #eef2ff; color: #4338ca; font-weight: 600; border-left: 2px solid #4f46e5; margin-left: -2px; padding-left: 9px; }

  /* Stat card */
  .stat-card { background: white; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px; }
  .stat-label { font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
  .stat-value { font-size: 24px; font-weight: 700; color: #0f172a; margin-top: 3px; }

  /* Form */
  .form-label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }
  .form-input { width: 100%; padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; transition: all .12s; background: white; }
  .form-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
  .form-input:disabled { background: #f3f4f6; color: #9ca3af; }
  .form-input.input-error { border-color: #dc2626; background: #fef2f2; }
  .form-input.input-error:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.15); }

  /* Search input wrapper với nút X clear (relative parent) */
  .search-input-wrap { position: relative; display: inline-block; }
  .search-input-wrap .form-input { padding-right: 30px; }
  .search-input-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    border: none;
    padding: 0;
    transition: background .12s;
  }
  .search-input-clear:hover { background: #cbd5e1; color: #1e293b; }
  .search-input-wrap.has-text .search-input-clear { display: flex; }

  /* ============================================================
     USER MENU DROPDOWN — sidebar avatar dropdown
     ============================================================ */
  .user-menu-wrap { position: relative; }
  .user-menu-trigger {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 6px 8px;
    background: transparent; border: none; border-radius: 6px;
    cursor: pointer; transition: background .12s;
    text-align: left;
  }
  .user-menu-trigger:hover { background: #f1f5f9; }
  .user-menu-chevron {
    margin-left: auto; flex-shrink: 0;
    color: #94a3b8; font-size: 12px; line-height: 1;
    transition: transform .15s;
  }
  .user-menu-wrap.open .user-menu-chevron { transform: rotate(180deg); }
  .user-menu-dropdown {
    position: absolute;
    bottom: calc(100% + 6px); left: 8px; right: 8px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08), 0 -1px 3px rgba(15, 23, 42, 0.05);
    padding: 4px;
    z-index: 50;
    display: none;
  }
  .user-menu-wrap.open .user-menu-dropdown { display: block; }
  .user-menu-item {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 7px 10px;
    background: transparent; border: none; border-radius: 6px;
    cursor: pointer; transition: background .12s;
    font-size: 13px; color: #1e293b;
    text-align: left;
  }
  .user-menu-item:hover { background: #f1f5f9; }
  .user-menu-item.danger { color: #b91c1c; }
  .user-menu-item.danger:hover { background: #fef2f2; }
  .user-menu-divider {
    height: 1px; background: #e2e8f0;
    margin: 4px 2px;
  }

  /* ============================================================
     PRICING BROCHURE — page Bảng giá & Chính sách (chụp ảnh gửi khách)
     ============================================================ */
  .brochure-canvas {
    max-width: 720px;
    margin: 0 auto;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
  }
  .brochure-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    padding: 22px 24px;
    text-align: center;
  }
  .brochure-header .logo-circle {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700;
    margin-bottom: 10px;
  }
  .brochure-header h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0 0 4px;
  }
  .brochure-header .subtitle {
    font-size: 12px;
    opacity: 0.9;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  .brochure-section {
    padding: 18px 22px;
    border-bottom: 1px solid #e2e8f0;
  }
  .brochure-section:last-child { border-bottom: none; }
  .brochure-section-title {
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .brochure-section-title .accent-line {
    flex: 1; height: 2px;
    background: linear-gradient(90deg, #2563eb 0%, transparent 100%);
    border-radius: 2px;
  }
  .brochure-meta {
    display: flex; flex-wrap: wrap; gap: 6px 14px;
    font-size: 11px; color: #64748b;
    margin-bottom: 10px;
  }
  .brochure-meta b { color: #1e3a8a; }
  /* Bảng giá: matrix loại SP × tier tuổi */
  .pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15,23,42,0.05);
  }
  .pricing-table thead {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  }
  .pricing-table th {
    padding: 9px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #1e3a8a;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    border-bottom: 2px solid #93c5fd;
  }
  .pricing-table th:first-child { text-align: left; padding-left: 14px; }
  .pricing-table td {
    padding: 9px 8px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    font-weight: 600;
  }
  .pricing-table td:first-child {
    text-align: left;
    padding-left: 14px;
    background: #f8fafc;
    font-weight: 700;
  }
  .pricing-table tr:hover td { background: #fefce8; }
  .pricing-table .tier-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 2px;
  }
  .pricing-table .price-cell { color: #15803d; }
  .pricing-table .price-cell.featured { color: #b45309; background: #fffbeb; }
  .pricing-table .empty-cell { color: #cbd5e1; font-weight: 400; }
  .pricing-note {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    padding: 8px 12px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #78350f;
    line-height: 1.5;
  }
  .pricing-note + .pricing-note { margin-top: 6px; }
  /* Policy items numbered */
  .policy-list { counter-reset: pol-item; }
  .policy-item {
    counter-increment: pol-item;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px 10px 38px;
    margin-bottom: 8px;
    position: relative;
    font-size: 12.5px;
    line-height: 1.55;
    color: #334155;
  }
  .policy-item::before {
    content: counter(pol-item);
    position: absolute;
    left: 10px; top: 10px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #2563eb; color: white;
    font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }
  .policy-item b { color: #1e3a8a; }
  /* FAQ */
  .faq-list { display: flex; flex-direction: column; gap: 8px; }
  .faq-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
  }
  .faq-q {
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    display: flex; align-items: flex-start; gap: 8px;
    user-select: none;
  }
  .faq-q::before {
    content: 'Q.'; color: #2563eb;
    font-weight: 800; flex-shrink: 0;
  }
  .faq-a {
    padding: 0 12px 10px 32px;
    font-size: 12px;
    color: #475569;
    line-height: 1.6;
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
    display: none;
  }
  .faq-item.open .faq-a { display: block; }
  .faq-item.always-open .faq-a { display: block; }
  .brochure-footer {
    background: #f8fafc;
    padding: 14px 22px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
  }
  .brochure-footer .heart { color: #dc2626; }
  /* Toolbar trên brochure */
  .pricing-toolbar {
    max-width: 720px;
    margin: 0 auto 12px;
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: space-between; align-items: center;
  }
  .pricing-toolbar-actions { display: flex; gap: 6px; flex-wrap: wrap; }

  /* ============================================================
     DASHBOARD V2 — admin tư duy quản lý team
     ============================================================ */
  .dash-card-big {
    border-radius: 12px;
    border: 1px solid;
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
  }
  .dash-card-icon { font-size: 32px; line-height: 1; flex-shrink: 0; }
  .dash-card-content { flex: 1; min-width: 0; }
  .dash-card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .dash-card-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 2px;
  }
  .dash-card-unit { font-size: 13px; font-weight: 500; }
  .dash-card-hint { font-size: 11px; color: #64748b; margin-top: 3px; line-height: 1.4; }

  /* === Check Mail Page === */
  .cm-tabs {
    display: flex; gap: 4px; border-bottom: 1px solid #e2e8f0;
    margin-bottom: 14px;
  }
  .cm-tab {
    padding: 8px 14px; font-size: 13px; font-weight: 600;
    color: #64748b; cursor: pointer; border: none; background: transparent;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    transition: all .12s;
  }
  .cm-tab:hover { color: #475569; background: #f8fafc; }
  .cm-tab.active { color: #2563eb; border-bottom-color: #2563eb; }
  .cm-tab-count {
    display: inline-block; margin-left: 6px; padding: 1px 6px;
    background: #e2e8f0; color: #475569;
    border-radius: 9px; font-size: 11px; font-weight: 700;
  }
  .cm-tab.active .cm-tab-count { background: #dbeafe; color: #1e40af; }
  .cm-tab-count.urgent { background: #fee2e2; color: #b91c1c; }
  /* Card row */
  .cm-row {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-bottom: 1px solid #f1f5f9;
    transition: background .12s;
  }
  .cm-row:hover { background: #f8fafc; }
  .cm-row.checked {
    background: #f0fdf4; opacity: 0.7;
  }
  .cm-row.checked:hover { background: #dcfce7; opacity: 1; }
  /* Table row đã check (table layout mới) */
  tr.cm-tr-done td { background: #f0fdf4; opacity: 0.85; }
  tr.cm-tr-done:hover td { background: #dcfce7; opacity: 1; }
  /* Shop đã check trong session — gạch ngang + mờ để không click trùng */
  tr.cm-row-checked td {
    background: #f0fdf4 !important;
    text-decoration: line-through;
    color: #94a3b8 !important;
    opacity: 0.7;
  }
  tr.cm-row-checked td .cm-copy { pointer-events: none; }
  tr.cm-row-checked td .cm-day-badge { opacity: 0.5; }
  tr.cm-row-checked:hover td { opacity: 0.85; }
  /* Shop đã check ngày trước (có history) — mờ nhẹ, vẫn đọc được + click được */
  tr.cm-row-history td {
    background: #fafafa !important;
    opacity: 0.65;
  }
  tr.cm-row-history:hover td { opacity: 1; background: white !important; }
  /* Badge "đã check N lần" — nhỏ, xanh nhạt */
  .cm-check-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #86efac;
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 1.2;
    white-space: nowrap;
  }
  /* Collapsible How-to box (Check Mail) */
  .cm-howto-details {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 13px;
    color: #1e3a8a;
    max-width: 100%;
  }
  .cm-howto-summary {
    cursor: pointer;
    user-select: none;
    padding: 6px 12px;
    font-weight: 600;
    list-style: none;
    transition: background .15s;
    border-radius: 6px;
  }
  .cm-howto-summary::-webkit-details-marker { display: none; }
  .cm-howto-summary:hover { background: #dbeafe; }
  .cm-howto-details[open] .cm-howto-summary {
    border-bottom: 1px solid #bfdbfe;
    border-radius: 6px 6px 0 0;
  }
  .cm-howto-summary::after {
    content: ' ▼';
    font-size: 10px;
    color: #64748b;
  }
  .cm-howto-details[open] .cm-howto-summary::after {
    content: ' ▲';
  }
  .cm-howto-content {
    padding: 10px 14px;
    line-height: 1.5;
  }
  /* Click-to-copy email + inbox */
  .cm-copy {
    cursor: copy;
    border-radius: 3px;
    padding: 0 2px;
    transition: background .12s;
    display: inline-block;
  }
  .cm-copy:hover {
    background: #dbeafe;
    color: #1e40af !important;
  }
  .cm-copy:active { background: #93c5fd; }
  .cm-row-info { flex: 1; min-width: 0; }
  .cm-row-email {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px; font-weight: 600; color: #1e293b;
  }
  .cm-row-meta {
    font-size: 11px; color: #64748b; margin-top: 2px;
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  }
  .cm-row-meta span { white-space: nowrap; }
  .cm-day-badge {
    display: inline-block; padding: 2px 7px; border-radius: 9px;
    font-size: 11px; font-weight: 700;
  }
  .cm-day-1 { background: #fee2e2; color: #b91c1c; }      /* sắp hết, 1 ngày */
  .cm-day-2 { background: #ffedd5; color: #c2410c; }      /* 2 ngày */
  .cm-day-3 { background: #fef3c7; color: #a16207; }      /* 3 ngày */
  .cm-day-4 { background: #ecfccb; color: #4d7c0f; }      /* 4 ngày */
  .cm-day-5 { background: #d1fae5; color: #047857; }      /* 5 ngày, mới reg */
  .cm-day-done { background: #e2e8f0; color: #475569; }
  /* Pipeline NGÂM */
  .dash-pipeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
  }
  @media (max-width: 900px) {
    .dash-pipeline { grid-template-columns: repeat(3, 1fr); }
  }
  @media (max-width: 700px) {
    .dash-pipeline { grid-template-columns: repeat(2, 1fr); }
    .dash-pipe-step { border-bottom: 1px solid #e2e8f0; }
  }
  .dash-pipe-step {
    padding: 12px 10px;
    border-right: 1px solid #e2e8f0;
    text-align: center;
    position: relative;
    transition: background .12s;
  }
  .dash-pipe-step:last-child { border-right: none; }
  .dash-pipe-step:hover { background: #f8fafc; }
  .dash-pipe-icon { font-size: 20px; line-height: 1; }
  .dash-pipe-num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 4px;
  }
  .dash-pipe-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-top: 2px;
  }
  .dash-pipe-hint {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 1px;
  }
  .pipe-danger .dash-pipe-num   { color: #dc2626; }
  .pipe-warn .dash-pipe-num     { color: #d97706; }
  .pipe-neutral .dash-pipe-num  { color: #64748b; }
  .pipe-ready-mid .dash-pipe-num  { color: #ca8a04; }
  .pipe-ready-mid { background: #fefce8; }
  .pipe-ready-mid:hover { background: #fef9c3; }
  .pipe-ready .dash-pipe-num    { color: #059669; }
  .pipe-ready { background: #f0fdf4; }
  .pipe-ready:hover { background: #dcfce7; }
  .pipe-delivered .dash-pipe-num { color: #2563eb; }

  /* Bar stack live/sold/die */
  .dash-bar-stack {
    display: flex;
    height: 28px;
    border-radius: 6px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
  }
  .dash-bar-seg {
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .12s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    min-width: 4px;
  }
  .dash-bar-seg:hover { filter: brightness(1.1); }
  .legend-square {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
  }


  /* Button - Atlassian style flat */
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .12s; border: 1px solid transparent; }
  .btn-primary { background: #2563eb; color: white; }
  .btn-primary:hover { background: #1d4ed8; }
  .btn-primary:disabled { background: #cbd5e1; color: #f1f5f9; cursor: not-allowed; }
  .btn-secondary { background: white; color: #374151; border-color: #d1d5db; }
  .btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; }
  .btn-danger { background: #dc2626; color: white; }
  .btn-danger:hover { background: #b91c1c; }
  .btn-success { background: #16a34a; color: white; }
  .btn-success:hover { background: #15803d; }
  .btn-sm { padding: 4px 10px; font-size: 12px; }
  .btn-xs { padding: 2px 7px; font-size: 11px; border-radius: 4px; }

  /* Modal */
  .modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(2px); }
  .modal-content { background: white; border-radius: 8px; max-width: min(96vw, 1400px); width: auto; max-height: 92vh; overflow: auto; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.05); }

  /* Table */
  .data-table { width: 100%; border-collapse: collapse; }
  .data-table th { background: #f9fafb; padding: 7px 10px; text-align: left; font-size: 10px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
  .data-table td { padding: 7px 10px; font-size: 13px; color: #374151; border-bottom: 1px solid #f3f4f6; }
  .data-table tr:hover td { background: #fafbfc; }

  .mono { font-family: 'SF Mono', Monaco, monospace; font-size: 13px; }

  /* ============ EXCEL-STYLE TABLE (Inventory Admin) ============ */
  .excel-table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 220px);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    position: relative;
    background: white;
  }
  .excel-table {
    border-collapse: separate;
    border-spacing: 0;
    width: max-content;
    min-width: 100%;
    font-size: 13px;
  }
  .excel-table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #cbd5e1;
    z-index: 10;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }
  .excel-table tbody td {
    padding: 8px 12px;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    background: white;
    white-space: nowrap;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
  }
  .excel-table tbody tr:hover td { background: #f8fafc; }
  /* Bỏ zebra để bảng sạch */

  /* Sticky columns - cùng tone xám nhạt */
  .excel-table .sticky-col-checkbox {
    position: sticky;
    left: 0;
    z-index: 6;
    background: white !important;
    border-right: 1px solid #e2e8f0;
    min-width: 40px;
    width: 40px;
    text-align: center;
    padding: 6px 8px;
  }
  .excel-table .sticky-col-1 {
    position: sticky;
    left: 40px;
    z-index: 5;
    background: white !important;
    border-right: 1px solid #e2e8f0;
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    color: #64748b;
    font-weight: 500;
    text-align: center;
  }
  .excel-table .sticky-col-2 {
    position: sticky;
    left: 100px;
    z-index: 5;
    background: white !important;
    border-right: 2px solid #e2e8f0;
    box-shadow: 2px 0 4px -2px rgba(0,0,0,0.04);
    min-width: 220px;
  }
  .excel-table tbody tr:hover .sticky-col-checkbox,
  .excel-table tbody tr:hover .sticky-col-1,
  .excel-table tbody tr:hover .sticky-col-2 { background: #f8fafc !important; }

  /* Row selected style */
  .excel-table tbody tr.row-selected td { background: #eef2ff !important; }
  .excel-table tbody tr.row-selected:hover td { background: #e0e7ff !important; }
  .excel-table tbody tr.row-selected .sticky-col-checkbox,
  .excel-table tbody tr.row-selected .sticky-col-1,
  .excel-table tbody tr.row-selected .sticky-col-2 { background: #eef2ff !important; }

  .row-checkbox, #selectAllRows {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4f46e5;
  }

  /* Header sticky giữ background sáng */
  .excel-table thead .sticky-col-checkbox,
  .excel-table thead .sticky-col-1,
  .excel-table thead .sticky-col-2,
  .excel-table thead .sticky-col-actions {
    z-index: 15;
    background: #f8fafc !important;
    color: #475569;
  }
  .excel-table .sticky-col-actions {
    position: sticky;
    right: 0;
    z-index: 5;
    background: white !important;
    border-left: 2px solid #e2e8f0;
    box-shadow: -2px 0 4px -2px rgba(0,0,0,0.04);
    min-width: 90px;
    padding: 4px 6px;
    text-align: center;
    white-space: nowrap;
  }
  .excel-table tbody tr:hover .sticky-col-actions { background: #f8fafc !important; }
  .excel-table tbody tr.row-selected .sticky-col-actions { background: #eef2ff !important; }

  /* Icon button - nút hành động gọn chỉ icon */
  .icon-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all .15s;
    margin: 0 1px;
  }
  .icon-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
  .icon-btn-view:hover { border-color: #4f46e5; background: #eef2ff; }
  .icon-btn-delete { color: #b91c1c; }
  .icon-btn-delete:hover { border-color: #dc2626; background: #fef2f2; color: #991b1b; }

  /* Status dropdown trong bảng - pastel mờ */
  .status-select {
    padding: 3px 6px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: white;
    min-width: 100px;
  }
  .status-select:hover { border-color: #2563eb; }
  .status-select option { padding: 4px; }
  .status-select[data-status="New"]      { background: #f0f7ff; color: #1e40af; border-color: #dbeafe; }
  .status-select[data-status="Live"]     { background: #f0fdf4; color: #166534; border-color: #dcfce7; }
  .status-select[data-status="Sold"]     { background: #faf5ff; color: #6b21a8; border-color: #e9d5ff; }
  .status-select[data-status="Die đỏ"]   { background: #fef2f2; color: #991b1b; border-color: #fee2e2; }
  .status-select[data-status="Die IVR"]  { background: #fffbeb; color: #92400e; border-color: #fef3c7; }
  .status-select[data-status="Die AVR"]  { background: #fff7ed; color: #9a3412; border-color: #ffedd5; }
  .status-select[data-status="Khác"]     { background: #f9fafb; color: #4b5563; border-color: #e5e7eb; }

  /* Price tier badge (Tag Live) - pastel mờ */
  .price-tier {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: help;
    white-space: nowrap;
    border: 1px solid transparent;
  }
  .price-tier-too-new { background: #f9fafb; color: #9ca3af; border-color: #e5e7eb; border-style: dashed; }
  .price-tier-t1 { background: #fef2f2; color: #b91c1c; border-color: #fee2e2; }
  .price-tier-t2 { background: #fff7ed; color: #c2410c; border-color: #ffedd5; }
  .price-tier-t3 { background: #fffbeb; color: #a16207; border-color: #fef3c7; }
  .price-tier-t4 { background: #f0fdf4; color: #15803d; border-color: #dcfce7; }
  .price-tier-t5 { background: #fffbeb; color: #78350f; border-color: #fde68a; font-weight: 700; }

  /* Sold tag (Tag Sold pill) - pastel mờ */
  .sold-tag-1 { background: #f0f9ff; color: #075985; border: 1px solid #bae6fd; }
  .sold-tag-2 { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
  .sold-tag-3 { background: #faf5ff; color: #6b21a8; border: 1px solid #e9d5ff; }
  .sold-tag-4 { background: #f5f3ff; color: #5b21b6; border: 1px solid #ddd6fe; font-weight: 700; }

  /* Tag Sold dropdown inline trong bảng */
  .tag-sold-select {
    padding: 3px 6px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    background: white;
    color: #9ca3af;
    min-width: 100px;
  }
  .tag-sold-select:hover { border-color: #2563eb; }

  /* Kanban board cho trang Đơn hàng */
  .kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }
  @media (max-width: 1024px) {
    .kanban-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 640px) {
    .kanban-board { grid-template-columns: 1fr; }
  }
  .kanban-column {
    border-radius: 8px;
    overflow: hidden;
    min-height: 200px;
  }
  .kanban-col-header {
    padding: 8px 10px;
    font-weight: 700;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
  }
  .kanban-col-count {
    background: rgba(255,255,255,0.6);
    color: inherit;
    padding: 0px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
  }
  .kanban-col-subtotal {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(0,0,0,0.04);
    color: inherit;
    padding: 0px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    opacity: 0.92;
  }
  .kanban-col-body {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
  }
  .kanban-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.12s;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .kanban-card:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37,99,235,0.10);
  }
  .kanban-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
  }
  .kanban-card-oid {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 4px 2px 7px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    letter-spacing: 0.3px;
    transition: all .12s;
    cursor: default;
  }
  .kanban-card-oid:hover {
    background: #e0e7ff;
    border-color: #c7d2fe;
    color: #4338ca;
  }
  .kanban-card-oid-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    font-size: 11px;
    transition: all .12s;
  }
  .kanban-card-oid-copy:hover {
    background: #c7d2fe;
    color: #1e40af;
  }
  .kanban-card-oid-copy.copied {
    color: #16a34a;
  }
  /* Cùng style dùng cho List view và Popup detail */
  .order-id-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    background: #f1f5f9;
    padding: 3px 5px 3px 9px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    letter-spacing: 0.3px;
    transition: all .12s;
  }
  .order-id-chip:hover { background: #e0e7ff; border-color: #c7d2fe; color: #4338ca; }
  .order-id-chip-copy {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 4px;
    background: transparent; border: none; color: #94a3b8;
    cursor: pointer; padding: 0; font-size: 12px; transition: all .12s;
  }
  .order-id-chip-copy:hover { background: #c7d2fe; color: #1e40af; }
  .order-id-chip-copy.copied { color: #16a34a; }
  .kanban-card-date {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 8px;
    white-space: nowrap;
  }
  .kanban-card-date svg {
    width: 10px;
    height: 10px;
    stroke: #64748b;
  }
  .kanban-card-customer {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    word-break: break-word;
  }
  .kanban-card-ctv {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 5px;
    width: fit-content;
    max-width: 100%;
  }
  .kanban-card-ctv-avatar {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    font-size: 8px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .kanban-card-ctv-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .kanban-card-amount {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
  }
  .kanban-card-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 1px 0;
  }
  .kanban-card-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
  }

  /* Discount badge — hiển thị % giảm hoặc % tăng giá */
  .discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    line-height: 1.4;
    white-space: nowrap;
  }
  .discount-badge.sale {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
  }
  .discount-badge.markup {
    background: #fff7ed;
    color: #b45309;
    border: 1px solid #fed7aa;
  }
  /* Compact version cho kanban card */
  .discount-badge.compact {
    font-size: 10px;
    padding: 1px 5px;
  }

  /* Contact chip — hiển thị các kênh liên lạc của user */
  .contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0px 5px;
    border-radius: 4px;
    line-height: 1.6;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Stock badge — dự báo tồn kho khi tạo đơn */
  .stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    line-height: 1.4;
    white-space: nowrap;
  }
  .stock-badge.ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
  }
  .stock-badge.short {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
  }
  .stock-badge.empty {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
  }
  .stock-badge.loading {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
  }
  .stock-summary-ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
  }
  .stock-summary-warn {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 600;
  }

  /* Deadline badge trên Kanban card */
  .deadline-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
  }
  .deadline-badge.normal {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
  }
  .deadline-badge.urgent {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
  }
  .deadline-badge.overdue {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
  }
  /* Compact variant — gộp cùng dòng với date pill trên kanban card */
  .deadline-badge.compact {
    font-size: 9px;
    padding: 1px 4px;
    gap: 2px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  /* Export preset cards - 2 button to thay cho tick từng cột */
  .export-preset-card {
    display: block;
    width: 100%;
    text-align: left;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.12s;
    cursor: pointer;
  }
  .export-preset-card:not(.cursor-not-allowed):hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
  }
  .export-preset-card.export-customer:hover { border-color: #16a34a; }
  .export-preset-card.export-internal:hover { border-color: #2563eb; }
  /* Metric cell click-to-edit (Listing_Limit, Penalty_Points) */
  .metric-cell {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    min-width: 32px;
    text-align: center;
    transition: background 0.12s;
  }
  .metric-cell:hover {
    background: #eff6ff;
    color: #1d4ed8 !important;
  }
  /* Tag Sold - pastel mờ */
  .tag-sold-select.sold-tag-1 { background: #f0f9ff; color: #075985; border-color: #bae6fd; }
  .tag-sold-select.sold-tag-2 { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
  .tag-sold-select.sold-tag-3 { background: #faf5ff; color: #6b21a8; border-color: #e9d5ff; }
  .tag-sold-select.sold-tag-4 { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; font-weight: 700; }

  /* ============ ADDSHOP TABS ============ */
  .addshop-tab {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: -1px;
  }
  .addshop-tab:hover {
    color: #334155;
    background: #f8fafc;
  }
  .addshop-tab-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: #eff6ff;
  }
  .tab-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    background: #e5e7eb;
    color: #4b5563;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
  }
  .addshop-tab-active .tab-count {
    background: #2563eb;
    color: white;
  }
  .btn-cyan {
    background: #06b6d4;
    color: white;
  }
  .btn-cyan:hover {
    background: #0891b2;
  }

  /* ============ PASTE-FILL ANIMATION ============ */
  @keyframes flashFill {
    0% { background: #fef3c7; box-shadow: 0 0 0 3px rgba(251,191,36,0.4); }
    100% { background: white; box-shadow: 0 0 0 0 transparent; }
  }
  .paste-filled {
    animation: flashFill 1.5s ease-out;
  }

  /* ============ NGAM ROW STYLES (giảm rối, tập trung vào Days_Left) ============ */
  /* Migrated/Die: làm mờ cả row */
  .excel-table tbody tr.ngam-row-migrated td { background: #f8fafc !important; color: #94a3b8 !important; }
  .excel-table tbody tr.ngam-row-migrated:hover td { background: #f1f5f9 !important; }
  .excel-table tbody tr.ngam-row-die td { background: #fafafa !important; color: #a3a3a3 !important; text-decoration: line-through; }
  .excel-table tbody tr.ngam-row-die:hover td { background: #f5f5f5 !important; }

  /* Cell Days_Left badges */
  .day-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    min-width: 70px;
    text-align: center;
  }
  .day-badge.danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
  .day-badge.warn { background: #ffedd5; color: #c2410c; border: 1px solid #fdba74; }
  .day-badge.soon { background: #fef3c7; color: #a16207; border: 1px solid #fde047; }
  .day-badge.ok { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }

  /* Cell Status badges (gọn) - pastel mờ */
  .status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
  }
  .status-pill.new { background: #eff6ff; color: #1d4ed8; border-color: #dbeafe; }
  .status-pill.ready { background: #f0fdf4; color: #166534; border-color: #dcfce7; }
  .status-pill.migrated { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
  .status-pill.die { background: #fef2f2; color: #991b1b; border-color: #fee2e2; }

  /* Cột check shop/tiktok - icon nhẹ */
  .check-yes { color: #16a34a; font-size: 16px; }
  .check-no { color: #d1d5db; font-size: 14px; }

  /* Action buttons - rõ ràng hơn */
  .action-btn-group { display: inline-flex; gap: 4px; }
  .action-btn {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .15s;
    white-space: nowrap;
  }
  .action-btn-assign { background: #4f46e5; color: white; }
  .action-btn-assign:hover { background: #4338ca; }
  .action-btn-detail { background: white; color: #475569; border-color: #cbd5e1; }
  .action-btn-detail:hover { background: #f1f5f9; }
  .action-btn-migrate { background: #10b981; color: white; }
  .action-btn-migrate:hover { background: #059669; }
  .action-btn-danger { background: white; color: #b91c1c; border-color: #fecaca; }
  .action-btn-danger:hover { background: #fee2e2; }
  .action-btn:disabled { opacity: 0.4; cursor: not-allowed; }

  /* Header tooltip indicator */
  .excel-table thead th.col-tooltip {
    cursor: help;
    text-decoration: underline dotted #cbd5e1;
    text-underline-offset: 3px;
  }

  /* Cell duplicate warning - Email/Proxy trùng dòng khác */
  .cell-dup {
    background: #fef2f2;
    color: #b91c1c !important;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid #fecaca;
    cursor: help;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .cell-dup .dup-mark {
    color: #dc2626;
    font-weight: bold;
  }

  /* Dropdown NV Reg Ngâm inline cho Admin */
  .nv-reg-select {
    background: #fafafa;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 11px;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    max-width: 130px;
  }
  .nv-reg-select:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
  }
  .nv-reg-select:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
  }

  /* Shop_Type chip selector cho form Thêm shop */
  .shop-type-chip {
    flex: 1 1 200px;
    min-width: 180px;
    padding: 12px 16px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    background: white;
    color: #475569;
    cursor: pointer;
    transition: all .15s;
    text-align: left;
  }
  .shop-type-chip:hover {
    border-color: var(--chip-color, #6366f1);
    background: var(--chip-bg, #f8fafc);
    color: var(--chip-color, #475569);
  }
  .shop-type-chip.selected {
    border-style: solid;
    border-color: var(--chip-color);
    background: var(--chip-bg);
    color: var(--chip-color);
    box-shadow: 0 0 0 3px var(--chip-border);
    transform: translateY(-1px);
  }
  .shop-type-chip:disabled, .shop-type-chip.disabled {
    opacity: 0.35; cursor: not-allowed;
    background: #f1f5f9; border-style: dashed; border-color: #e2e8f0;
  }
  .shop-type-chip:disabled:hover, .shop-type-chip.disabled:hover {
    border-color: #e2e8f0; background: #f1f5f9; color: #475569;
    transform: none;
  }

  /* Contact type tabs (trong form Tạo đơn) */
  .contact-tab {
    padding: 4px 10px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #64748b;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
  }
  .contact-tab:hover { border-color: #2563eb; color: #1d4ed8; }
  .contact-tab.active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
    font-weight: 600;
  }

  /* Product chip cho trang thêm shop / import (Bước 1) */
  .product-chip {
    flex: 1 1 180px;
    min-width: 160px;
    padding: 10px 14px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: white;
    color: #334155;
    cursor: pointer;
    transition: all .12s;
    text-align: left;
  }
  .product-chip:hover {
    border-color: #2563eb;
    background: #eff6ff;
  }
  .product-chip.selected {
    border-style: solid;
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 0 0 3px #dbeafe;
  }

  /* KPI inline - thống kê nhỏ ở header trang */
  .kpi-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    cursor: help;
    white-space: nowrap;
  }
  .kpi-inline b {
    font-weight: 700;
    font-size: 12px;
    margin-left: 1px;
  }
  .kpi-inline .kpi-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    display: inline-block;
  }
  .kpi-danger .kpi-dot { background: #dc2626; }
  .kpi-danger b      { color: #b91c1c; }
  .kpi-warn .kpi-dot { background: #ea580c; }
  .kpi-warn b        { color: #c2410c; }
  .kpi-soon .kpi-dot { background: #ca8a04; }
  .kpi-soon b        { color: #a16207; }
  .kpi-ok .kpi-dot   { background: #16a34a; }
  .kpi-ok b          { color: #15803d; }
  .kpi-info .kpi-dot { background: #2563eb; }
  .kpi-info b        { color: #1d4ed8; }
  .kpi-divider {
    width: 1px;
    height: 14px;
    background: #cbd5e1;
    margin: 0 3px;
  }

  /* Multi-select chip cho filter Hạn OTP */
  .han-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 11px;
    color: #475569;
    cursor: pointer;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    user-select: none;
  }
  .han-chip:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
  }
  .han-chip input {
    width: 12px;
    height: 12px;
    accent-color: #2563eb;
    margin: 0;
    cursor: pointer;
  }
  .han-chip:has(input:checked) {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
    font-weight: 600;
  }

  /* Stats widget mini - các ô số thống kê (read-only) cho trang NGÂM */
  .stat-mini {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .stat-mini .stat-num {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
  }
  .stat-mini .stat-label {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
  }
  .stat-mini .stat-sub {
    font-size: 10px;
    color: #94a3b8;
  }
  .stat-mini.stat-danger { border-color: #fca5a5; }
  .stat-mini.stat-danger .stat-num { color: #b91c1c; }
  .stat-mini.stat-warn { border-color: #fdba74; }
  .stat-mini.stat-warn .stat-num { color: #c2410c; }
  .stat-mini.stat-soon { border-color: #fde047; }
  .stat-mini.stat-soon .stat-num { color: #a16207; }
  .stat-mini.stat-ok { border-color: #86efac; }
  .stat-mini.stat-ok .stat-num { color: #15803d; }
  .stat-mini.stat-info { border-color: #93c5fd; }
  .stat-mini.stat-info .stat-num { color: #1d4ed8; }
  .stat-mini.stat-info-dark { border-color: #c4b5fd; }
  .stat-mini.stat-info-dark .stat-num { color: #6d28d9; }

  /* Tab style mới — underline đơn giản */
  .ngam-tab {
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .ngam-tab:hover { color: #0f172a; }
  .ngam-tab.active { color: #4f46e5; border-bottom-color: #4f46e5; font-weight: 600; }
  .ngam-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
  }
  .ngam-tab.active .ngam-tab-count { background: #4f46e5; color: white; }
