/* =============================================================================
 * biz-theme.css — Giao diện Module Kinh Doanh (VIZIO Biz).
 * ========================================================================== */

.biz-shell {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  gap: 12px;
}

.biz-subnav-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow-x: auto;
  flex-shrink: 0;
}

.biz-page-content {
  flex: 1;
  min-height: 0;
}

.biz-view-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px 32px 2px;
}

/* Quick action button next to field labels (NCC, Danh mục, etc.) */
.biz-quick-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1d4ed8;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 16px;
}
.biz-quick-add-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}
.biz-quick-add-btn.active {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}
.biz-quick-add-btn .ph {
  font-size: 12px;
  font-weight: 700;
}

/* Reset for general .btn-link across biz module */
.btn-link,
button.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #2563eb;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}
.btn-link:hover,
button.btn-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.biz-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.biz-subnav-btn .ph {
  font-size: 16px;
  color: #94a3b8;
}
.biz-subnav-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}
.biz-subnav-btn:hover .ph {
  color: #475569;
}
.biz-subnav-btn.active {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
  border-color: #e2e8f0;
}
.biz-subnav-btn.active .ph {
  color: #2563eb;
}

/* 3 Stock indicator badges */
.stock-badge-group {
  display: inline-flex;
  align-items: center;
  background: #f4f6f8;
  border-radius: 6px;
  padding: 2px 4px;
  gap: 6px;
  font-size: 12px;
  line-height: 18px;
}
.stock-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.stock-val-phy {
  font-weight: 600;
  color: #344054;
}
.stock-val-hold {
  font-weight: 600;
  color: #d46b08;
}
.stock-val-avail {
  font-weight: 700;
  color: #0bcb6b;
}
.stock-val-avail.low {
  color: #fa8c16;
}
.stock-val-avail.zero {
  color: #f5222d;
}

/* POS Screen */
.pos-layout {
  display: flex;
  gap: 16px;
  min-height: calc(100vh - 110px);
  align-items: stretch;
}
.pos-catalog {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--fx-card-shadow);
  min-width: 0;
  overflow: hidden;
}
.pos-cart-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--fx-card-shadow);
  min-width: 360px;
  max-width: 480px;
  overflow-y: auto;
  min-height: 0;
}
.pos-prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-auto-rows: 155px;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
  margin-top: 10px;
}
.pos-prod-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.15s ease;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.pos-prod-card:hover {
  border-color: #0284c7;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
  transform: translateY(-2px);
}
.pos-prod-card:active {
  transform: scale(0.97);
}

/* Trạng thái sản phẩm ĐÃ ĐƯỢC CHỌN trong giỏ hàng */
.pos-prod-card.in-cart {
  border-color: #0284c7;
  border-width: 1.5px;
  background: #f0f9ff;
  box-shadow: 0 0 0 1.5px #0284c7, 0 4px 12px rgba(2, 132, 199, 0.12);
}
.pos-prod-card.in-cart:hover {
  border-color: #0369a1;
  box-shadow: 0 0 0 2px #0284c7, 0 6px 16px rgba(2, 132, 199, 0.18);
}

/* Badge nổi góc trên phải báo đã chọn */
.pos-card-cart-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #0284c7;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 5px rgba(2, 132, 199, 0.35);
  animation: posBadgePop 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 3;
  user-select: none;
}
@keyframes posBadgePop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.pos-prod-thumb.thumb-in-cart {
  border: 1.5px solid #93c5fd;
}

/* Mini stepper trên footer thẻ sản phẩm */
.pos-card-stepper {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #0284c7;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.2);
  height: 24px;
}
.pos-card-step-btn {
  width: 22px;
  height: 22px;
  border: none;
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}
.pos-card-step-btn:hover {
  background: #0284c7;
  color: #ffffff;
}
.pos-card-step-val {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #0369a1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Nút icon thêm nhanh khi chưa chọn */
.pos-card-add-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.15s ease;
}
.pos-prod-card:hover .pos-card-add-icon {
  background: #0284c7;
  color: #ffffff;
  transform: scale(1.08);
}

.pos-prod-thumb {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.pos-prod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pos-prod-thumb .ph {
  font-size: 20px;
  color: #64748b;
}
.pos-prod-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 17px;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pos-prod-sku {
  font-size: 11px;
  color: #64748b;
  font-family: monospace;
}
.pos-prod-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}
.pos-prod-price {
  font-weight: 700;
  color: #0284c7;
  font-size: 13.5px;
}
.pos-cart-del {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.pos-cart-del:hover {
  background: #fee2e2;
  color: #ef4444;
}
.pos-fast-cash {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.pos-fast-btn {
  flex: 1;
  min-width: 60px;
  padding: 4px 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.pos-fast-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #0284c7;
}
.pos-cart-list {
  flex: 1 1 auto;
  min-height: 180px;
  max-height: 380px;
  overflow-y: auto;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 6px 0;
  margin: 6px 0;
}
.pos-cart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px dashed #f0f2f5;
}
.pos-cart-info {
  flex: 1;
  min-width: 0;
}
.pos-cart-title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pos-cart-price {
  font-size: 12px;
  color: var(--text-sub);
}
.pos-qty-ctrl {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}
.pos-qty-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
}
.pos-qty-btn:hover {
  background: var(--border-light);
}
.pos-qty-val {
  width: 32px;
  height: 26px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 600;
  outline: none;
}
.pos-calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-sub);
}
.pos-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
}
.pos-total-val {
  color: var(--primary);
  font-size: 18px;
}

