/* CRM_CUSTOMER_ACTIVITY_LOG_UI_V1 */
.gov-page-head{overflow:visible}
.gov-filter-grid{
  display:grid;
  grid-template-columns:minmax(260px,1.6fr) repeat(4,minmax(140px,1fr));
  gap:12px;
  align-items:end
}
.gov-filter-grid .gov-search{grid-column:span 2}
.gov-filter-actions{display:flex;gap:8px}
.gov-customer-table{min-width:1320px}
.gov-customer-table td small,.gov-request-table td small,.gov-assignment-table td small,.gov-subtable td small{
  display:block;margin-top:4px;color:var(--muted);font-weight:500
}
.gov-customer-link{
  border:0;background:transparent;padding:0;color:var(--accent);font-weight:800;text-align:left
}
.gov-customer-link:hover{text-decoration:underline}
.gov-quick-assign{
  display:block;margin-top:7px;padding:5px 9px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:var(--accent);font-weight:700
}
.gov-pagination{
  display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px
}
.gov-pagination button:disabled{opacity:.45;cursor:not-allowed}
.gov-empty{display:grid;place-items:center;gap:5px;min-height:140px;text-align:center}
.governance-dialog{width:min(820px,calc(100% - 24px))}
.governance-dialog.governance-wide{width:min(1080px,calc(100% - 24px))}
.governance-dialog .modal-card{max-height:calc(100vh - 28px);overflow:auto}
.gov-modal-heading{
  display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding-right:32px;margin-bottom:16px
}
.gov-modal-heading h3{margin:0;font-size:24px}
.gov-modal-heading p{margin:4px 0 0}
.gov-form{display:grid;gap:14px}
.gov-section{
  padding:15px;border:1px solid var(--line);border-radius:16px;background:#fff;margin-top:12px
}
.gov-section-head{
  display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:13px
}
.gov-section-head>b{font-size:15px}
.gov-section-head>span{font-size:12px;color:var(--muted);text-align:right}
.gov-footer{
  position:sticky;bottom:-23px;display:flex;justify-content:flex-end;gap:9px;
  margin:0 -23px -23px;padding:14px 23px;border-top:1px solid var(--line);
  background:rgba(255,255,255,.96);backdrop-filter:blur(12px);z-index:5
}
.gov-duplicate{display:grid;gap:8px;padding:13px;border:1px solid var(--line);border-radius:13px;background:#f8fafc}
.gov-duplicate.clear{border-color:#bde3d5;background:#eefaf5;color:var(--good)}
.gov-duplicate.warning{border-color:#efd8a7;background:#fffaf0;color:var(--warn)}
.gov-duplicate.hard{border-color:#f2bcc2;background:#fff2f3;color:var(--bad)}
.gov-duplicate-row{display:flex;justify-content:space-between;gap:12px;padding:8px;border-radius:9px;background:rgba(255,255,255,.8)}
.gov-override{display:grid;gap:10px;margin-top:10px;padding:12px;border:1px dashed #d8a44d;border-radius:13px}
.gov-profile-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.gov-details>div{min-height:72px}
.gov-assignment-table{min-width:760px}
.gov-subtable{min-width:760px}
.gov-request-toolbar{display:flex;align-items:end;gap:10px;margin-top:12px}
.gov-request-toolbar label{width:min(260px,100%)}
.gov-request-table{min-width:1180px}
.gov-tax-chip,.gov-final-chip{
  display:inline-flex;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:800
}
.gov-tax-chip{background:#fff3d8;color:#8b5b00}
.gov-final-chip{background:#eaf2ff;color:#245ba7}
.badge.DRAFT{background:#edf2f7;color:#4a5568}
.badge.PENDING_TAX_APPROVAL{background:#fff3d8;color:#8b5b00}
.badge.TAX_APPROVED{background:#e8f8f1;color:#257a59}
.badge.PENDING_FINAL_APPROVAL{background:#eaf2ff;color:#245ba7}
.badge.APPROVED{background:#e8f8f1;color:#257a59}
.badge.REJECTED{background:#fdebec;color:var(--bad)}
.badge.CANCELLED{background:#edf2f7;color:#64748b}
.badge.ARCHIVED{background:#f1eafe;color:#6846a5}
.badge.INACTIVE{background:#fdebec;color:var(--bad)}
.gov-diff-table{min-width:900px}
.gov-diff-table tr.changed td{background:#fffaf0}
.gov-diff-table pre{white-space:pre-wrap;word-break:break-word;margin:0;font:inherit}
.gov-review-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:14px}
.danger-button{background:var(--bad);color:#fff;border:0}
.ghost.danger{color:var(--bad);border-color:#efb7bd}
.gov-log-tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);padding-bottom:8px}
.gov-log-tabs button{background:transparent;border:0;padding:8px 10px;color:var(--muted);font-weight:700}
.gov-log-tabs button.active{color:var(--accent);border-bottom:2px solid var(--accent)}
.gov-log-placeholder{display:grid;place-items:center;gap:5px;min-height:120px;text-align:center}
.mobile-nav.governance-mobile-nav{grid-template-columns:repeat(7,1fr)}
#govCustomerCodePreview{background:#f7f9fc;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:800}

@media(max-width:1200px){
  .gov-filter-grid{grid-template-columns:repeat(3,minmax(160px,1fr))}
  .gov-filter-grid .gov-search{grid-column:span 2}
}
@media(max-width:720px){
  .gov-filter-grid{grid-template-columns:1fr}
  .gov-filter-grid .gov-search{grid-column:auto}
  .gov-modal-heading,.gov-section-head{flex-direction:column;align-items:flex-start}
  .gov-section-head>span{text-align:left}
  .gov-profile-actions,.gov-review-actions{flex-direction:column}
  .gov-profile-actions button,.gov-review-actions button{width:100%}
  .gov-footer{bottom:-23px;flex-wrap:wrap}
  .gov-footer button{flex:1}
  .mobile-nav.governance-mobile-nav{grid-template-columns:repeat(7,1fr)}
  .mobile-nav.governance-mobile-nav button{font-size:8px}
}


/* Approval Center v2 */
.gov-pending-note{
  display:flex;align-items:center;gap:10px;margin:0 0 14px;padding:11px 13px;
  border:1px solid #d7e3f5;border-radius:12px;background:#f5f8fd
}
.gov-pending-note span{color:var(--muted);font-size:12px}
.gov-pending-row td{background:#fffdf8}
.gov-compact-actions{display:flex;flex-wrap:wrap;gap:6px;min-width:190px}
.gov-compact-actions button{padding:6px 9px;font-size:12px;white-space:nowrap}
.gov-approval-hero{overflow:visible}
.gov-approval-tabs{
  display:flex;gap:8px;margin:14px 0;padding-bottom:10px;border-bottom:1px solid var(--line)
}
.gov-approval-tabs button{
  border:1px solid transparent;border-radius:10px;background:transparent;
  padding:8px 12px;color:var(--muted);font-weight:750
}
.gov-approval-tabs button.active{
  border-color:#cbd8ef;background:#eef4ff;color:var(--accent)
}
.gov-approval-filter-grid{
  display:grid;grid-template-columns:repeat(5,minmax(145px,1fr)) auto;
  gap:12px;align-items:end
}
.gov-approval-table{min-width:1480px}
.gov-approval-table td small{
  display:block;margin-top:4px;color:var(--muted);font-weight:500
}
.gov-module-chip{
  display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;
  font-size:11px;font-weight:800;white-space:nowrap
}
.gov-module-chip.CUSTOMER{background:#eaf2ff;color:#245ba7}
.gov-module-empty{min-height:180px}
.gov-pending-customer-table{min-width:1380px}
.mobile-nav.governance-mobile-nav{grid-template-columns:repeat(7,1fr)}

@media(max-width:1200px){
  .gov-approval-filter-grid{grid-template-columns:repeat(3,minmax(150px,1fr))}
}
@media(max-width:720px){
  .gov-pending-note{align-items:flex-start;flex-direction:column}
  .gov-approval-tabs{overflow:auto}
  .gov-approval-tabs button{white-space:nowrap}
  .gov-approval-filter-grid{grid-template-columns:1fr}
  .gov-compact-actions{min-width:160px}
}


.gov-activity-section .gov-section-head>div{display:grid;gap:3px}
.gov-log-tabs button{display:flex;align-items:center;gap:7px}
.gov-log-tabs button span{
  min-width:22px;padding:2px 6px;border-radius:999px;background:#eef2f7;
  color:var(--muted);font-size:10px;text-align:center
}
.gov-log-tabs button.active span{background:rgba(52,93,255,.12);color:var(--accent)}
.gov-activity-content{min-height:150px;padding-top:12px}
.gov-activity-timeline,.gov-history-list,.gov-email-list{display:grid;gap:12px}
.gov-activity-card,.gov-history-card,.gov-email-card{
  display:grid;grid-template-columns:auto 1fr;gap:12px;padding:14px;border:1px solid var(--line);
  border-radius:14px;background:#fff
}
.gov-history-card{display:block}
.gov-activity-dot{
  width:12px;height:12px;margin-top:6px;border-radius:999px;background:#8aa0b8;
  box-shadow:0 0 0 5px #edf2f7
}
.gov-activity-dot.QUOTE{background:#7559d7;box-shadow:0 0 0 5px #f1edff}
.gov-activity-dot.ORDER{background:#2d8f69;box-shadow:0 0 0 5px #e8f8f1}
.gov-activity-dot.INQUIRY,.gov-activity-dot.LEAD{background:#2f6fd6;box-shadow:0 0 0 5px #eaf2ff}
.gov-activity-dot.RETURN_REQUEST{background:#d7792c;box-shadow:0 0 0 5px #fff0e2}
.gov-activity-dot.PAYMENT{background:#148e9d;box-shadow:0 0 0 5px #e4f8fa}
.gov-activity-content,.gov-email-content{min-width:0}
.gov-activity-card-head,.gov-history-head{
  display:flex;justify-content:space-between;align-items:flex-start;gap:14px
}
.gov-activity-card-head>div,.gov-history-head>div{display:grid;gap:3px}
.gov-activity-card-head time,.gov-history-head time{font-size:11px;color:var(--muted);white-space:nowrap}
.gov-activity-type,.gov-history-category{
  color:var(--accent);font-size:10px;font-weight:800;letter-spacing:.04em;text-transform:uppercase
}
.gov-activity-meta{
  display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:8px;color:var(--muted);font-size:12px
}
.gov-activity-meta b{color:var(--text)}
.gov-activity-card p,.gov-email-card p{margin:10px 0 0;white-space:pre-wrap;line-height:1.5}
.gov-activity-link{display:inline-flex;margin-top:10px;color:var(--accent);font-weight:700}
.gov-activity-empty{
  display:grid;place-items:center;gap:5px;min-height:145px;padding:20px;text-align:center;
  border:1px dashed var(--line);border-radius:14px;background:#fafbfd
}
.gov-history-category{color:#6a4ab0}
.gov-history-diff{margin-top:10px;border-top:1px solid var(--line);padding-top:9px}
.gov-history-diff summary{cursor:pointer;color:var(--accent);font-weight:700}
.gov-history-diff-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px
}
.gov-history-diff-grid>div{min-width:0;padding:10px;border-radius:10px;background:#f8fafc}
.gov-history-diff-grid small{display:block;margin-bottom:6px;color:var(--muted);font-weight:700}
.gov-history-diff-grid pre{
  margin:0;white-space:pre-wrap;word-break:break-word;font-size:11px;line-height:1.45
}
.gov-email-direction{
  display:grid;place-items:center;width:30px;height:30px;border-radius:999px;
  background:#eef2f7;color:#5d6b7b;font-weight:900
}
.gov-email-direction.INBOUND{background:#e8f8f1;color:#257a59}
.gov-email-direction.OUTBOUND{background:#eaf2ff;color:#245ba7}
.gov-email-addresses{display:grid;gap:3px;margin-top:8px;font-size:12px;color:var(--muted)}
.gov-email-addresses b{color:var(--text)}
.gov-integration-note{
  display:grid;gap:4px;margin-top:10px;padding:12px;border-radius:12px;background:#f8fafc;
  border:1px solid var(--line)
}
.gov-integration-note span{font-size:12px;color:var(--muted)}
@media(max-width:720px){
  .gov-activity-card,.gov-email-card{grid-template-columns:1fr}
  .gov-activity-dot{display:none}
  .gov-activity-card-head,.gov-history-head{flex-direction:column}
  .gov-history-diff-grid{grid-template-columns:1fr}
  .gov-log-tabs{overflow-x:auto}
  .gov-log-tabs button{white-space:nowrap}
}
