/* Trang Quản lý khách hàng + drawer Khách hàng trên bản đồ.
   Nạp sau styles.css. .cust-page áp dụng cho body /khach-mua và #mapCustomersPanel. */

.cust-page {
  font-size: 14px;
  touch-action: manipulation;
}

body.cust-page:not(.map-body) {
  touch-action: pan-x pan-y;
}

body.cust-page:not(.map-body) input,
body.cust-page:not(.map-body) select,
body.cust-page:not(.map-body) textarea {
  font-size: 16px;
}

.cust-page .cust-matches {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #d7e3e6;
}

.cust-page .cust-matches[hidden] {
  display: none !important;
}

.cust-page .cust-matches-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cust-page .cust-matches-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f766e;
}

.cust-page .cust-matches-new {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #c2410c;
  font-size: 11px;
  font-weight: 800;
}

.cust-page .cust-src-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.cust-page .cust-src {
  display: block;
  min-width: 0;
  appearance: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.cust-page .cust-src .feed-card-main {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
  min-height: 72px;
}

.cust-page .cust-src .feed-card-thumb {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  aspect-ratio: auto;
  align-self: stretch;
  border-radius: 10px;
  overflow: hidden;
  background: #cfd8dc;
}

.cust-page .cust-src .feed-card-thumb img,
.cust-page .cust-src .feed-card-thumb-ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  background: #cfd8dc;
}

.cust-page .cust-src .feed-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}