/* POS Modern Checkout Summary & Composite Controls */
.pos-summary-card {
  margin-top: auto;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.pos-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #475569;
  min-height: 25px;
}

.pos-summary-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  color: #0f172a;
  font-size: 13.5px;
}

/* Composite Input Group (Input + Unit Toggle / Addon) */
.pos-input-composite {
  display: inline-flex;
  align-items: stretch;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pos-input-composite:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.pos-input-composite input {
  border: none;
  outline: none;
  background: transparent;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-align: right;
  width: 76px;
  color: #0f172a;
  -moz-appearance: textfield;
}

.pos-input-composite input::-webkit-outer-spin-button,
.pos-input-composite input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Unit toggle segmented buttons */
.pos-unit-switch {
  display: flex;
  background: #f1f5f9;
  border-left: 1px solid #e2e8f0;
  padding: 2px;
  gap: 1px;
}

.pos-unit-btn {
  border: none;
  background: transparent;
  padding: 0 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
  line-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pos-unit-btn:hover {
  color: #0f172a;
}

.pos-unit-btn.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pos-unit-addon {
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: #f8fafc;
  border-left: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  user-select: none;
}

/* Discount preview tag */
.pos-discount-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #ef4444;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Total highlight banner */
.pos-total-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: 8px;
  margin: 4px 0;
}

.pos-total-banner-label {
  font-size: 13px;
  font-weight: 700;
  color: #0369a1;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.pos-total-banner-val {
  font-size: 20px;
  font-weight: 800;
  color: #0284c7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Payment method tabs */
.pos-pay-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 2px;
}

.pos-pay-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pos-pay-tab:hover {
  background: #f8fafc;
  color: #0f172a;
}

.pos-pay-tab.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

/* Change money banner */
.pos-change-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  font-size: 12px;
  color: #15803d;
  margin-top: 4px;
}

.pos-change-val {
  font-size: 14px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* CrmPanel POS widget */
.crm-pos-box {
  background: #f8fafd;
  border: 1px solid #ddecfe;
  border-radius: 10px;
  padding: 10px;
  margin-top: 12px;
}
.crm-ai-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.15s;
}
.crm-ai-btn:hover {
  opacity: 0.92;
}

/* SVG Chart */
.biz-chart-bar {
  transition: height 0.3s ease, y 0.3s ease;
}
.biz-chart-bar:hover {
  fill: #3385ff !important;
}

