/* NDTECHS_CRM_CUSTOMER_WORKSPACE_V3 */
#modal.customer-v3-dialog {
  width: min(98vw, 1560px);
  max-width: 98vw;
  padding: 0;
}
#modal.customer-v3-dialog .modal-card {
  width: 100%;
  max-width: none;
  max-height: 94vh;
  padding: 0;
  overflow: hidden;
}
#modal.customer-v3-dialog #modalBody { max-height: 94vh; overflow: auto; }
#modal.customer-v3-dialog .close { position: fixed; z-index: 30; right: max(2vw, 18px); top: max(3vh, 18px); }
.customer-v3-shell { --v3-line:#dbe4ee; --v3-soft:#f7f9fc; --v3-text:#18324a; color:var(--v3-text); padding-bottom:90px; }
.customer-v3-hero { position:sticky; top:0; z-index:12; display:flex; justify-content:space-between; gap:24px; align-items:flex-start; padding:26px 34px 20px; border-bottom:1px solid var(--v3-line); background:rgba(255,255,255,.97); backdrop-filter:blur(12px); }
.customer-v3-hero h2 { margin:3px 0 4px; font-size:clamp(22px,2vw,31px); }
.customer-v3-hero p { margin:0; }
.customer-v3-request-note { display:grid; grid-template-columns:150px 1fr; gap:12px; margin:18px 28px 0; padding:13px 16px; border:1px solid #f0d48b; border-radius:12px; background:#fff9e8; }
.customer-v3-section { margin:18px 28px; border:1px solid var(--v3-line); border-radius:16px; background:#fff; box-shadow:0 8px 24px rgba(28,50,72,.045); }
.customer-v3-main-section { padding:20px; }
.customer-v3-section-head { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:16px; }
.customer-v3-section-head h3 { margin:0 0 3px; }
.customer-v3-section-head span, .customer-v3-section summary small { display:block; color:#718096; font-weight:400; }
.customer-v3-section summary { cursor:pointer; list-style:none; display:flex; align-items:center; justify-content:space-between; padding:17px 20px; border-radius:16px; user-select:none; }
.customer-v3-section summary::-webkit-details-marker { display:none; }
.customer-v3-section summary::after { content:'⌄'; font-size:20px; transition:.2s; }
.customer-v3-section[open] summary::after { transform:rotate(180deg); }
.customer-v3-section[open] summary { border-bottom:1px solid var(--v3-line); border-radius:16px 16px 0 0; }
.customer-v3-details-body { padding:18px 20px 20px; }
.customer-v3-form-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px 16px; }
.customer-v3-form-grid label { display:flex; flex-direction:column; gap:6px; min-width:0; font-size:13px; font-weight:600; }
.customer-v3-form-grid input, .customer-v3-form-grid select, .customer-v3-form-grid textarea, .customer-v3-reason input { width:100%; min-height:40px; border:1px solid #cdd8e4; border-radius:9px; padding:9px 11px; background:#fff; color:#18324a; }
.customer-v3-form-grid textarea { min-height:76px; resize:vertical; }
.customer-v3-form-grid input:disabled, .customer-v3-form-grid select:disabled, .customer-v3-form-grid textarea:disabled { opacity:1; color:#2f4558; background:#f5f7fa; border-color:#e4e9ef; }
.customer-v3-form-grid .span-2 { grid-column:span 2; }
.customer-v3-copy { flex-direction:row!important; align-items:center; padding:10px 12px; border:1px dashed #b8c8d8; border-radius:10px; background:var(--v3-soft); }
.customer-v3-copy input { width:auto; min-height:auto; }
.customer-v3-repeat-card { border:1px solid #dbe4ee; border-radius:13px; padding:15px; margin-bottom:13px; background:#fbfcfe; }
.customer-v3-repeat-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:13px; }
.customer-v3-empty, .customer-v3-empty-state { display:flex; flex-direction:column; gap:5px; padding:18px; border:1px dashed #cbd6e2; border-radius:12px; color:#64778a; background:#fafcff; }
.customer-v3-tabs { margin:18px 28px; border:1px solid var(--v3-line); border-radius:16px; overflow:hidden; background:#fff; }
.customer-v3-tabbar { display:flex; gap:4px; padding:8px 10px; border-bottom:1px solid var(--v3-line); background:#f7f9fc; overflow:auto; }
.customer-v3-tabbar button { border:0; background:transparent; border-radius:9px; padding:10px 15px; white-space:nowrap; font-weight:700; color:#52677a; }
.customer-v3-tabbar button.active { background:#fff; color:#0e5da8; box-shadow:0 2px 7px rgba(20,56,90,.1); }
#customerV3TabBody { min-height:130px; padding:17px; }
.customer-v3-activity-list { display:grid; gap:8px; }
.customer-v3-activity-list button { display:flex; justify-content:space-between; gap:18px; text-align:left; padding:12px 14px; border:1px solid #dfe7ef; border-radius:11px; background:#fff; color:inherit; }
.customer-v3-activity-list button span { display:flex; flex-direction:column; gap:3px; }
.customer-v3-activity-list button span:last-child { text-align:right; }
.customer-v3-activity-list small, .customer-v3-timeline span { color:#748598; }
.customer-v3-timeline { display:grid; gap:12px; }
.customer-v3-timeline article { border-left:3px solid #8db7dd; padding:4px 0 4px 15px; }
.customer-v3-timeline article>div { display:flex; justify-content:space-between; gap:18px; }
.customer-v3-timeline pre { white-space:pre-wrap; margin:8px 0 0; padding:10px; border-radius:8px; background:#f6f8fb; font:12px/1.5 ui-monospace,monospace; }
.customer-v3-actionbar { position:sticky; bottom:0; z-index:15; display:grid; grid-template-columns:minmax(240px,1fr) auto; align-items:end; gap:15px; padding:13px 28px; border-top:1px solid var(--v3-line); background:rgba(255,255,255,.97); backdrop-filter:blur(12px); }
.customer-v3-reason { display:flex; flex-direction:column; gap:5px; font-size:12px; font-weight:700; }
.customer-v3-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; }
.customer-v3-actionbar .error { grid-column:1/-1; margin:0; }
.customer-v3-list-head .actions { display:flex; flex-wrap:wrap; gap:8px; }
.customer-v3-list-filters { display:grid; grid-template-columns:2fr repeat(4,minmax(130px,1fr)) auto; gap:10px; margin-top:16px; }
.customer-v3-list-filters input, .customer-v3-list-filters select { min-height:40px; }
.customer-v3-list-table td small { display:block; margin-top:3px; color:#738497; }
.customer-v3-pending-row { background:#fffaf0; }
.customer-v3-pagination { display:flex; justify-content:flex-end; align-items:center; gap:10px; padding:12px 0 0; }
.customer-v3-launch { text-align:center; padding:40px; }
@media (max-width:1100px) {
  .customer-v3-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-v3-list-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:680px) {
  #modal.customer-v3-dialog { width:100vw; max-width:100vw; margin:0; height:100vh; max-height:100vh; border-radius:0; }
  #modal.customer-v3-dialog .modal-card, #modal.customer-v3-dialog #modalBody { max-height:100vh; }
  .customer-v3-hero { padding:20px 18px 15px; }
  .customer-v3-section, .customer-v3-tabs { margin:12px; }
  .customer-v3-form-grid { grid-template-columns:1fr; }
  .customer-v3-form-grid .span-2 { grid-column:span 1; }
  .customer-v3-actionbar { grid-template-columns:1fr; padding:12px; }
  .customer-v3-actions { justify-content:stretch; }
  .customer-v3-actions button { flex:1; }
  .customer-v3-list-filters { grid-template-columns:1fr; }
}

/* CUSTOMER_TAX_LOOKUP_V31 */
.customer-v3-tax-lookup-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.customer-v3-tax-lookup-control .ghost { white-space: nowrap; }
.customer-v3-tax-verification {
  border: 1px solid var(--line, #dbe3ec);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 14px;
}
.customer-v3-tax-verification div { display: grid; gap: 3px; }
.customer-v3-tax-verification span,
.customer-v3-tax-verification small { color: var(--muted, #64748b); }
.customer-v3-tax-lookup-result {
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  padding: 14px;
  display: grid;
  gap: 12px;
}
.customer-v3-tax-lookup-result table { background: #fff; }
.customer-v3-tax-lookup-result tr.is-changed td { background: #fff7ed; }
.customer-v3-tax-lookup-result th { white-space: nowrap; }
.customer-v3-tax-lookup-result .actions { justify-content: flex-end; }
@media (max-width: 720px) {
  .customer-v3-tax-lookup-control { grid-template-columns: 1fr; }
  .customer-v3-tax-lookup-control .ghost { width: 100%; }
}


/* CUSTOMER_WORKSPACE_V32 */
.customer-v3-actionbar-compact { grid-template-columns: 1fr; }
.customer-v3-actionbar-compact .customer-v3-actions { justify-content: flex-end; }
.customer-v3-reason textarea { min-height: 64px; resize: vertical; }
.customer-v3-linked-toolbar { margin-bottom: 10px; color: var(--muted, #64748b); font-size: 13px; }
.customer-v3-mail-status { display:grid; gap:5px; margin-bottom:12px; padding:12px 14px; border:1px solid #dbe4ee; border-radius:12px; }
.customer-v3-mail-status div { display:flex; justify-content:space-between; gap:12px; }
.customer-v3-mail-status span, .customer-v3-mail-status small { color:var(--muted, #64748b); }
.customer-v3-mail-status.is-connected { background:#f0fdf4; border-color:#bbf7d0; }
.customer-v3-mail-status.is-disconnected { background:#fffaf0; border-color:#fed7aa; }
.customer-v3-activity-list button:disabled { cursor:not-allowed; opacity:.72; }


/* CUSTOMER_GOVERNANCE_V33 */
.customer-v3-duplicate-note { display:block; margin-top:2px; padding:5px 7px; border-radius:7px; font-size:11px; font-weight:600; line-height:1.35; }
.customer-v3-duplicate-note.is-neutral, .customer-v3-duplicate-summary.is-neutral { color:#5f7184; background:#f4f7fa; border-color:#dbe4ec; }
.customer-v3-duplicate-note.is-ok, .customer-v3-duplicate-summary.is-ok { color:#166534; background:#f0fdf4; border-color:#bbf7d0; }
.customer-v3-duplicate-note.is-warning, .customer-v3-duplicate-summary.is-warning { color:#92400e; background:#fffbeb; border-color:#fde68a; }
.customer-v3-duplicate-note.is-danger, .customer-v3-duplicate-summary.is-danger { color:#991b1b; background:#fef2f2; border-color:#fecaca; }
.customer-v3-duplicate-summary { display:grid; gap:6px; margin-top:14px; padding:10px 12px; border:1px solid; border-radius:10px; font-size:12px; }
.customer-v3-duplicate-match-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:7px; }
.customer-v3-duplicate-match-list span { display:grid; gap:2px; padding:7px 9px; border-radius:8px; background:rgba(255,255,255,.72); }
.customer-v3-duplicate-match-list small { color:inherit; opacity:.82; }
.customer-v3-inline-note { grid-column:span 2; display:grid; gap:3px; align-content:center; min-height:40px; padding:8px 11px; border:1px dashed #cbd5e1; border-radius:9px; color:#52677a; background:#f8fafc; font-size:12px; }
.customer-v3-actionbar .danger { color:#b42318; border-color:#f3b7b2; background:#fff7f6; }
.customer-v3-filter-row { display:flex; flex-wrap:wrap; align-items:end; gap:9px; margin-top:10px; padding-top:10px; border-top:1px solid var(--v3-line); }
.customer-v3-filter-row>label { display:grid; gap:4px; color:#66788b; font-size:11px; font-weight:700; }
.customer-v3-filter-row input { min-height:36px; padding:7px 9px; border:1px solid #cdd8e4; border-radius:8px; }
.customer-v3-range-chips { display:flex; flex-wrap:wrap; gap:5px; margin-right:auto; }
.customer-v3-range-chips .ghost { min-height:34px; padding:6px 10px; border-radius:999px; font-size:12px; }
.customer-v3-range-chips .is-active { color:#0e5da8; border-color:#93c5fd; background:#eff6ff; }
.customer-v3-table-tools { position:relative; display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:9px; }
.customer-v3-column-picker { position:relative; }
.customer-v3-column-picker>#v3ColumnToggle { min-height:34px; padding:6px 10px; font-size:12px; }
.customer-v3-column-popover { position:absolute; z-index:30; top:calc(100% + 6px); right:0; width:240px; padding:9px; border:1px solid #d7e0e9; border-radius:11px; background:#fff; box-shadow:0 14px 34px rgba(35,55,75,.17); }
.customer-v3-column-popover[hidden] { display:none; }
.customer-v3-column-popover>label { display:flex; align-items:center; gap:8px; min-height:30px; padding:5px 7px; border-radius:7px; color:#33485c; font-size:12px; }
.customer-v3-column-popover>label:hover { background:#f4f7fa; }
.customer-v3-column-popover input { width:14px; height:14px; margin:0; }
.customer-v3-column-popover>div { display:flex; justify-content:flex-end; padding-top:7px; border-top:1px solid #edf1f5; }
.customer-v3-list-table th { white-space:nowrap; }
.customer-v3-list-table td { min-width:112px; vertical-align:top; }
.customer-v3-list-table td:first-child { min-width:190px; }
@media (max-width:680px) {
  .customer-v3-inline-note { grid-column:span 1; }
  .customer-v3-filter-row { align-items:stretch; }
  .customer-v3-filter-row>label { flex:1 1 140px; }
  .customer-v3-table-tools { align-items:flex-start; }
}

/* CUSTOMER_UI_HOTFIX_V332 */
.customer-v3-table-tools { position:relative; overflow:visible; min-height:36px; }
.customer-v3-column-picker { position:relative; margin:0; }
.customer-v3-column-picker>summary { list-style:none; cursor:pointer; user-select:none; white-space:nowrap; }
.customer-v3-column-picker>summary::-webkit-details-marker { display:none; }
.customer-v3-column-summary { display:inline-flex; align-items:center; min-height:32px; padding:6px 10px; font-size:12px; }
.customer-v3-column-picker[open] .customer-v3-column-summary { background:#eef4f8; border-color:#c7d6e2; }
.customer-v3-column-picker .customer-v3-column-popover { top:calc(100% + 6px); right:0; width:220px; max-height:360px; overflow:auto; }