.cust-page .cust-src .feed-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cust-page .cust-src .feed-card-lot-main {
  flex: 1 1 auto;
  min-width: 0;
  font-family: "Space Grotesk", "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cust-page .cust-src .feed-card-meta,
.cust-page .cust-src .cust-src-fit,
.cust-page .cust-src-facts {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cust-page .cust-src .cust-src-fit {
  color: #0f766e;
  font-weight: 700;
}

.cust-page .cust-src-viewed {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.cust-page .cust-src-viewed[hidden] {
  display: none !important;
}

.cust-page .cust-src .feed-card-price {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px 10px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.25;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
}

.cust-page .cust-src .feed-card-price b {
  font-weight: 750;
}

.cust-page .cust-src .feed-card-price.is-deal {
  font-weight: 600;
  color: #64748b;
}

.cust-page .cust-src .feed-card-address,
.cust-page .cust-src .feed-card-address-old {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cust-page .cust-src .feed-card-address-old {
  color: #94a3b8;
  font-size: 12px;
}

.cust-page .cust-src-lot,
.cust-page .cust-src-price {
  color: #0f172a;
  font-weight: 800;
}

.cust-page .cust-src-row.is-viewed,
.cust-page .cust-src.is-viewed {
  opacity: 0.46;
  filter: grayscale(0.2);
}
.cust-page .cust-src-row.is-viewed .cust-src {
  opacity: 1;
  filter: none;
}

.cust-page .cust-src-act-frame {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fffd 0%, #e6f4f1 100%);
  border: 1px solid #b7e2db;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.cust-page .cust-src-act,
.cust-match-back-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.cust-page .cust-src-act-list {
  background: linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
  box-shadow: 0 6px 12px rgba(15, 118, 110, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cust-page .cust-src-act-map {
  background: linear-gradient(180deg, #38bdf8 0%, #0369a1 100%);
  box-shadow: 0 6px 12px rgba(3, 105, 161, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.cust-page .cust-src-act-x {
  background: linear-gradient(180deg, #fb7185 0%, #be123c 100%);
  box-shadow: 0 6px 12px rgba(190, 18, 60, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cust-page .cust-src-act:hover,
.cust-match-back-chip:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.cust-page .cust-src-act:active,
.cust-match-back-chip:active {
  transform: translateY(1px) scale(0.96);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.2);
}

@media (max-width: 640px) {
  .cust-page .cust-src-row {
    gap: 5px;
    padding: 5px;
    border-radius: 10px;
  }
  .cust-page .cust-src .feed-card-main {
    gap: 6px;
    min-height: 64px;
  }
  .cust-page .cust-src .feed-card-thumb {
    border-radius: 8px;
  }
  .cust-page .cust-src .feed-card-lot-main {
    font-size: 12px;
  }
  .cust-page .cust-src .feed-card-meta,
  .cust-page .cust-src .cust-src-fit,
  .cust-page .cust-src-facts,
  .cust-page .cust-src .feed-card-address,
  .cust-page .cust-src .feed-card-address-old {
    font-size: 11px;
  }
  .cust-page .cust-src .feed-card-price {
    font-size: 12px;
  }
  .cust-page .cust-src-act-frame {
    padding: 3px;
    gap: 3px;
    border-radius: 9px;
  }
  .cust-page .cust-src-act {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
}

.cust-match-preview {
  position: fixed;
  inset: 0;
  z-index: 500000;
  display: grid;
  grid-template-rows: auto 1fr;
  background: rgba(15, 23, 42, 0.45);
}

.cust-match-preview[hidden] {
  display: none !important;
}

.cust-match-preview-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #0f766e 0%, #115e59 100%);
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.35);
}

.cust-match-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.cust-match-back-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  height: 32px;
  padding: 0 10px 0 8px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #38bdf8 0%, #0369a1 100%);
  box-shadow: 0 8px 16px rgba(3, 105, 161, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.cust-match-back-ico {
  font-size: 14px;
  line-height: 1;
}

.cust-match-back-txt {
  white-space: nowrap;
}

#custSuggestBack {
  position: fixed;
  top: 58px;
  left: 10px;
  z-index: 400010;
}

html.desk-ui #custSuggestBack {
  left: 12px;
}

#mapCustomerSourceBack,
.map-cust-source-back {
  display: none !important;
}

.cust-page .news-head .cust-tabs-hide {
  appearance: none;
  flex: 0 0 auto;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

html.desk-ui .cust-page .news-head .cust-tabs-hide {
  border-color: #d7e3e6;
  background: #fff;
  color: #475569;
}

.cust-page .cust-tabs {
  gap: 0;
}

.cust-page .cust-tabs button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.cust-page .cust-tabs-restore {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}

.cust-page .cust-quick-add-icon {
  display: none;
}

.cust-page .cust-quick-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
}

.cust-page .cust-filter-toggle {
  z-index: 8;
}

.cust-page .cust-has-filter-toggle .spx3-peer-btn,
.cust-page .cust-has-filter-toggle [data-sp-phu-add],
.cust-page .cust-familiar-search-wrap .spx3-peer-btn,
.cust-page .cust-familiar-search-wrap [data-sp-phu-add],
.cust-page .cust-data-search-wrap .spx3-peer-btn,
.cust-page .cust-data-search-wrap [data-sp-phu-add] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.cust-page .cust-btn-primary,
.cust-page .cust-quick-add-btn,
.cust-page .cust-submit-btn,
.cust-page .cust-goto-need-btn,
.cust-page .cust-need-form > button[type="submit"] {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.cust-page .cust-secondary,
.cust-page .cust-filter-reset-btn,
.cust-page .cust-btn-secondary,
.cust-page .cust-btn-danger,
.cust-page .cust-fly-map-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.cust-page .cust-filter-reset-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
}

.cust-page .cust-btn-secondary {
  border: 1px solid #f59e0b;
  background: #fef3c7;
  color: #92400e;
}

.cust-page .cust-btn-danger {
  border: 1px solid #ef4444;
  background: #fee2e2;
  color: #b91c1c;
}

.cust-page .cust-view-toggle {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.cust-page .cust-data-summary,
.cust-page .cust-filter-item label,
.cust-page .cust-field-lbl,
.cust-page .note {
  font-size: 14px;
}

.cust-page .cust-data-filters select,
.cust-page .cust-data-filters input,
.cust-page .cust-familiar-filters select,
.cust-page .cust-familiar-filters input,
.cust-page .cust-need-form input,
.cust-page .cust-need-form select,
.cust-page .cust-need-form textarea,
.cust-page #dataSortMode {
  min-height: 40px;
  font-size: 16px;
}

.cust-page .cust-finance-block {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.cust-page .cust-finance-custom-wrap {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.cust-page .cust-finance-sug-slot.skyland-smart-price-suggester-wrap,
.cust-page .skyland-smart-price-suggester-wrap {
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: linear-gradient(135deg, #f0fdf9 0%, #f8fafc 100%);
  border: 1px solid #cce5e1;
  border-radius: 12px;
}

.cust-page .skyland-smart-price-suggester-wrap.is-hidden {
  display: none !important;
}

.cust-page .skyland-sps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cust-page .skyland-sps-title {
  font-size: 11px;
  font-weight: 800;
  color: #005d53;
  text-transform: uppercase;
}

.cust-page .skyland-sps-hint {
  font-size: 11px;
  color: #64748b;
}

.cust-page .skyland-sps-chips-scroller {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 4px;
}

.cust-page .skyland-sps-chip-btn {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #a7d7cf;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.cust-page .cust-need-form .skyland-add-addr {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 8px 0 10px;
}
.cust-page .cust-need-form .skyland-add-addr-block {
  padding: 8px 10px;
  border-radius: 12px;
}
.cust-page .cust-need-form .skyland-add-addr-block.is-old {
  padding: 0;
}
.cust-page .cust-need-form .skyland-add-addr-block.is-old > summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #8a6a2a;
}
.cust-page .cust-need-form .skyland-add-addr-block.is-old > summary::-webkit-details-marker {
  display: none;
}
.cust-page .cust-need-form .skyland-add-addr-block.is-old > summary::after {
  content: " ▾";
  font-weight: 700;
}
.cust-page .cust-need-form .skyland-add-addr-block.is-old[open] > summary::after {
  content: " ▴";
}
.cust-page .cust-need-form .skyland-add-addr-old-body {
  padding: 0 10px 8px;
}
.cust-page .cust-need-form .skyland-add-input {
  min-height: 40px;
  font-size: 16px;
}

.cust-page .cust-filter-jump {
  display: none;
  gap: 8px;
  margin-top: 6px;
}
.cust-page .cust-filter-jump.is-on {
  display: flex;
  flex-wrap: wrap;
}
.cust-page .cust-filter-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: #ecfeff;
  color: #0f766e;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
@media (max-width: 720px) {
  .cust-page .cust-filter-jump a {
    min-height: 32px;
  }
}

.cust-page .cust-filter-item-end {
  justify-content: flex-end;
}

.cust-page .cust-filter-item-end label {
  margin-right: 8px;
  white-space: nowrap;
}

.cust-page #dataSortMode {
  min-width: min(220px, 100%);
  font-weight: 650;
}

.cust-page .cust-area-custom {
  display: none;
  margin-left: 10px;
  width: min(170px, 100%);
}

.cust-page .cust-file-input {
  display: none;
}

.cust-page .cust-import-pane .cust-secondary {
  margin-top: 8px;
}

.cust-page .cust-interact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.cust-page #custSpPhuHint {
  margin-bottom: 10px;
}

.cust-page .skyland-modal-header h3 {
  font-size: 17px;
}

.cust-page .skyland-modal-close {
  min-width: 36px;
  min-height: 36px;
  font-size: 18px;
}

@media (min-width: 900px) {
  .cust-page .cust-tabs button {
    flex: 1 1 0;
    font-size: 15px;
    padding: 12px 16px;
  }

  .cust-page .news-head h1 {
    font-size: 26px;
  }

  .cust-page .cust-data-actions-group {
    gap: 8px;
  }
}

@media (max-width: 899px) {
  .cust-page .cust-main {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }

  .cust-page .cust-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cust-page .cust-data-controls-row,
  .cust-page .cust-filter-actions {
    align-items: stretch;
  }

  .cust-page .cust-familiar-toolbar-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
  }

  .cust-page .cust-familiar-toolbar-row .cust-familiar-search-wrap {
    flex: 1 1 0% !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 48px) !important;
  }

  .cust-page .cust-familiar-toolbar-row .cust-quick-add-btn {
    display: inline-flex !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    justify-content: center;
  }

  .cust-page .cust-quick-add-full {
    display: none !important;
  }

  .cust-page .cust-quick-add-icon {
    display: inline !important;
    font-size: 18px;
    line-height: 1;
    font-weight: 800;
  }

  .cust-page .skyland-modal-content,
  .cust-page .cust-interact-modal-content {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 24px);
    border-radius: 14px;
  }

  .cust-page .cust-interact-actions > button {
    flex: 1 1 140px;
  }

  .cust-page .cust-filter-item-end {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .cust-page #dataSortMode,
  .cust-page .cust-area-custom {
    width: 100%;
    margin-left: 0;
  }
}

.cust-page .cust-data-summary .is-miss {
  color: #d97706;
  font-weight: 700;
}

.cust-page .cust-data-actions-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: auto;
}

.cust-page .cust-icon-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 40px;
  height: 40px;
  min-height: 40px;
  flex: 0 0 40px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.cust-page .cust-icon-btn b {
  font-size: 11px;
  font-weight: 800;
}

.cust-page .cust-icon-btn.is-primary {
  background: #087f8c;
  border-color: #087f8c;
  color: #fff;
  font-size: 20px;
}

.cust-page .cust-icon-btn.is-danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
  width: auto;
  min-width: 40px;
  padding: 0 8px;
  flex-basis: auto;
}

.cust-page .cust-icon-btn.is-warn {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
  width: auto;
  min-width: 40px;
  padding: 0 8px;
  flex-basis: auto;
}

.cust-page .cust-view-toggle-group .cust-icon-btn {
  width: 40px;
  height: 36px;
  min-height: 36px;
  flex-basis: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}

.cust-page .cust-view-toggle.is-active {
  background: #fff;
  color: #087f8c;
}

.cust-page .cust-data-search-wrap {
  position: relative;
}

.cust-page .cust-data-search-wrap input {
  height: 40px;
  font-size: 14px;
  border-radius: 12px;
}

.cust-page .cust-data-search-wrap input:disabled {
  opacity: 1;
  background: #fff;
  color: inherit;
  pointer-events: auto;
}

.cust-page .cust-data-search-busy {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #64748b;
  pointer-events: none;
  white-space: nowrap;
}

.cust-page .cust-data-search-wrap.is-searching input {
  padding-right: 92px;
}

.cust-page .cust-data-summary {
  font-size: 12px;
  line-height: 1.4;
}

.cust-page .cust-assign-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
}

.cust-page .cust-assign-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
}

.cust-page .cust-data-table {
  font-size: 12px;
}

.cust-page .cust-data-table thead th {
  font-size: 11px;
  padding: 8px;
}

.cust-page .cust-data-table tbody td {
  font-size: 12px;
  padding: 8px;
}

@media (min-width: 900px) {
  .cust-page .cust-data-pane {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto;
    column-gap: 12px;
    row-gap: 10px;
    align-items: center;
  }

  .cust-page .cust-data-toolbar {
    grid-column: 1;
    grid-row: 1;
  }

  .cust-page .cust-data-chip-rail-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0;
  }

  .cust-page .cust-data-controls-row {
    display: contents;
  }

  .cust-page #dataSummaryBar {
    grid-column: 2;
    grid-row: 1;
    font-size: 13px;
    white-space: nowrap;
  }

  .cust-page .cust-data-actions-group {
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
  }

  .cust-page #custFilterSheet {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .cust-page #custDataBody {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .cust-page .cust-data-search-wrap input {
    height: 38px;
    font-size: 14px;
    border-radius: 10px;
  }

  .cust-page .cust-icon-btn {
    width: 36px;
    height: 36px;
    min-height: 36px;
    flex-basis: 36px;
    border-radius: 10px;
    font-size: 15px;
  }

  .cust-page .cust-icon-btn.is-primary {
    font-size: 18px;
  }

  .cust-page .cust-view-toggle-group .cust-icon-btn {
    width: 34px;
    height: 32px;
    min-height: 32px;
    flex-basis: 34px;
  }

  .cust-page .cust-assign-bar {
    margin: 0 0 12px;
  }

  .cust-page .cust-assign-input {
    height: 36px;
    max-width: 280px;
    flex: 0 1 280px;
    font-size: 14px;
    border-radius: 10px;
  }

  .cust-page .cust-data-table {
    font-size: 13px;
  }

  .cust-page .cust-data-table thead th {
    font-size: 12px;
    padding: 10px 12px;
  }

  .cust-page .cust-data-table tbody td {
    font-size: 13px;
    padding: 8px 12px;
  }
}

@media (max-width: 768px) {
  .cust-page .cust-data-pane,
  .cust-page .cust-data-toolbar,
  .cust-page #custDataBody {
    font-size: 12px;
  }

  .cust-page .cust-data-toolbar {
    margin-bottom: 6px;
  }

  .cust-page .cust-data-search-wrap input {
    height: 36px;
    border-radius: 10px;
  }

  .cust-page .cust-filter-toggle {
    width: 32px;
    height: 32px;
    right: 2px;
    border-radius: 8px;
    background-size: 18px 18px;
  }

  .cust-page .cust-icon-btn {
    width: 32px;
    height: 32px;
    min-height: 32px;
    flex-basis: 32px;
    border-radius: 8px;
    font-size: 14px;
  }

  .cust-page .cust-icon-btn.is-primary {
    font-size: 16px;
  }

  .cust-page .cust-icon-btn b {
    font-size: 10px;
  }

  .cust-page .cust-view-toggle-group .cust-icon-btn {
    width: 30px;
    height: 28px;
    min-height: 28px;
    flex-basis: 30px;
  }

  .cust-page .cust-data-actions-group {
    gap: 4px;
  }

  .cust-page .cust-data-summary,
  .cust-page #dataSummaryBar {
    font-size: 11px;
    line-height: 1.3;
    margin: 4px 0;
  }

  .cust-page .cust-assign-bar {
    gap: 4px;
    margin: 4px 0 6px;
  }

  .cust-page .cust-assign-input {
    height: 28px;
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px !important;
    border-radius: 8px;
    max-width: 140px;
    flex: 0 1 140px;
  }

  .cust-page .cust-assign-bar .cust-icon-btn {
    width: 28px;
    height: 28px;
    min-height: 28px;
    flex-basis: 28px;
    font-size: 13px;
  }

  .cust-page .cust-data-table {
    font-size: 12px;
    line-height: 1.25;
  }

  .cust-page .cust-data-table thead th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15px;
    padding: 4px 6px;
    line-height: 1.2;
  }

  .cust-page .cust-data-table tbody td {
    font-size: 12px;
    padding: 4px 6px;
    line-height: 1.25;
  }

  .cust-page .cust-data-table tbody tr + tr td {
    border-top: 0;
  }

  .cust-page .cust-data-table .cust-td-name {
    min-width: 120px !important;
    max-width: 160px !important;
    font-size: 12px;
  }

  .cust-page .cust-data-table .cust-td-code,
  .cust-page .cust-data-table .cust-td-unit,
  .cust-page .cust-data-table .cust-td-project,
  .cust-page .cust-data-table .cust-td-phone,
  .cust-page .cust-data-table .cust-td-phone a {
    font-size: 12px;
  }

  .cust-page .cust-data-table .cust-td-unit {
    padding: 1px 4px;
  }

  .cust-page .cust-data-table input,
  .cust-page .cust-data-table select,
  .cust-page .cust-data-table .cust-select-sm {
    height: 26px;
    min-height: 26px;
    padding: 0 4px;
    font-size: 12px !important;
    border-radius: 6px;
  }

  .cust-page .cust-data-table .cust-interact-btn,
  .cust-page .cust-data-table .cust-kho-link-btn,
  .cust-page .cust-data-table .cust-add-source-btn,
  .cust-page #dataCustTable .cust-add-source-btn,
  .cust-page #dataCustTable .cust-kho-link-btn {
    min-height: 24px;
    height: auto;
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 6px;
    line-height: 1.2;
    box-shadow: none;
  }

  .cust-page .cust-data-table td > div {
    gap: 2px !important;
  }

  .cust-page .cust-spphu-snippet {
    font-size: 11px !important;
    max-width: 110px !important;
  }

  .cust-page .cust-data-table-scroll-wrap [data-scroll-top="1"] {
    height: 10px;
  }

  .cust-page .cust-data-cards-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cust-page .cust-data-card-item {
    padding: 8px 10px;
    gap: 6px;
    border-radius: 10px;
  }

  .cust-page .cust-data-card-title .cust-name {
    font-size: 13px;
  }

  .cust-page .cust-data-card-info-row .lbl,
  .cust-page .cust-data-card-info-row .val {
    font-size: 11px;
  }

  .cust-page .cust-data-card-actions .cust-add-source-btn,
  .cust-page .cust-data-card-actions .cust-interact-btn {
    min-height: 26px;
    padding: 3px 8px;
    font-size: 11px;
  }
}