/* Movement type badges */
.mvt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
}
.mvt-import { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.mvt-export { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; }
.mvt-adjust { background: #fffbe6; color: #d48806; border: 1px solid #ffe58f; }
.mvt-order_hold { background: #fff7e6; color: #d46b08; border: 1px solid #ffd591; }
.mvt-order_deduct { background: #f0f5ff; color: #1d39c4; border: 1px solid #adc6ff; }
.mvt-order_release { background: #f9f0ff; color: #531dab; border: 1px solid #d3adf7; }
.mvt-order_return { background: #e6fffb; color: #08979c; border: 1px solid #87e8de; }

/* =============================================================================
 * VIZIO CRM ENTERPRISE STYLES
 * ========================================================================== */

.crm-tabs-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid #eaecf0;
  margin-top: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
}
.crm-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.crm-tab-item:hover {
  color: #0f172a;
  background: transparent;
}
.crm-tab-item.active {
  color: #0068ff;
  font-weight: 600;
  background: transparent;
  border-color: transparent;
  border-bottom-color: #0068ff;
}
.crm-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #64748b;
  transition: all 0.15s ease;
}
.crm-tab-item.active .crm-tab-badge {
  background: #eff6ff;
  color: #0068ff;
}

/* Source filters pills */
.crm-source-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  overflow-x: auto;
}
.crm-source-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.crm-source-btn:hover {
  color: #0f172a;
  background: #edf2f7;
}
.crm-source-btn.active {
  background: #fff;
  color: #0284c7;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Badges */
.crm-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 3px 9px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.crm-badge-chat {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
}
.crm-badge-excel {
  background: #f3e8ff !important;
  color: #7e22ce !important;
  border: 1px solid #e9d5ff !important;
}
.crm-badge-manual {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
}
.crm-badge-hot {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
}
.crm-badge-warm {
  background: #fffbeb !important;
  color: #d97706 !important;
  border: 1px solid #fde68a !important;
}
.crm-badge-cold {
  background: #f0fdf4 !important;
  color: #16a34a !important;
  border: 1px solid #bbf7d0 !important;
}
.crm-badge-dnc {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
  border: 1px solid #e5e7eb !important;
}

/* CRM Table & Actions */
.crm-table {
  width: 100% !important;
  border-collapse: collapse !important;
}
.crm-table th {
  padding: 11px 14px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #475467 !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #eaecf0 !important;
  text-align: left !important;
  white-space: nowrap !important;
}
.crm-table td {
  padding: 12px 14px !important;
  font-size: 13px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
}
.crm-table tbody tr {
  transition: background 0.12s ease !important;
}
.crm-table tbody tr:hover {
  background: #f8fafc !important;
}
.crm-actions-cell {
  text-align: right !important;
  white-space: nowrap !important;
  width: 190px !important;
}
.crm-actions-group {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  white-space: nowrap !important;
}
.crm-actions-group .btn-sm {
  height: 30px !important;
  padding: 0 9px !important;
  font-size: 12.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
}
.crm-code-badge {
  font-size: 11px !important;
  font-weight: 700 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important;
  color: #0284c7 !important;
  background: #f0f9ff !important;
  border: 1px solid #bae6fd !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  line-height: 1 !important;
  display: inline-block !important;
}

/* Sales Workspace Drawer / Modal (3 Columns) */
.crm-ws-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  animation: fadeIn 0.15s ease;
}
.crm-ws-card {
  width: 95vw;
  max-width: 1380px;
  background: #f8fafc;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,0.15);
  overflow: hidden;
}
.crm-ws-head {
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.crm-ws-body {
  flex: 1;
  display: grid;
  grid-template-columns: 360px 1fr 380px;
  gap: 16px;
  padding: 16px;
  overflow: hidden;
  min-height: 0;
}
.crm-ws-col {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.crm-ws-col-head {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
  font-size: 14px;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbfc;
}
.crm-ws-col-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Activity Timeline */
.crm-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  padding-left: 12px;
}
.crm-timeline::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #e2e8f0;
}
.crm-timeline-item {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.crm-timeline-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #0284c7;
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.crm-timeline-content {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

/* Pipeline Kanban */
.crm-kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 550px;
}
.crm-kanban-col {
  width: 280px;
  flex-shrink: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
}
.crm-kanban-header {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 13px;
  background: #fff;
  border-radius: 10px 10px 0 0;
}
.crm-kanban-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.crm-deal-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.crm-deal-card:hover {
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
  transform: translateY(-2px);
}

/* Stepper Wizard */
.crm-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 16px;
}
.crm-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}
.crm-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.crm-step-item.active {
  color: #0284c7;
}
.crm-step-item.active .crm-step-num {
  background: #0284c7;
  color: #fff;
}
.crm-step-item.done {
  color: #16a34a;
}
.crm-step-item.done .crm-step-num {
  background: #16a34a;
  color: #fff;
}

/* Excel Hub & Dropzone Styles */
.btn-excel {
  background: #16a34a;
  border: 1px solid #16a34a;
  color: #ffffff;
  font-weight: 500;
  transition: all 0.15s ease;
}
.btn-excel:hover {
  background: #15803d;
  border-color: #15803d;
}
.crm-dropzone {
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.crm-dropzone:hover, .crm-dropzone.dragover {
  background: #f0fdf4;
  border-color: #16a34a;
}
.crm-hub-card {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* =============================================================================
 * VIZIO BIZ & CRM: MODALS, FORMS & DIALOG DESIGN SYSTEM
 * ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 1050;
  padding: 16px;
  animation: fxFadeIn 0.15s ease-out;
}

@keyframes fxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fxModalZoom {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-card {
  background: #ffffff !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
  width: 100% !important;
  max-width: 600px;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid #eaecf0 !important;
  animation: fxModalZoom 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.modal-header,
.modal-head {
  padding: 16px 22px !important;
  border-bottom: 1px solid #eaecf0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #ffffff !important;
  flex-shrink: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.modal-header h3,
.modal-head h3 {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #101828 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.modal-header h3 .ph,
.modal-head h3 .ph {
  font-size: 18px !important;
  color: var(--primary, #0068ff) !important;
}

.btn-close,
.modal-header .btn-close,
.modal-head .btn-close {
  background: transparent !important;
  border: none !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  color: #64748b !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.btn-close:hover,
.modal-header .btn-close:hover,
.modal-head .btn-close:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.modal-body {
  padding: 20px 24px !important;
  overflow-y: auto !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  box-sizing: border-box !important;
}

.modal-footer,
.modal-foot,
.fx-modal-foot {
  padding: 14px 24px !important;
  border-top: 1px solid #eaecf0 !important;
  background: #f8fafc !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

/* =============================================================================
 * FORM CONTROLS: INPUTS, SELECTS & TEXTAREAS
 * ========================================================================== */

.fx-label {
  display: block !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  margin-bottom: 6px !important;
}

.form-input:not([class*="w-"]),
.fx-input:not([class*="w-"]),
.form-textarea,
.fx-textarea,
.fx-select:not([class*="w-"]) {
  width: 100%;
  box-sizing: border-box !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  color: #1e293b !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  outline: none !important;
}

.form-input,
.fx-input,
.fx-select {
  height: 38px !important;
  padding: 0 12px !important;
  line-height: 38px !important;
}

.form-input.sm,
.fx-input.sm,
.fx-select.sm {
  height: 32px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  line-height: 32px !important;
}

.form-input:hover,
.fx-input:hover,
.form-textarea:hover,
.fx-textarea:hover,
.fx-select:hover {
  border-color: #94a3b8 !important;
}

.form-input:focus,
.fx-input:focus,
.form-textarea:focus,
.fx-textarea:focus,
.fx-select:focus {
  border-color: #0068ff !important;
  box-shadow: 0 0 0 3px rgba(0, 104, 255, 0.12) !important;
}

.form-textarea,
.fx-textarea {
  min-height: 80px !important;
  padding: 10px 12px !important;
  line-height: 1.5 !important;
  resize: vertical !important;
}

.fx-select {
  cursor: pointer !important;
  padding-right: 32px !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 256 256'%3E%3Cpath fill='%2364748b' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
}

/* Two-column form grid */
.fx-form-grid-2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
  width: 100% !important;
}

@media (max-width: 600px) {
  .fx-form-grid-2 {
    grid-template-columns: 1fr !important;
  }
}

/* Bulletproof safety cascade: All inputs/selects/textareas inside modals */
.modal-card input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.modal-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  width: 100% !important;
  box-sizing: border-box !important;
  height: 38px !important;
  padding: 0 12px !important;
  line-height: 38px !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  color: #1e293b !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.modal-card select,
.modal-body select {
  width: 100% !important;
  box-sizing: border-box !important;
  height: 38px !important;
  padding: 0 32px 0 12px !important;
  line-height: 38px !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  color: #1e293b !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  outline: none !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 256 256'%3E%3Cpath fill='%2364748b' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.modal-card textarea,
.modal-body textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 80px !important;
  padding: 10px 12px !important;
  line-height: 1.5 !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  color: #1e293b !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  outline: none !important;
  resize: vertical !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

/* =============================================================================
 * CRM CUSTOMER TOOLBAR: SOURCE BAR & FILTER CONTROLS (ALWAYS 1 ROW)
 * ========================================================================== */
.crm-filter-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-top: 6px !important;
  margin-bottom: 12px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.crm-filter-controls {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  flex-wrap: nowrap !important;
}

.crm-search-box {
  display: inline-flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  height: 36px !important;
  width: 220px !important;
  padding: 0 10px !important;
  gap: 8px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}
.crm-search-box:focus-within {
  border-color: #0068ff !important;
  box-shadow: 0 0 0 3px rgba(0, 104, 255, 0.12) !important;
}
.crm-search-box .ph-magnifying-glass {
  font-size: 16px !important;
  color: #94a3b8 !important;
  flex-shrink: 0 !important;
}
.crm-search-box input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 13px !important;
  color: #1e293b !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.crm-search-clear {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  font-size: 14px !important;
}
.crm-search-clear:hover {
  color: #475569 !important;
}

.crm-filter-select {
  height: 36px !important;
  width: 145px !important;
  min-width: 140px !important;
  max-width: 160px !important;
  padding: 0 28px 0 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  outline: none !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 256 256'%3E%3Cpath fill='%2364748b' d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80a8 8 0 0 1 11.32-11.32L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 11px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  flex-shrink: 0 !important;
}
.crm-filter-select:hover {
  border-color: #94a3b8 !important;
}
.crm-filter-select:focus {
  border-color: #0068ff !important;
  box-shadow: 0 0 0 3px rgba(0, 104, 255, 0.12) !important;
}

@media (max-width: 980px) {
  .crm-filter-bar {
    flex-wrap: wrap !important;
  }
  .crm-filter-controls {
    margin-left: 0 !important;
    width: 100% !important;
    flex-wrap: wrap !important;
  }
  .crm-search-box {
    flex: 1 1 200px !important;
    width: auto !important;
  }
  .crm-filter-select {
    flex: 1 1 130px !important;
    width: auto !important;
  }
}

.modal-card input:focus,
.modal-body input:focus,
.modal-card select:focus,
.modal-body select:focus,
.modal-card textarea:focus,
.modal-body textarea:focus,
.biz-shell input:focus,
.biz-shell select:focus,
.biz-shell textarea:focus {
  border-color: #0068ff !important;
  box-shadow: 0 0 0 3px rgba(0, 104, 255, 0.14) !important;
}

/* Modal action buttons styling */
.modal-footer .btn,
.modal-foot .btn,
.fx-modal-foot .btn {
  height: 38px !important;
  padding: 0 18px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

/* Responsive adjustments for 360 Workspace Drawer */
@media (max-width: 1200px) {
  .crm-ws-body {
    grid-template-columns: 300px 1fr 320px !important;
    gap: 12px !important;
    padding: 12px !important;
  }
}

@media (max-width: 992px) {
  .crm-ws-body {
    grid-template-columns: 1fr !important;
    overflow-y: auto !important;
  }
  .crm-ws-col {
    min-height: 340px;
  }
}

/* Sleek thin scrollbars */
.crm-kanban-board::-webkit-scrollbar,
.crm-ws-col-scroll::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.crm-kanban-board::-webkit-scrollbar-thumb,
.crm-ws-col-scroll::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.crm-kanban-board::-webkit-scrollbar-track,
.crm-ws-col-scroll::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

/* Floating Bulk Actions Toolbar */
.crm-bulk-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1.5px solid #0284c7;
  border-radius: 50px;
  box-shadow: 0 12px 28px -4px rgba(2, 132, 199, 0.28), 0 8px 12px -6px rgba(0, 0, 0, 0.12);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1000;
  animation: slideUpBulk 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

@keyframes slideUpBulk {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.crm-bulk-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}

.crm-bulk-pill {
  background: #0284c7;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 12px;
}

.crm-bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .crm-bulk-bar {
    width: 92%;
    border-radius: 12px;
    flex-direction: column;
    gap: 10px;
    bottom: 12px;
    padding: 12px;
  }
  .crm-bulk-actions {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* =============================================================================
/* Filter Toolbar (Search + Category Segment + Dropdown in One Single Row) */
.biz-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.biz-segmented-chips {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 3px;
  overflow-x: auto;
  max-width: 100%;
}

.biz-seg-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
}

.biz-seg-chip:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.5);
}

.biz-seg-chip.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.biz-seg-chip .biz-chip-count {
  font-size: 11px;
  opacity: 0.85;
}

/* Filter Chips (Categories & Suppliers) */
.biz-chips-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.biz-chips-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  margin-right: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.biz-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.biz-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.biz-chip.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}
.biz-chip-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #ef4444;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  cursor: pointer;
  transition: all 0.15s ease;
}
.biz-chip-clear:hover {
  background: #fee2e2;
}

/* Period Pills Selector (Day / Week / Month / Year) */
.biz-period-selector {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
  border: 1px solid #e2e8f0;
}
.biz-period-selector button,
.biz-period-btn {
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.biz-period-selector button:hover,
.biz-period-btn:hover {
  color: #0f172a;
}
.biz-period-selector button.active,
.biz-period-btn.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Product Cards & Rich Inventory Items */
.biz-prod-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #94a3b8;
  overflow: hidden;
}
.biz-prod-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.biz-prod-thumb.lg {
  width: 56px;
  height: 56px;
  border-radius: 10px;
}
.biz-prod-thumb.sm {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

/* Stock Status Badges */
.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.stock-pill.out {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.stock-pill.low {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.stock-pill.good {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* Debt Installment Payment Accordion */
.biz-debt-accordion {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 8px;
}
.biz-installment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 12.5px;
}
.biz-installment-item:last-child {
  border-bottom: none;
}

/* POS & Invoice Receipt Modal */
.biz-receipt-box {
  background: #ffffff;
  color: #0f172a;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.biz-receipt-header {
  background: #1e293b;
  color: #ffffff;
  padding: 20px 24px;
}
.biz-receipt-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 24px;
}
.biz-receipt-body {
  padding: 20px 24px;
}
.biz-receipt-qr-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
}
.biz-receipt-qr-card img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

/* =============================================================================
 * Executive Clean & Smart SaaS Design (No Clutter, No Rainbow Colors)
 * ========================================================================== */

.biz-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1024px) {
  .biz-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .biz-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.biz-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.biz-kpi-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.biz-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.biz-kpi-title {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.biz-kpi-icon {
  font-size: 17px;
  color: #94a3b8;
}
.biz-kpi-value {
  font-size: 25px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.2;
}
.biz-kpi-value.green {
  color: #059669;
}
.biz-kpi-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.3;
}
.biz-kpi-sub b {
  color: #1e293b;
  font-weight: 600;
}
.biz-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 16px;
}
.biz-tag-pill.success {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.biz-tag-pill.warning {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.biz-tag-pill.danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.biz-tag-pill.neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Smart Operational Alert Strip */
.biz-action-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 14px;
  margin-top: 14px;
}
.biz-action-strip-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}
.biz-action-btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}
.biz-action-btn-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.biz-action-btn-chip.warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.biz-action-btn-chip.warning:hover {
  background: #fef3c7;
}
.biz-action-btn-chip.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.biz-action-btn-chip.danger:hover {
  background: #fee2e2;
}
.biz-action-btn-chip.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.biz-action-strip-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.biz-text-action {
  font-size: 12.5px;
  font-weight: 500;
  color: #2563eb;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.biz-text-action:hover {
  background: #eff6ff;
}

/* Minimalist Bar Chart */
.biz-bar-chart-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  height: 180px;
  padding: 16px 8px 8px 8px;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
}
.biz-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}
.biz-bar-stick {
  width: 38px;
  max-width: 80%;
  border-radius: 4px 4px 0 0;
  background: #2563eb;
  transition: all 0.15s ease;
  cursor: pointer;
  position: relative;
}
.biz-bar-stick:hover {
  background: #1d4ed8;
  filter: brightness(1.08);
}
.biz-bar-stick.empty {
  background: #e2e8f0;
  height: 4px !important;
  border-radius: 2px;
  cursor: default;
}
.biz-bar-label {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 8px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}
.biz-bar-val-top {
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
  font-family: ui-monospace, monospace;
}

/* In hóa đơn nhiệt POS 80mm */
@media print {
  body:has(#thermal-receipt) * {
    visibility: hidden !important;
  }
  #thermal-receipt,
  #thermal-receipt * {
    visibility: visible !important;
  }
  #thermal-receipt {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 80mm !important;
    max-width: 80mm !important;
    margin: 0 !important;
    padding: 8px !important;
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border: none !important;
    font-size: 12px !important;
  }
  .modal-overlay,
  .modal-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
  }
  .modal-header,
  .modal-footer,
  .btn,
  /* .fx-shell giữ hiển thị khi in hóa đơn nhiệt / báo cáo */
  .fx-nav,
  .fx-header {
    display: none !important;
  }
}

/* =============================================================================
 * BÁO CÁO KINH DOANH & TÀI CHÍNH THÔNG MINH (VIZIO BIZ SMART ANALYTICS)
 * ========================================================================== */

/* 1. Header & Quick Controls */
.biz-rep-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 2px;
}

.biz-rep-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.biz-rep-heading {
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.biz-rep-heading i {
  color: #0284c7;
  font-size: 22px;
}

.biz-rep-caption {
  font-size: 12.5px;
  color: #64748b;
}

.biz-rep-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Segmented control chuyển kỳ */
.biz-segmented-control {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.biz-segmented-control button {
  background: transparent;
  border: none;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.biz-segmented-control button:hover {
  color: #0f172a;
}

.biz-segmented-control button.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 2. Dải Nhận Định Điều Hành Thông Minh (Smart Business Insight) */
.biz-smart-insight {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
}

.biz-smart-insight.positive {
  background: linear-gradient(90deg, #f0fdf4 0%, #ffffff 100%);
  border-color: #bbf7d0;
}

.biz-smart-insight.neutral {
  background: linear-gradient(90deg, #f0f9ff 0%, #ffffff 100%);
  border-color: #bae6fd;
}

.biz-smart-insight-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.biz-smart-insight.positive .biz-smart-insight-icon {
  background: #dcfce7;
  color: #16a34a;
}

.biz-smart-insight.neutral .biz-smart-insight-icon {
  background: #e0f2fe;
  color: #0284c7;
}

.biz-smart-insight-body {
  flex: 1;
  min-width: 0;
}

.biz-smart-insight-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.biz-smart-insight-desc {
  font-size: 12px;
  color: #475569;
  margin-top: 2px;
  line-height: 1.45;
}

.biz-smart-insight-act {
  flex-shrink: 0;
}

/* 3. Bộ 3 thẻ tài chính cốt lõi (Financial Trio) */
.biz-trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .biz-trio-grid {
    grid-template-columns: 1fr;
  }
}

.biz-trio-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.biz-trio-card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.biz-trio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.biz-trio-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.biz-trio-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.biz-trio-pill.blue { background: #eff6ff; color: #1d4ed8; }
.biz-trio-pill.green { background: #ecfdf5; color: #047857; }
.biz-trio-pill.teal { background: #f0fdfa; color: #0f766e; }
.biz-trio-pill.gray { background: #f1f5f9; color: #475569; }

.biz-trio-main-val {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.biz-trio-sub-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11.5px;
  color: #64748b;
}

.biz-dot {
  color: #cbd5e1;
  font-weight: 700;
}

/* Mini P&L Split Bar bên trong thẻ Lợi nhuận */
.biz-mini-pl-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
}

.biz-mini-pl-bar {
  display: flex;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.biz-mini-pl-profit {
  background: #10b981;
  height: 100%;
  transition: width 0.3s ease;
}

.biz-mini-pl-cogs {
  background: #f59e0b;
  height: 100%;
  transition: width 0.3s ease;
}

.biz-mini-pl-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
}

/* 4. Khối chính: Biểu đồ (65%) & Top Performers (35%) */
.biz-chart-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.2fr);
  gap: 14px;
}

@media (max-width: 1024px) {
  .biz-chart-stage-grid {
    grid-template-columns: 1fr;
  }
}

.biz-chart-box, .biz-top-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
}

.biz-chart-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.biz-box-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.biz-mini-toggle {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.biz-mini-toggle button {
  background: transparent;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.biz-mini-toggle button.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Vùng vẽ biểu đồ */
.biz-chart-render-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.biz-chart-meta-bar {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #64748b;
  margin-bottom: 8px;
  padding: 4px 8px;
  background: #f8fafc;
  border-radius: 6px;
}

.biz-chart-canvas {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 180px;
  padding: 10px 10px 0;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
}

.biz-chart-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed #f1f5f9;
  pointer-events: none;
  z-index: 1;
}

.biz-chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  z-index: 2;
}

.biz-chart-col-bar {
  width: 100%;
  max-width: 40px;
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  border-radius: 6px 6px 0 0;
  transition: all 0.25s ease;
  position: relative;
  cursor: pointer;
}

.biz-chart-col-bar.is-zero {
  background: #cbd5e1 !important;
  height: 4px !important;
  border-radius: 2px;
  opacity: 0.8;
}

.biz-chart-col-bar:hover {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  transform: scaleY(1.02);
}

.biz-chart-col-bar.is-zero:hover {
  background: #94a3b8 !important;
  transform: none;
}

.biz-chart-col-label {
  font-size: 11px;
  color: #64748b;
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65px;
  text-align: center;
}

.biz-chart-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.biz-chart-col-bar:hover .biz-chart-tip {
  opacity: 1;
}

/* Empty state biểu đồ tinh gọn */
.biz-clean-empty-chart {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  text-align: center;
  padding: 16px;
}

.biz-empty-ghost-chart {
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  height: 40px;
  width: 120px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 2px;
}

.biz-empty-ghost-chart span {
  flex: 1;
  background: #e2e8f0;
  border-radius: 2px 2px 0 0;
}

/* Cột Phải: Top 5 Sản Phẩm Bán Chạy */
.biz-top-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

.biz-top-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  transition: background 0.15s;
}

.biz-top-item:hover {
  background: #f1f5f9;
}

.biz-top-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}

.biz-top-rank.rank-1 { background: #fef3c7; color: #b45309; }
.biz-top-rank.rank-2 { background: #f1f5f9; color: #475569; }
.biz-top-rank.rank-3 { background: #ffedd5; color: #c2410c; }
.biz-top-rank.rank-4, .biz-top-rank.rank-5 { background: #ffffff; color: #94a3b8; border: 1px solid #e2e8f0; }

.biz-top-info {
  flex: 1;
  min-width: 0;
}

.biz-top-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biz-top-sub {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.biz-top-share {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  width: 60px;
  flex-shrink: 0;
}

.biz-share-bar {
  width: 100%;
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.biz-share-fill {
  height: 100%;
  background: #0284c7;
  border-radius: 999px;
}

.biz-share-num {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

/* 5. Khối Chi Tiết Chuyên Sâu (Details Tabbed Section) */
.biz-details-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.biz-details-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0 12px;
  overflow-x: auto;
  gap: 4px;
}

.biz-details-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.biz-details-tab:hover {
  color: #0f172a;
}

.biz-details-tab.active {
  color: #0284c7;
  border-bottom-color: #0284c7;
  background: #ffffff;
}

.biz-details-content {
  padding: 18px 20px;
}




/* ==========================================================================
   SƠ ĐỒ TỔ CHỨC NHÂN SỰ (ORGANIZATION CHART) & QUẢN LÝ PHÂN CẤP
   ========================================================================== */

/* Segmented button chuyển đổi Danh sách / Sơ đồ */
.fx-view-segmented {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  gap: 3px;
  border: 1px solid #e2e8f0;
}
.fx-view-segmented .btn {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  background: transparent;
  transition: all 0.15s ease;
}
.fx-view-segmented .btn.active,
.fx-view-segmented .btn.btn-primary {
  background: #ffffff !important;
  color: #0284c7 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.fx-view-segmented .btn:hover:not(.active):not(.btn-primary) {
  color: #0f172a;
}

/* Thanh công cụ Org Chart */
.fx-org-toolbar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fx-org-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.fx-org-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  color: #334155;
}
.fx-org-stat-pill b {
  font-weight: 700;
  color: #0f172a;
}
.fx-org-stat-pill.primary {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0369a1;
}
.fx-org-stat-pill.primary b {
  color: #0284c7;
}

.fx-org-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.fx-org-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.fx-org-dept-chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.fx-org-dept-chip:hover {
  border-color: #0284c7;
  color: #0284c7;
}
.fx-org-dept-chip.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}
.fx-org-search {
  max-width: 240px;
  height: 34px;
  font-size: 13px;
}
.fx-org-hint {
  font-size: 12.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #0284c7;
}

/* Canvas sơ đồ tổ chức */
.fx-org-canvas-wrap {
  background: radial-gradient(#e2e8f0 1.2px, transparent 1.2px), #f8fafc;
  background-size: 20px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 36px 20px 48px;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fx-org-roots {
  display: flex;
  justify-content: center;
  gap: 48px;
  align-items: flex-start;
  min-width: fit-content;
}

/* Nhánh và kết nối cây CSS */
.fx-org-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-top: 28px;
}
.fx-org-branch::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 28px;
  background: #94a3b8;
  transform: translateX(-50%);
}
.fx-org-branch::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #94a3b8;
}
.fx-org-branch:first-child::after {
  left: 50%;
  width: 50%;
}
.fx-org-branch:last-child::after {
  left: 0;
  width: 50%;
}
.fx-org-branch:only-child::after {
  display: none;
}
.fx-org-roots > .fx-org-branch {
  padding-top: 0;
}
.fx-org-roots > .fx-org-branch::before,
.fx-org-roots > .fx-org-branch::after {
  display: none;
}

.fx-org-children {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding-top: 28px;
  position: relative;
  min-width: fit-content;
}
.fx-org-children::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 28px;
  background: #94a3b8;
  transform: translateX(-50%);
}

/* Thẻ nhân sự Org Card */
.fx-org-card {
  width: 250px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  padding: 14px 14px 10px;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  z-index: 2;
}
.fx-org-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
}
.fx-org-card.is-admin {
  border-top: 4px solid #0284c7;
}
.fx-org-card.is-inactive {
  opacity: 0.65;
  background: #f8fafc;
  border-style: dashed;
}

.fx-org-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fx-org-dept-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 6px;
  max-width: 155px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fx-status-pill {
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #64748b;
}
.fx-status-pill.active {
  color: #16a34a;
}
.fx-status-pill.inactive {
  color: #94a3b8;
}

.fx-org-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fx-avatar-letter.xl {
  width: 44px;
  height: 44px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #0284c7;
  border: 2px solid #e0f2fe;
  flex-shrink: 0;
}
.fx-avatar-letter.admin-avatar {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
}

.fx-org-details {
  min-width: 0;
  flex: 1;
}
.fx-org-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fx-org-title {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
}
.fx-org-username {
  font-size: 11.5px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-org-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.fx-org-card-tags .fx-tag {
  font-size: 11px;
  padding: 2px 7px;
  height: auto;
  border-radius: 4px;
}
.fx-tag-channel {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fx-org-children-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  background: #f1f5f9;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #0369a1;
  cursor: pointer;
  transition: all 0.15s;
}
.fx-org-children-toggle:hover {
  background: #e0f2fe;
}

.fx-org-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}
.fx-org-card-actions .fx-icon-btn.sm {
  width: 26px;
  height: 26px;
  font-size: 13px;
  border-radius: 6px;
}


/* ==========================================================================
   QUẢN LÝ BỘ QUYỀN TRUY CẬP (RBAC - PERMISSION SETS)
   ========================================================================== */

.fx-permset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.fx-permset-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}
.fx-permset-card:hover {
  border-color: #0284c7;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.08);
}
.fx-permset-card.is-system {
  border-left: 4px solid #0284c7;
}

.fx-permset-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.fx-permset-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.fx-permset-dept {
  font-size: 12px;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
  margin-top: 4px;
}
.fx-permset-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
  flex: 1;
}
.fx-permset-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #475569;
}
.fx-permset-actions {
  display: flex;
  gap: 4px;
}