@media (max-width: 899px) {
  .cust-page .cust-familiar-toolbar-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .cust-page .cust-familiar-toolbar-row .cust-familiar-search-wrap {
    flex: 1 1 0% !important;
    min-width: 0 !important;
  }
  .cust-page .cust-familiar-toolbar-row .cust-quick-add-btn {
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
  }
}

/* Drawer bản đồ: chữ 11–12px, padding khít, không tràn khung. */
#mapCustomersPanel.cust-page {
  font-size: 12px;
}
#mapCustomersPanel.cust-page .cust-tabs-restore {
  display: none !important;
}
#mapCustomersPanel.cust-page .news-main,
#mapCustomersPanel.cust-page .cust-main {
  max-width: none;
  margin: 0;
  padding: 8px 10px 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#mapCustomersPanel.cust-page .cust-need-sheet,
#mapCustomersPanel.cust-page .cust-data-pane,
#mapCustomersPanel.cust-page .cust-familiar-pane {
  min-width: 0;
}
@media (max-width: 899px) {
  #mapCustomersPanel.cust-page,
  #mapCustomersPanel.cust-page .cust-data-pane,
  #mapCustomersPanel.cust-page .cust-familiar-pane,
  #mapCustomersPanel.cust-page .cust-match-intro,
  #mapCustomersPanel.cust-page .note {
    font-size: 12px;
  }
  #mapCustomersPanel.cust-page .cust-tabs button,
  #mapCustomersPanel.cust-page .map-cust-tabs button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12px;
  }
  #mapCustomersPanel.cust-page .cust-data-search-wrap input,
  #mapCustomersPanel.cust-page .cust-familiar-search-wrap input,
  #mapCustomersPanel.cust-page .cust-need-form input,
  #mapCustomersPanel.cust-page .cust-need-form select,
  #mapCustomersPanel.cust-page .cust-need-form textarea {
    font-size: 16px;
  }
  #mapCustomersPanel.cust-page .cust-filter-item label,
  #mapCustomersPanel.cust-page .cust-field-lbl,
  #mapCustomersPanel.cust-page .cust-data-summary,
  #mapCustomersPanel.cust-page .cust-familiar-stats {
    font-size: 11px;
  }
  #mapCustomersPanel.cust-page .cust-quick-add-full {
    font-size: 12px;
  }
  #mapCustomersPanel.cust-page .cust-form-section-title {
    font-size: 12px;
  }
  #mapCustomersPanel.cust-page .skyland-add-addr-title,
  #mapCustomersPanel.cust-page .skyland-add-label {
    font-size: 11px;
  }
}