/* Modal Bộ quyền chi tiết */
.fx-modal-xl.fx-perm-modal {
  max-width: 1060px !important;
  width: 95vw !important;
  max-height: 92vh !important;
  display: flex !important;
  flex-direction: column !important;
}
.fx-perm-modal-body {
  overflow-y: auto !important;
  max-height: calc(92vh - 130px) !important;
  padding: 18px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.fx-perm-form-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
@media (max-width: 768px) {
  .fx-perm-form-top {
    grid-template-columns: 1fr;
  }
}

.fx-perm-quickbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.fx-perm-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.fx-perm-quick-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  color: #475569;
  transition: all 0.15s;
}
.fx-perm-quick-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.fx-perm-quick-btn.primary {
  background: #e0f2fe;
  border-color: #bae6fd;
  color: #0284c7;
}

.fx-perm-matrix {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fx-perm-cat-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}
.fx-perm-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}
.fx-perm-cat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: #0f172a;
}
.fx-perm-cat-title i {
  font-size: 16px;
  color: #0284c7;
}

.fx-perm-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s;
  gap: 16px;
}
.fx-perm-task-row:last-child {
  border-bottom: none;
}
.fx-perm-task-row:hover {
  background: #f8fafc;
}

.fx-perm-task-meta {
  flex: 1;
  min-width: 0;
}
.fx-perm-task-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}
.fx-perm-task-desc {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 1px;
}