.cust-page .cust-tabs [data-cust-tab],
.cust-page .cust-quick-add-btn,
.cust-page .cust-tabs-hide,
.cust-page .cust-need-form-3d .cust-dd-btn,
.cust-page .cust-need-form-3d .cust-secondary,
.cust-page .cust-need-form-3d .cust-submit-btn {
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 10px 22px rgba(15, 43, 60, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.7) inset,
    0 -2px 0 rgba(15, 23, 42, 0.12) inset;
  transform: translateY(0);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.cust-page .cust-tabs [data-cust-tab]:hover,
.cust-page .cust-quick-add-btn:hover,
.cust-page .cust-need-form-3d .cust-dd-btn:hover,
.cust-page .cust-need-form-3d .cust-secondary:hover,
.cust-page .cust-need-form-3d .cust-submit-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow:
    0 14px 28px rgba(15, 43, 60, 0.2),
    0 2px 0 rgba(255, 255, 255, 0.8) inset;
}
.cust-page .cust-tabs [data-cust-tab]:active,
.cust-page .cust-need-form-3d .cust-dd-btn:active,
.cust-page .cust-need-form-3d .cust-secondary:active,
.cust-page .cust-need-form-3d .cust-submit-btn:active {
  transform: translateY(1px);
  box-shadow:
    0 4px 10px rgba(15, 43, 60, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.cust-page .cust-need-form-3d .cust-submit-btn {
  width: 100%;
  min-height: 48px;
  color: #fff;
  background: linear-gradient(180deg, #14b8a6 0%, #0f766e 55%, #115e59 100%);
  box-shadow:
    0 14px 30px rgba(15, 118, 110, 0.38),
    0 2px 0 rgba(255, 255, 255, 0.35) inset,
    0 -3px 0 rgba(6, 78, 59, 0.35) inset;
}

.cust-page .cust-need-form-3d #custProjectName,
.cust-page .cust-need-form-3d .skyland-add-input,
.cust-page .cust-need-form-3d .skyland-add-addr-block.is-new {
  border: 1px solid #b7e4d8;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
  box-shadow:
    0 10px 24px rgba(13, 122, 134, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}
.cust-page .cust-need-form-3d #custProjectName,
.cust-page .cust-need-form-3d .skyland-add-input {
  min-height: 44px;
  padding: 10px 12px;
}
.cust-page .cust-need-form-3d #custProjectName:focus,
.cust-page .cust-need-form-3d .skyland-add-input:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18), 0 10px 24px rgba(13, 122, 134, 0.16);
}

.cust-page .cust-project-suggest-wrap {
  position: relative;
  min-width: 0;
}

.cust-page .cust-project-sug-slot {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  display: flex;
  flex-direction: column;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #b7e4d8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.cust-page .cust-project-sug-slot[hidden] {
  display: none !important;
}

.cust-page .cust-project-sug-item {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.cust-page .cust-project-sug-item:hover,
.cust-page .cust-project-sug-item:focus {
  background: #f0fdfa;
  outline: none;
}
.cust-page .cust-need-form-3d .skyland-add-addr-block.is-new {
  padding: 12px;
}
.cust-page .cust-opt-hint {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #0f766e;
  text-transform: none;
}

@media (max-width: 720px) {
  .cust-page .cust-need-form-3d .cust-submit-btn,
  .cust-page .cust-need-form-3d .cust-secondary,
  .cust-page .cust-need-form-3d .cust-dd-btn {
    min-height: 46px;
  }
}

.cust-page #dataSearch,
.cust-page .cust-data-search-wrap,
.cust-page .cust-data-chip,
.cust-page .cust-data-chip-x,
.cust-page .cust-data-chip-item,
.cust-page .cust-data-chip-rail,
.cust-page .cust-data-chip-rail-wrap {
  pointer-events: auto !important;
}
.cust-page .cust-data-chip-rail-wrap {
  margin-top: 8px;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  position: relative;
  z-index: 40;
  background: linear-gradient(180deg, #f4fbfb 0%, #eef7f6 100%);
}

.cust-page #custFilterSheet[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.cust-page .cust-data-chip-rail {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  width: max-content;
  min-width: 100%;
  overflow: visible;
  padding: 8px 4px 10px;
  position: relative;
  z-index: 42;
  isolation: isolate;
  pointer-events: auto;
}

.cust-page .cust-data-chip-item {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: stretch;
  gap: 0;
}

.cust-page .cust-data-chip {
  appearance: none;
  flex: 0 0 auto;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 12px;
  pointer-events: auto;
  position: relative;
  z-index: 41;
  border: 1px solid rgba(255, 255, 255, 0.88);
  background: linear-gradient(180deg, #ffffff 0%, #f4f8f9 52%, #e7eef0 100%);
  color: #16343a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow:
    0 10px 18px rgba(15, 43, 60, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.96) inset,
    0 -3px 0 rgba(15, 23, 42, 0.08) inset;
  touch-action: manipulation;
}

.cust-page .cust-data-chip-item .cust-data-chip {
  padding-right: 10px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.cust-page .cust-data-chip-x {
  position: relative;
  top: auto;
  right: auto;
  z-index: 43;
  pointer-events: auto;
  width: 28px;
  height: auto;
  min-width: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(180deg, #ffffff 0%, #f7ecec 55%, #f0d9d9 100%);
  color: #9f1239;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  box-shadow:
    0 10px 18px rgba(15, 43, 60, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 -3px 0 rgba(15, 23, 42, 0.06) inset;
  touch-action: manipulation;
  pointer-events: auto;
}
.cust-page .cust-data-chip-x:hover,
.cust-page .cust-data-chip-x:focus {
  color: #fff;
  background: linear-gradient(180deg, #fb7185 0%, #e11d48 100%);
}

.cust-page .cust-data-chip.is-cold,
.cust-page .cust-data-chip.is-misc,
.cust-page .cust-data-chip.is-spphu,
.cust-page .cust-data-chip.is-all {
  border-color: rgba(255, 255, 255, 0.88);
  background: linear-gradient(180deg, #ffffff 0%, #f4f8f9 52%, #e7eef0 100%);
  color: #16343a;
}

.cust-page #dataDeleteListBtn {
  width: auto;
  min-width: 76px;
  flex-basis: auto;
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
  font-weight: 700;
  padding: 0 10px;
  gap: 4px;
}
.cust-page #dataDeleteListBtn[hidden] {
  display: none !important;
}
.cust-page #dataDeleteListBtn:hover {
  background: #fecaca;
  border-color: #f87171;
}

.cust-page .cust-data-chip.is-on,
.cust-page .cust-data-chip.is-cold.is-on,
.cust-page .cust-data-chip.is-misc.is-on,
.cust-page .cust-data-chip.is-spphu.is-on,
.cust-page .cust-data-chip.is-all.is-on {
  border-color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(180deg, #ffffff 0%, #d8f4f0 48%, #b7e6df 100%);
  color: #0f3d42;
  font-weight: 700;
  box-shadow:
    0 6px 14px rgba(15, 118, 110, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 3px 0 #0f766e;
}

@media (max-width: 720px) {
  .cust-page .cust-data-chip-rail-wrap {
    margin-top: 6px;
  }
  .cust-page .cust-data-chip-rail {
    gap: 8px;
    padding: 6px 2px 8px;
  }
  .cust-page .cust-data-chip {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    max-width: 180px;
    border-radius: 12px;
  }
  .cust-page .cust-data-chip-item .cust-data-chip {
    padding-right: 8px;
  }
  .cust-page .cust-data-chip-x {
    width: 32px;
    min-width: 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 0 12px 12px 0;
  }
}

/* Tab Data: khung cuộn ngang giữ nguyên khi tải; thanh trên luôn điều khiển được. */
.cust-page .cust-data-body {
  min-width: 0;
  overflow: visible;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.cust-page .cust-data-table-scroll-wrap {
  overflow-x: auto !important;
  overflow-y: visible;
  max-width: 100%;
  touch-action: pan-x pan-y;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.cust-page .cust-table-scroll-top,
.cust-page .cust-data-table-scroll-wrap [data-scroll-top="1"] {
  overflow-x: scroll !important;
  overflow-y: hidden !important;
  height: 16px;
  margin: 0 0 8px;
  border-radius: 8px;
  background: #e2e8f0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x !important;
  pointer-events: auto !important;
  cursor: ew-resize;
}
.cust-page .cust-table-responsive,
.cust-page .cust-data-table-scroll-wrap [data-scroll-main="1"] {
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y !important;
  overscroll-behavior-x: contain;
  max-width: 100%;
  scrollbar-width: thin;
  pointer-events: auto !important;
}
.cust-page .cust-data-table-scroll-wrap [data-scroll-main="1"]::-webkit-scrollbar {
  display: block !important;
  height: 8px;
}
.cust-page .cust-data-table-scroll-wrap [data-scroll-main="1"]::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 99px;
}
.cust-page .cust-data-table {
  width: max-content !important;
  min-width: 100%;
}
.cust-page .cust-data-table .cust-td-phone,
.cust-page .cust-data-table .cust-th-phone {
  position: static;
  left: auto;
  z-index: auto;
  background: transparent;
  box-shadow: none;
}

.cust-page .cust-phone-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 248px;
  max-width: 320px;
}
.cust-page .cust-inline-edit-phone {
  flex: 1 1 auto;
  min-width: 110px;
  max-width: 150px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12.5px;
}
.cust-page .cust-phone-num {
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
}
.cust-page .cust-phone-call,
.cust-page .cust-phone-zalo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  pointer-events: auto;
}
.cust-page .cust-phone-call {
  background: linear-gradient(180deg, #34d399, #15803d);
  color: #fff;
  box-shadow: 0 4px 10px rgba(21, 128, 61, 0.28);
}
.cust-page .cust-phone-zalo {
  width: auto;
  padding: 0 7px;
  background: #0068ff;
  color: #fff;
  font-size: 10px;
  box-shadow: 0 4px 10px rgba(0, 104, 255, 0.28);
}
.cust-page .cust-phone-spphu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 2px;
  width: auto;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #5eead4, #0f766e);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.28);
  pointer-events: auto;
}
.cust-page .cust-phone-spphu-n {
  font-size: 10px;
}
.cust-page .cust-phone-cell .spx3-contact-slot,
.cust-page .cust-phone-cell .spx3-peer-btn,
.cust-page .cust-phone-cell [data-sp-phu-add]:not(.cust-phone-spphu) {
  display: none !important;
}
.cust-page .cust-excel-cell {
  width: 100%;
  min-width: 96px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #dbe4ea;
  border-radius: 8px;
  font-size: 12.5px;
  background: #fff;
}
.cust-page .cust-excel-th {
  white-space: nowrap;
}
.cust-page .cust-excel-del-col {
  margin-left: 6px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  cursor: pointer;
  font-weight: 800;
  line-height: 18px;
}
.cust-page #dataAddColBtn {
  width: auto;
  min-width: 40px;
  flex-basis: auto;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 800;
}
@media (max-width: 720px) {
  .cust-page .cust-data-table .cust-td-phone,
  .cust-page .cust-data-table .cust-th-phone {
    position: static;
    left: auto;
    z-index: auto;
    background: transparent;
    box-shadow: none;
  }
  .cust-page .cust-phone-cell {
    min-width: 0;
    max-width: none;
  }
  .cust-page .cust-phone-call,
  .cust-page .cust-phone-zalo,
  .cust-page .cust-phone-spphu {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }
  .cust-page .cust-phone-zalo,
  .cust-page .cust-phone-spphu {
    width: auto;
  }
}

/* Tab Khách quan tâm: bộ lọc 3D gọn, không dùng lưới 4 cột chật. */
.cust-page #custFamiliarFilterSheet.cust-fam-filter-sheet {
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.cust-page #custFamiliarFilterSheet .feed-filter-backdrop {
  background: rgba(15, 43, 60, 0.42);
  backdrop-filter: blur(4px);
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-panel {
  width: min(760px, calc(100vw - 24px));
  max-height: min(88vh, 720px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f4fbfb 58%, #eef7f6 100%);
  box-shadow:
    0 28px 50px rgba(15, 43, 60, 0.28),
    0 8px 18px rgba(13, 122, 134, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.9) inset,
    0 -3px 0 rgba(15, 23, 42, 0.08) inset;
  overflow: hidden;
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-head {
  justify-content: flex-start;
  min-height: 56px;
  padding: 10px 56px 10px 18px;
  border-bottom: 1px solid rgba(13, 122, 134, 0.14);
  background: linear-gradient(180deg, #14b8a6 0%, #0f766e 62%, #115e59 100%);
  box-shadow:
    0 8px 18px rgba(15, 118, 110, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.28) inset;
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-head h2 {
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 0 rgba(6, 78, 59, 0.35);
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-x {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow:
    0 6px 12px rgba(6, 78, 59, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.35) inset;
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-x:hover {
  background: rgba(255, 255, 255, 0.26);
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-body {
  padding: 14px 16px 16px;
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-grid.cust-familiar-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-group {
  padding: 10px 12px 12px;
  border: 1px solid rgba(183, 228, 216, 0.9);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fffd 100%);
  box-shadow:
    0 10px 18px rgba(15, 43, 60, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 -2px 0 rgba(13, 122, 134, 0.08) inset;
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-group-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #0f766e;
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-row {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-row.is-2 {
  grid-template-columns: 1fr 1fr;
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-row.is-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-row.is-sort {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}
.cust-page #custFamiliarFilterSheet .cust-filter-item {
  min-width: 0;
  gap: 6px;
}
.cust-page #custFamiliarFilterSheet .cust-filter-item label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cust-page #custFamiliarFilterSheet .cust-filter-item select {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #b7e4d8;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  box-shadow:
    0 8px 16px rgba(13, 122, 134, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  appearance: none;
  background-image:
    linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230f766e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 12px center;
  background-size: auto, 12px 8px;
  padding-right: 32px;
}
.cust-page #custFamiliarFilterSheet .cust-filter-item select:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18), 0 8px 16px rgba(13, 122, 134, 0.14);
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-actions {
  margin: 0;
  justify-content: flex-end;
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-actions .cust-filter-reset-btn {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: linear-gradient(180deg, #14b8a6 0%, #0f766e 58%, #115e59 100%);
  color: #fff;
  box-shadow:
    0 10px 18px rgba(15, 118, 110, 0.28),
    0 2px 0 rgba(255, 255, 255, 0.35) inset,
    0 -2px 0 rgba(6, 78, 59, 0.28) inset;
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-actions .cust-filter-reset-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.cust-page #custFamiliarFilterSheet .cust-fam-filter-actions .cust-filter-reset-btn:active {
  transform: translateY(1px);
}

@media (max-width: 720px) {
  .cust-page #custFamiliarFilterSheet.cust-fam-filter-sheet {
    align-items: flex-end;
    padding: 0;
  }
  .cust-page #custFamiliarFilterSheet .cust-fam-filter-panel {
    width: 100%;
    max-height: min(92vh, 760px);
    border-radius: 22px 22px 0 0;
  }
  .cust-page #custFamiliarFilterSheet .cust-fam-filter-row.is-3,
  .cust-page #custFamiliarFilterSheet .cust-fam-filter-row.is-sort {
    grid-template-columns: 1fr 1fr;
  }
  .cust-page #custFamiliarFilterSheet .cust-fam-filter-row.is-sort .cust-fam-filter-actions {
    grid-column: 1 / -1;
  }
  .cust-page #custFamiliarFilterSheet .cust-fam-filter-actions .cust-filter-reset-btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .cust-page #custFamiliarFilterSheet .cust-fam-filter-row.is-2,
  .cust-page #custFamiliarFilterSheet .cust-fam-filter-row.is-3 {
    grid-template-columns: 1fr;
  }
}

html.desk-ui .cust-page #custFamiliarFilterSheet .cust-fam-filter-grid.cust-familiar-filters {
  grid-template-columns: none;
}

/* ==========================================================================
   CUST EDIT & SUPPLEMENT NEED (SỬA / BỔ SUNG NHU CẦU KHÁCH HÀNG)
   ========================================================================== */
.cust-edit-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  border: 1px solid #0d9488;
  background: linear-gradient(180deg, #f0fdfa, #ccfbf1);
  color: #0f766e !important;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(13, 148, 136, 0.15);
  transition: all 0.15s ease;
  vertical-align: middle;
}
.cust-edit-chip-btn:hover {
  background: #0d9488;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}
.cust-edit-chip-btn:active {
  transform: translateY(0);
}

.cust-interact-btn.cust-edit-btn {
  border-color: #0d9488 !important;
  background: #f0fdfa !important;
  color: #0f766e !important;
  font-weight: 700 !important;
}
.cust-interact-btn.cust-edit-btn:hover {
  background: #0d9488 !important;
  color: #ffffff !important;
}

.cust-row-actions-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.cust-row-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid #0d9488 !important;
  background: #f0fdfa !important;
  color: #0f766e !important;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cust-row-edit:hover {
  background: #0d9488 !important;
  color: #ffffff !important;
}

/* Modal Content & Body */
.cust-edit-need-modal-content {
  width: min(660px, calc(100vw - 20px));
  max-height: calc(100dvh - 36px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.cust-edit-need-body {
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

.cust-edit-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.cust-edit-section-title {
  font-weight: 800;
  font-size: 13.5px;
  color: #0f766e;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cust-edit-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.cust-edit-row {
  margin-bottom: 10px;
}

.cust-edit-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.cust-edit-input,
.cust-edit-select,
.cust-edit-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 13.5px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cust-edit-input:focus,
.cust-edit-select:focus,
.cust-edit-textarea:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.cust-edit-input-group {
  display: flex;
  gap: 6px;
  align-items: center;
}
.cust-edit-input-group .cust-edit-input {
  flex: 1 1 auto;
}
.cust-edit-input-group .cust-secondary {
  flex: 0 0 auto;
  padding: 8px 12px;
  height: 38px;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 8px;
}

.cust-edit-textarea {
  resize: vertical;
  min-height: 64px;
  line-height: 1.4;
}

.cust-edit-msg {
  font-size: 13px;
  margin-bottom: 10px;
  min-height: 18px;
}
.cust-edit-msg.is-error {
  color: #dc2626;
  font-weight: 600;
}
.cust-edit-msg.is-success {
  color: #059669;
  font-weight: 700;
}

.cust-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.cust-edit-actions button {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
}

@media (max-width: 600px) {
  .cust-edit-grid-2 {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .cust-edit-need-body {
    padding: 12px;
  }
  .cust-edit-actions button {
    flex: 1 1 50%;
  }
}

/* --- Map Link & Coordinates Column --- */
.cust-page .cust-td-maplink,
.cust-page .cust-th-maplink {
  min-width: 170px;
}
.cust-page .cust-inline-edit-maplink {
  flex: 1 1 auto;
  min-width: 120px;
  max-width: 240px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 11.5px;
  outline: none;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cust-page .cust-inline-edit-maplink:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(13,148,136,0.15);
}
.cust-page .cust-map-pin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #16a34a;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  transition: all .15s ease;
  cursor: pointer;
}
.cust-page .cust-map-pin-btn:hover {
  background: #dcfce7;
  border-color: #4ade80;
  transform: translateY(-1px);
}
.cust-page .status-cho_thue {
  background: #fdf4ff;
  color: #a21caf;
  border: 1px solid #f0abfc;
}