.fx-perm-task-boxes {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.fx-perm-box-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  user-select: none;
  min-width: 58px;
}
.fx-perm-box-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #0284c7;
}
.fx-perm-box-item.disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.fx-perm-row-all {
  font-size: 11px;
  color: #0284c7;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f0f9ff;
  border: 1px solid #e0f2fe;
}
.fx-perm-row-all:hover {
  background: #e0f2fe;
}

/* ==========================================================================
   QUẢN LÝ NGƯỜI DÙNG & PHÂN QUYỀN KÊNH (MODAL REDESIGN)
   ========================================================================== */

.fx-usermgmt-modal {
  max-width: 960px !important;
  width: 95vw !important;
  max-height: 92vh !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18) !important;
}

.fx-usermgmt-body {
  overflow-y: auto !important;
  padding: 20px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
}

.fx-usermgmt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.fx-usermgmt-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.fx-usermgmt-tab {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.fx-usermgmt-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.fx-usermgmt-tab.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.fx-usermgmt-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fx-usermgmt-search input {
  height: 34px;
  font-size: 13px;
  border-radius: 8px;
  width: 240px;
}

.fx-badge-ch-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f5f9;
  color: #475569;
}

.fx-ch-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 320px;
}

.fx-ch-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.fx-ch-pill.zalo {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.fx-ch-edit-tr > td {
  padding: 0 !important;
  background: #f8fafc !important;
}

.fx-ch-edit-card {
  padding: 16px 20px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 2px solid #0284c7;
  background: #f0f9ff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-ch-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.fx-ch-edit-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fx-ch-edit-note {
  font-size: 12px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.fx-ch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.fx-ch-select-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.fx-ch-select-card:hover {
  border-color: #94a3b8;
  background: #fafafa;
}

.fx-ch-select-card.active {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 1px #0284c7, 0 2px 6px rgba(2, 132, 199, 0.12);
}

.fx-ch-select-card input[type="checkbox"] {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: #0284c7;
}

.fx-ch-select-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.fx-ch-select-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-ch-select-type {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 500;
}

.fx-add-user-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  overflow: visible;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.fx-add-user-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
}

.fx-add-user-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fx-add-user-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.fx-add-user-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  padding-top: 12px !important;
  margin-top: 4px !important;
  border-top: 1px solid #e2e8f0 !important;
}

@media (max-width: 768px) {
  .fx-add-user-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= CRM CHANNEL BAR (LIVE CHAT STYLE) ================= */
.crm-channel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.crm-channel-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: thin;
}

.crm-channel-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
  text-align: left;
}

.crm-channel-tab:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.crm-channel-tab.active {
  background: #f0fdf4;
  border-color: #86efac;
  box-shadow: 0 1px 4px rgba(34, 197, 94, 0.12);
}

.crm-channel-tab.active .crm-ch-name {
  color: #166534;
  font-weight: 700;
}

.crm-ch-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 13px;
}

.crm-ch-icon-wrap.all {
  background: #e0f2fe;
  color: #0284c7;
  font-size: 16px;
}

.crm-ch-icon-wrap.zalo {
  background: #0068ff;
  color: #ffffff;
}

.crm-ch-icon-wrap.fb {
  background: #1877f2;
  color: #ffffff;
}

.crm-ch-icon-wrap.oa {
  background: #0d9488;
  color: #ffffff;
}

.crm-ch-icon-wrap.other {
  background: #f3e8ff;
  color: #9333ea;
  font-size: 16px;
}

.crm-ch-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.crm-ch-dot {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
}

.crm-ch-dot.online {
  background: #22c55e;
}

.crm-ch-dot.warn {
  background: #f59e0b;
}

.crm-ch-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.crm-ch-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-ch-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.crm-ch-badge {
  font-size: 11.5px;
  font-weight: 500;
  color: #64748b;
}

.crm-ch-warn-pill {
  font-size: 11px;
  font-weight: 600;
  color: #d97706;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 0 6px;
  white-space: nowrap;
}

.crm-channel-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-sync-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  background: #ffffff;
  border: 1.5px solid #0284c7;
  color: #0284c7;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.crm-sync-btn:hover {
  background: #f0f9ff;
}

/* CRM Channel Pill inside Table */
.crm-channel-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  max-width: 170px;
}

.crm-ch-pill-name {
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-unassigned-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: #d97706;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 2px 7px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.crm-assign-now-btn {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  padding: 3px 8px !important;
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  border-radius: 5px !important;
}

.crm-reassign-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 6px;
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.crm-reassign-btn:hover {
  background: #f1f5f9;
  color: #0284c7;
  border-color: #cbd5e1;
}

