﻿/* K5 CRM theme ? aligned with kore-crm-prototype-v2.html */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* Label scale ? micro labels bumped site-wide (was often 10?11px) */
:root {
  --crm-fs-label: 13px;
  --crm-fs-label-sm: 12px;
  --crm-fs-label-xs: 11px;
}

/* Top navbar page title (PageTitle content placeholder) */
.crm-navbar-title-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  margin: 0;
  padding: 0;
  height: auto;
  font-size: inherit;
  line-height: 1.3;
  white-space: normal;
}

.crm-topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  line-height: 1.35;
  min-width: 0;
  flex-wrap: wrap;
  margin: 0;
}

.crm-bc-kicker {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a9ab0;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  margin-right: 2px;
}

a.crm-bc-kicker-link {
  display: inline-block;
  color: #8a9ab0 !important;
  text-decoration: none !important;
  transition: color 0.15s ease, background 0.15s ease;
}

a.crm-bc-kicker-link:hover,
a.crm-bc-kicker-link:focus {
  color: #1a6fd4 !important;
  background: #e8f0fb;
  text-decoration: none !important;
}

.crm-bc-link {
  color: #1a6fd4 !important;
  font-weight: 500;
  text-decoration: none !important;
  white-space: nowrap;
}

.crm-bc-link:hover {
  color: #1558a8 !important;
  text-decoration: underline !important;
}

.crm-bc-sep {
  color: #cbd5e1;
  font-weight: 400;
  user-select: none;
}

.crm-bc-current {
  color: #1e293b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(420px, 55vw);
}

@media (max-width: 768px) {
  .crm-bc-current { max-width: 200px; }
}

/* CRM type scale (auxiliary ? body): 11 / 12 / 13 / 14 / 15px ? bumped +1px from prototype */
.crm-page {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #1a1d23;
}

.crm-page .card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-page .card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.875rem 1.25rem;
}

.crm-page .card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

/* Summary stat row (contact list) ? equal flex tiles fill full width */
.crm-summary-stats {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  margin-bottom: 1.125rem;
  box-sizing: border-box;
}

.crm-summary-stats > .crm-stat-card {
  flex: 1 1 0;
  min-width: 0;
}

@media (max-width: 1200px) {
  .crm-summary-stats {
    flex-wrap: wrap;
    gap: 8px;
  }
  .crm-summary-stats > .crm-stat-card {
    flex: 1 1 calc(25% - 6px);
    min-width: 120px;
  }
  .crm-summary-stats .crm-stat-card { padding: 12px 10px; }
  .crm-summary-stats .crm-stat-val { font-size: 18px; }
}

@media (max-width: 992px) {
  .crm-summary-stats > .crm-stat-card { flex: 1 1 calc(33.333% - 6px); }
}

@media (max-width: 576px) {
  .crm-summary-stats > .crm-stat-card { flex: 1 1 calc(50% - 4px); }
}

@media (max-width: 400px) {
  .crm-summary-stats > .crm-stat-card { flex: 1 1 100%; }
}

/* Summary tab ? two-column card layout (prototype) */
.crm-summary-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 992px) {
  .crm-summary-two-col { grid-template-columns: 1fr; }
}

.crm-summary-side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.crm-summary-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.crm-summary-card-hdr .crm-summary-card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: #1a1d23;
}

.crm-summary-card-body {
  padding: 1rem 1.25rem 1.125rem;
}

.crm-add-form .crm-form-section {
  font-size: 13px;
  font-weight: 700;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.25rem 0 0.65rem;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.crm-add-form .crm-form-section:first-of-type {
  margin-top: 0;
}

.crm-add-form .crm-add-context-banner {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #c5ddf5;
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
  font-size: 14px;
  font-weight: 600;
  color: #1a4d8c;
}

.crm-add-form .card,
.crm-add-form .crm-add-section-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.crm-add-form .crm-add-section-card .card-body {
  overflow: visible;
}

.crm-add-form .crm-add-form-actions,
.crm-page .crm-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 0;
}

.crm-page .crm-form-actions.crm-form-actions-start {
  justify-content: flex-start;
}

.crm-add-form .crm-add-form-actions.crm-form-actions-start {
  justify-content: flex-start;
}

.crm-add-form .crm-add-form-actions {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.crm-add-form .crm-validation-summary {
  display: block;
  margin: 0 0 1rem;
  padding: 12px 14px 12px 14px;
  border: 1px solid #f1c2c2;
  border-radius: 10px;
  background: #fef2f2;
  color: #9b1c1c;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: none;
}

.crm-add-form .crm-validation-summary[style*="display:none"],
.crm-add-form .crm-validation-summary[style*="display: none"] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.crm-add-form .validator,
.crm-add-form span.validator,
.crm-page.crm-add-form .form-group > span[id*="Validator"] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  color: #9b1c1c;
  font-weight: 600;
}

.crm-add-form .crm-validation-summary ul {
  margin: 6px 0 0;
  padding-left: 1.15rem;
}

.crm-add-form .crm-validation-summary li {
  margin: 0 0 2px;
  color: #9b1c1c;
  font-weight: 400;
}

.crm-add-form .crm-validation-summary a {
  color: #9b1c1c;
  text-decoration: underline;
}

.crm-summary-edit-page .crm-validation-summary:not([style*="display:none"]):not([style*="display: none"]) {
  position: sticky;
  top: 0;
  z-index: 1035;
}

.crm-add-form .crm-field-error,
.crm-summary-edit-page .crm-field-error,
.crm-page .crm-field-error {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
  color: #d13232;
  font-weight: 500;
}

.crm-add-form .crm-field-error[style*="display:none"],
.crm-add-form .crm-field-error[style*="display: none"],
.crm-summary-edit-page .crm-field-error[style*="display:none"],
.crm-summary-edit-page .crm-field-error[style*="display: none"],
.crm-page .crm-field-error[style*="display:none"],
.crm-page .crm-field-error[style*="display: none"] {
  display: none !important;
}

.crm-add-form .form-control.is-invalid,
.crm-add-form .form-select.is-invalid,
.crm-summary-edit-page .form-control.is-invalid,
.crm-summary-edit-page .form-select.is-invalid,
.crm-page .form-control.is-invalid,
.crm-page .form-select.is-invalid {
  border-color: #d13232 !important;
  box-shadow: 0 0 0 3px rgba(209, 50, 50, 0.12) !important;
}

.crm-add-form .crm-req-mark,
.crm-summary-edit-page .crm-req-mark {
  color: #d13232;
  font-weight: 700;
  margin-left: 2px;
}

/* Sticky/fixed bottom save bar ? same chrome as editsum.aspx save bar */
.crm-add-form {
  padding-bottom: 4.25rem;
}
.crm-add-form .crm-file-add-actions {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: auto;
  margin: 0 !important;
  padding: 10px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  border-top: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.08) !important;
}
.crm-shell .crm-add-form .crm-file-add-actions {
  left: 260px;
}
.crm-shell .main-panel.main-panel-expanded .crm-add-form .crm-file-add-actions {
  left: 80px;
}
@media (max-width: 991.98px) {
  .crm-shell .crm-add-form .crm-file-add-actions {
    left: 0;
  }
}

.crm-add-form .crm-file-add-actions .crm-btn,
.crm-add-form .crm-file-add-actions input.crm-btn {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 38px !important;
  height: 38px !important;
  max-height: 38px !important;
  min-width: 96px;
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 600;
  line-height: 1.3;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: none !important;
}

.crm-add-form .crm-file-add-actions .crm-btn-primary,
.crm-add-form .crm-file-add-actions input.crm-btn-primary {
  background: #1a6fd4 !important;
  border: 1px solid #1a6fd4 !important;
  color: #fff !important;
}

.crm-add-form .crm-file-add-actions .crm-btn-secondary,
.crm-add-form .crm-file-add-actions input.crm-btn-secondary {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

.crm-add-form .crm-file-add-actions .crm-btn-outline-primary,
.crm-add-form .crm-file-add-actions input.crm-btn-outline-primary {
  background: #fff !important;
  border: 1px solid #1a6fd4 !important;
  color: #1a6fd4 !important;
}

.crm-add-form .crm-file-edit-attachments {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
  margin-bottom: 1rem;
}

.crm-add-form .crm-file-edit-attachments .crm-check-item {
  margin-bottom: 10px !important;
}

.crm-add-form .crm-file-edit-filelist,
.crm-add-form table.crm-file-edit-filelist {
  list-style: none !important;
  width: 100% !important;
  margin: 0 0 12px !important;
  padding: 0 !important;
  border-collapse: collapse;
}

.crm-add-form .crm-file-edit-filelist > li,
.crm-add-form .crm-file-edit-filelist tr,
.crm-add-form .crm-file-edit-filelist td {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  width: 100% !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  float: none !important;
  border: 0 !important;
  background: transparent !important;
}

.crm-add-form .crm-file-edit-filelist tr {
  display: block !important;
  margin: 0 !important;
}

.crm-add-form .crm-file-edit-filelist td {
  display: grid !important;
}

.crm-add-form .crm-file-edit-filelist input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  float: none !important;
  position: static !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  width: 16px !important;
  height: 16px !important;
  accent-color: #1a6fd4;
}

.crm-add-form .crm-file-edit-filelist label {
  grid-column: 2;
  grid-row: 1;
  display: block !important;
  float: none !important;
  width: auto !important;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  font-family: inherit !important;
  color: #1a1d23 !important;
  line-height: 1.4 !important;
  white-space: normal;
  word-break: break-word;
}

.crm-add-form .crm-file-edit-filelist label font,
.crm-add-form .crm-file-edit-filelist label * {
  font-size: 14px !important;
  font-family: inherit !important;
  color: inherit !important;
}

.crm-add-form .crm-file-edit-bulk {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef2f6;
}

.crm-add-form .crm-file-edit-bulk-hint {
  font-size: 13px;
  color: #64748b;
}

.crm-add-form .crm-btn-danger-text {
  color: #b42318 !important;
  border-color: #f1c2c2 !important;
}

.crm-add-form .crm-btn-danger-text:hover {
  background: #fef2f2 !important;
  color: #912018 !important;
}

/* Shared form field look (match dashboard_edit.aspx) */
.crm-add-form .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
}

.crm-add-form .form-group {
  margin-bottom: 1rem;
}

.crm-add-form .form-group > label {
  display: block;
  font-size: var(--crm-fs-label, 13px);
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.crm-add-form .form-control,
.crm-add-form .form-select {
  display: block;
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background-color: #fff;
  color: #1a1d23;
  font-size: 14px;
  min-height: 38px;
  box-shadow: none;
}

.crm-add-form .form-select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 10px;
  -webkit-appearance: none;
  appearance: none;
}

.crm-add-form textarea.form-control {
  min-height: 140px;
}

.crm-add-form .form-control:focus,
.crm-add-form .form-select:focus {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
  outline: none;
}

.crm-add-form .form-group > span:not([id*="Validator"]),
.crm-add-form .form-group label.aspNetDisabled {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0;
  float: none;
  font-size: 14px;
  font-weight: 400;
  color: #1a1d23;
  line-height: 1.4;
}

.crm-add-form .form-group input[type="checkbox"] {
  float: none !important;
  position: static !important;
  margin: 0 !important;
  width: 16px;
  height: 16px;
  accent-color: #1a6fd4;
  vertical-align: middle;
}

.crm-add-form .form-group > span > label,
.crm-add-form .form-group span label {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #1a1d23 !important;
  line-height: 1.4;
}

/* Stacked checkboxes ? same left edge every row */
.crm-add-form .crm-check-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 1rem;
}

.crm-add-form .crm-check-item {
  display: grid !important;
  grid-template-columns: 18px 1fr;
  column-gap: 10px;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: 100%;
  max-width: 100%;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #1a1d23 !important;
  line-height: 1.4 !important;
  cursor: pointer;
}

.crm-add-form .crm-check-item > input[type="checkbox"],
.crm-add-form .crm-check-item > span:not(.crm-check-text),
.crm-add-form .crm-check-item > span:not(.crm-check-text) > input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  position: static !important;
  width: 16px !important;
  height: 16px !important;
  accent-color: #1a6fd4;
}

.crm-add-form .crm-check-item > span:not(.crm-check-text) {
  display: contents;
}

.crm-add-form .crm-check-item > span:not(.crm-check-text) > label {
  display: none !important;
}

.crm-add-form .crm-check-item .crm-check-text {
  grid-column: 2;
  grid-row: 1;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #1a1d23 !important;
  line-height: 1.4 !important;
}

.crm-add-form .uploadergrid,
.crm-add-form [id$="DropPanel"] {
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 28px 16px;
  margin-bottom: 12px;
  text-align: center;
}

.crm-add-form .uploadergrid p,
.crm-add-form [id$="DropPanel"] p {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 14px;
}

.crm-add-form [id$="InsertButton"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.crm-add-form [id$="InsertButton"]:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.crm-add-form .crm-btn,
.crm-add-form a.crm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
}

.crm-add-form .crm-btn-ghost:hover,
.crm-add-form .crm-btn-secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
}

.crm-add-form .crm-add-form-actions .crm-btn,
.crm-add-form .crm-add-form-actions input.crm-btn,
.crm-page .crm-form-actions .crm-btn,
.crm-page .crm-form-actions input.crm-btn,
.crm-page .crm-form-actions button.crm-btn,
.crm-editsum-save-bar a.crm-btn,
.crm-editsum-save-bar a.crm-editsum-save-btn,
.crm-summary-edit-page .crm-editsum-save-bar a.crm-btn,
.crm-summary-edit-page .crm-editsum-save-bar a.crm-editsum-save-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: 38px !important;
  height: 38px !important;
  max-height: 38px !important;
  min-width: 96px;
  padding: 8px 16px !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.crm-add-form .crm-add-form-actions .crm-btn-secondary:hover,
.crm-add-form .crm-add-form-actions .crm-btn-secondary:focus,
.crm-add-form .crm-add-form-actions input.crm-btn-secondary:hover,
.crm-add-form .crm-add-form-actions input.crm-btn-secondary:focus,
.crm-page .crm-form-actions .crm-btn-secondary:hover,
.crm-page .crm-form-actions .crm-btn-secondary:focus,
.crm-page .crm-form-actions input.crm-btn-secondary:hover,
.crm-page .crm-form-actions input.crm-btn-secondary:focus,
.crm-page .crm-form-actions button.crm-btn-secondary:hover,
.crm-page .crm-form-actions button.crm-btn-secondary:focus {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1a1d23;
}

.crm-add-form .crm-add-form-actions .crm-btn-primary,
.crm-add-form .crm-add-form-actions input.crm-btn-primary,
.crm-page .crm-form-actions .crm-btn-primary,
.crm-page .crm-form-actions input.crm-btn-primary,
.crm-page .crm-form-actions button.crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-add-form .crm-add-form-actions .crm-btn-primary:hover,
.crm-add-form .crm-add-form-actions .crm-btn-primary:focus,
.crm-add-form .crm-add-form-actions input.crm-btn-primary:hover,
.crm-add-form .crm-add-form-actions input.crm-btn-primary:focus,
.crm-page .crm-form-actions .crm-btn-primary:hover,
.crm-page .crm-form-actions .crm-btn-primary:focus,
.crm-page .crm-form-actions input.crm-btn-primary:hover,
.crm-page .crm-form-actions input.crm-btn-primary:focus,
.crm-page .crm-form-actions button.crm-btn-primary:hover,
.crm-page .crm-form-actions button.crm-btn-primary:focus {
  background: #1559b0 !important;
  border-color: #1559b0 !important;
  color: #fff !important;
}

/* Potential business checkboxes ? no inner scroll trap */
.crm-pb-checklist {
  overflow: visible;
  max-height: none;
}

.crm-pb-checklist-inner {
  overflow: visible !important;
  max-height: none !important;
}

.crm-pb-checklist-inner span {
  display: inline-block;
  margin: 0 16px 8px 0;
  vertical-align: top;
}

.crm-pb-checklist-inner label {
  display: inline;
  margin: 0 0 0 4px !important;
  font-weight: 400;
}

.crm-filter-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 1rem 1.25rem !important;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.crm-stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.crm-summary-stats .crm-stat-card {
  min-width: 0;
}

.crm-stat-card.crm-stat-warn {
  border-color: #f0b4b4;
  box-shadow: 0 1px 3px rgba(209, 50, 50, 0.08);
}

.crm-summary-stats a.crm-stat-card.crm-stat-card-clickable {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.crm-summary-stats a.crm-stat-card.crm-stat-card-clickable .crm-stat-label {
  color: #8a9ab0;
  text-decoration: none;
}

.crm-summary-stats a.crm-stat-card.crm-stat-card-clickable .crm-stat-val {
  color: #1a1d23;
  text-decoration: none;
}

.crm-summary-stats a.crm-stat-card.crm-stat-card-clickable .crm-stat-val.accent {
  color: #1a6fd4;
}

.crm-summary-stats a.crm-stat-card.crm-stat-card-clickable .crm-stat-sub {
  color: #8a9ab0;
  text-decoration: none;
}

.crm-summary-stats a.crm-stat-card.crm-stat-card-clickable .crm-stat-sub-accent {
  color: #1a6fd4;
}

.crm-summary-stats a.crm-stat-card.crm-stat-card-clickable:hover,
.crm-summary-stats a.crm-stat-card.crm-stat-card-clickable:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
  text-decoration: none;
  color: inherit;
  outline: none;
}

.crm-summary-stats a.crm-stat-card.crm-stat-card-clickable.crm-stat-active {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 1px rgba(26, 111, 212, 0.35);
}

.crm-stat-label {
  font-size: 13px;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 5px;
}

.crm-stat-val {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: #1a1d23;
}

.crm-stat-sub { font-size: 13px; color: #8a9ab0; margin-top: 4px; }
.crm-stat-sub.crm-stat-sub-accent { color: #1a6fd4; }
.crm-stat-val.accent { color: #1a6fd4; }
.crm-stat-val.green { color: #1a9e5f; }
.crm-stat-val.red { color: #d13232; }

.crm-stat-val.crm-stat-val-sm {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

/* Neutral notice blocks ? unbilled widget, accounting summaries */
.crm-notice {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #4a5568;
  line-height: 1.45;
}

.crm-notice__title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  margin-bottom: 4px;
}

.crm-notice__lead {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 12px;
}

.crm-notice__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.crm-notice__list > li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 7px 0;
  border-bottom: 1px solid #eef2f6;
  font-size: 12px;
}

.crm-notice__list > li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.crm-notice__over-amt {
  font-weight: 600;
  white-space: nowrap;
  margin-left: auto;
}

.crm-notice--danger .crm-notice__over-amt {
  color: #d13232;
}

.crm-notice--warn .crm-notice__over-amt {
  color: #9a6700;
}

.crm-notice--danger {
  border-left: 3px solid #d13232;
}

.crm-notice--danger .crm-notice__title {
  color: #d13232;
}

.crm-notice--success {
  border-left: 3px solid #1a9e5f;
}

.crm-notice--warn {
  border-left: 3px solid #c47d0a;
}

.crm-notice--info {
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
}

.crm-notice--success .crm-notice__val,
.crm-notice--success strong {
  color: #1a9e5f;
}

.crm-notice--warn strong {
  color: #9a6700;
}

.crm-notice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.crm-unbilled-row {
  border-bottom: 1px solid #eef2f6;
  padding: 6px 2px;
}

.crm-unbilled-row:last-child {
  border-bottom: none;
}

.crm-unbilled-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

.crm-unbilled-subc-amt,
.crm-unbilled-exp-amt {
  color: #1a6fd4;
  font-weight: 600;
}

.crm-page .unbilled-hold-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 42rem;
}

.crm-page .unbilled-hold-stats > .crm-stat-card {
  flex: 1 1 12rem;
  min-width: 0;
}

/* KPI row (contact detail) ? prototype kpi-row */
.crm-kpi-strip {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-bottom: 1.125rem !important;
  flex-wrap: nowrap !important;
}

@media (max-width: 992px) {
  .crm-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 576px) {
  .crm-kpi-strip { grid-template-columns: 1fr !important; }
}

.crm-kpi-strip.crm-kpi-strip-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.crm-kpi-strip.crm-kpi-strip-approval {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

@media (max-width: 992px) {
  .crm-kpi-strip.crm-kpi-strip-approval {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.crm-kpi-strip a.crm-kpi-link.crm-kpi-active {
  border-color: #1a6fd4 !important;
  box-shadow: 0 0 0 1px rgba(26, 111, 212, 0.35) !important;
}

.crm-summary-one-col {
  display: block;
  max-width: 720px;
}

.crm-kpi-strip .crm-kpi-tile,
.crm-kpi-strip a.crm-kpi-link {
  display: block;
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
  padding: 14px 16px !important;
  background: #fff;
  text-decoration: none !important;
  color: #1a1d23 !important;
}

.crm-kpi-strip a.crm-kpi-link:hover,
.crm-kpi-strip a.crm-kpi-link:focus,
.crm-kpi-strip a.crm-kpi-link:active,
.crm-kpi-strip a.crm-kpi-link:visited {
  text-decoration: none !important;
  color: #1a1d23 !important;
}

.crm-kpi-strip a.crm-kpi-link:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.crm-kpi-strip .crm-kpi-lbl,
.crm-kpi-strip a.crm-kpi-link .crm-kpi-lbl {
  font-size: 13px !important;
  letter-spacing: 0.07em !important;
  color: #8a9ab0 !important;
  text-decoration: none !important;
}

.crm-kpi-strip .crm-kpi-val,
.crm-kpi-strip a.crm-kpi-link .crm-kpi-val {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #1a1d23 !important;
  text-decoration: none !important;
  line-height: 1.1 !important;
  margin-top: 2px;
}

.crm-kpi-strip .crm-kpi-val-accent,
.crm-kpi-strip a.crm-kpi-link .crm-kpi-val-accent { color: #1a6fd4 !important; }

.crm-kpi-strip .crm-kpi-val-green,
.crm-kpi-strip a.crm-kpi-link .crm-kpi-val-green { color: #1a9e5f !important; }

.crm-kpi-strip .crm-kpi-val-sm,
.crm-kpi-strip a.crm-kpi-link .crm-kpi-val-sm {
  font-size: 15px !important;
  line-height: 1.3 !important;
  padding-top: 2px;
}

.crm-kpi-strip .crm-kpi-sub,
.crm-kpi-strip a.crm-kpi-link .crm-kpi-sub {
  display: block;
  font-size: 13px !important;
  color: #8a9ab0 !important;
  margin-top: 4px !important;
  text-decoration: none !important;
  font-weight: 400 !important;
}

.crm-kpi-strip .crm-kpi-sub-accent { color: #1a6fd4 !important; }
.crm-kpi-strip .crm-kpi-sub-warn { color: #d13232 !important; }
.crm-kpi-strip .crm-kpi-sub-soon { color: #c47d0a !important; }

.crm-kpi-strip a.crm-kpi-link.crm-kpi-warn .crm-kpi-val-green { color: #d13232 !important; }

/* Contact folder tabs ? modern segmented navigator */
.ucmenu-wrap {
  width: 100%;
  margin-bottom: 1.25rem;
}

/* Segmented tab chrome ? CRM folder tabs (contact, company, proposal, project) */
.crm-page:not(.crm-approval-page):not(.crm-invoices-page) .ucmenu-tabs-row,
.ucmenu-wrap:not(.pc-portal-nav):not(.resources-hub-nav):not(.approval-menu-wrap):not(.invoice-menu-wrap):not(.schedules-roles-menu-wrap):not(.ucmenu-proposal-wrap) .ucmenu-tabs-row-crm {
  width: 100%;
  padding: 5px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ucmenu-wrap .ucmenu-tabs-row {
  width: 100%;
}

.crm-page:not(.proposal-summary-page) .ucmenu-subtabs-row,
.ucmenu-wrap:not(.pc-portal-nav):not(.ucmenu-proposal-wrap) .ucmenu-subtabs-row-crm {
  width: 100%;
  margin-top: 0.5rem;
  padding: 4px;
  background: #f8fafc;
  border: 1px solid #e8edf2;
  border-radius: 12px;
}

.ucmenu-wrap .ucmenu-subtabs-row {
  width: 100%;
  margin-top: 0.5rem;
}

/* Empty sub-tab row is not rendered (pnlSubtabsRow.Visible=false); guard if shown without tabs */
.crm-page .ucmenu-subtabs-row:empty,
.ucmenu-wrap .ucmenu-subtabs-row:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Empty main tab row (project pages: tabs live in ucProjectHeader) */
.ucmenu-wrap:not(.pc-portal-nav):not(.resources-hub-nav):not(.approval-menu-wrap):not(.invoice-menu-wrap):not(.schedules-roles-menu-wrap):not(.ucmenu-proposal-wrap) .ucmenu-tabs-row:empty,
.ucmenu-wrap:not(.pc-portal-nav):not(.resources-hub-nav):not(.approval-menu-wrap):not(.invoice-menu-wrap):not(.schedules-roles-menu-wrap):not(.ucmenu-proposal-wrap) .ucmenu-tabs-row:not(:has(.crm-tabs-item)) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* Pure HTML CRM tab strip (replaces Telerik RadTabStrip) */
.crm-page .crm-tabs-strip,
.ucmenu-wrap .crm-tabs-strip {
  display: block;
  width: 100%;
}

/* Facility summary / editsum project toolbar (uctool_summary)
   Sticky bar must NOT sit inside a short wrapper ? sticky only lasts while its parent is on-screen. */
.ucmenu-wrap.crm-project-toolbar,
.ucmenu-wrap.crm-project-toolbar-sticky,
.crm-project-toolbar-sticky.ucmenu-wrap {
  position: sticky !important;
  top: var(--crm-topbar-height, 52px) !important;
  z-index: 1020 !important;
  margin: 0 0 0.55rem !important;
  padding: 0.2rem 0 !important;
  background: #f1f5f9 !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  width: 100%;
  /* Used by sticky table headers on project pages (rq_projna, etc.) */
  --crm-project-toolbar-sticky-h: 56px;
}
.crm-project-toolbar-sub,
.ucmenu-wrap.crm-project-toolbar .crm-tabs-strip-sub,
.crm-tabs-strip.crm-project-toolbar-sub {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
}
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-row,
.crm-project-toolbar-sticky .crm-project-toolbar-row {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ucmenu-wrap.crm-project-toolbar .crm-tabs-strip,
.crm-project-toolbar-sticky .crm-tabs-strip {
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions .crm-btn,
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions a.crm-btn,
.ucmenu-wrap.crm-project-toolbar .crm-noti-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  background: #fff !important;
  color: #1e293b !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions .crm-btn-outline-primary,
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions a.crm-btn-outline-primary {
  border-color: #1a6fd4 !important;
  background: #fff !important;
  color: #1a6fd4 !important;
}
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions .crm-btn-outline-primary:hover,
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions a.crm-btn-outline-primary:hover,
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions .crm-btn-outline-primary:focus,
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions a.crm-btn-outline-primary:focus {
  background: #eff6ff !important;
  border-color: #1558a8 !important;
  color: #1558a8 !important;
}
.ucmenu-wrap.crm-project-toolbar .crm-noti-btn {
  width: 36px;
  min-width: 36px;
  padding: 0 !important;
}
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions .crm-noti-btn.crm-noti-btn--on,
.ucmenu-wrap.crm-project-toolbar .crm-noti-btn.crm-noti-btn--on {
  background: #fff !important;
  border-color: #c5d9cc !important;
  color: #6b8f7a !important;
}
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions .crm-noti-btn.crm-noti-btn--off,
.ucmenu-wrap.crm-project-toolbar .crm-noti-btn.crm-noti-btn--off {
  background: #fff !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
}
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions .crm-noti-btn.crm-noti-btn--on:hover,
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions .crm-noti-btn.crm-noti-btn--on:focus,
.ucmenu-wrap.crm-project-toolbar .crm-noti-btn.crm-noti-btn--on:hover,
.ucmenu-wrap.crm-project-toolbar .crm-noti-btn.crm-noti-btn--on:focus {
  background: #f8fafc !important;
  border-color: #a8c4b3 !important;
  color: #5a7d68 !important;
}
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions .crm-noti-btn.crm-noti-btn--off:hover,
.ucmenu-wrap.crm-project-toolbar .crm-project-toolbar-actions .crm-noti-btn.crm-noti-btn--off:focus,
.ucmenu-wrap.crm-project-toolbar .crm-noti-btn.crm-noti-btn--off:hover,
.ucmenu-wrap.crm-project-toolbar .crm-noti-btn.crm-noti-btn--off:focus {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
}

.crm-page .crm-tabs-strip .crm-tabs-list,
.ucmenu-wrap .crm-tabs-strip .crm-tabs-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 2px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.crm-page .crm-tabs-strip .crm-tabs-list::-webkit-scrollbar,
.ucmenu-wrap .crm-tabs-strip .crm-tabs-list::-webkit-scrollbar {
  height: 4px;
}

.crm-page .crm-tabs-strip .crm-tabs-list::-webkit-scrollbar-thumb,
.ucmenu-wrap .crm-tabs-strip .crm-tabs-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.crm-page .crm-tabs-strip .crm-tabs-item,
.ucmenu-wrap .crm-tabs-strip .crm-tabs-item {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crm-page .crm-tabs-strip .crm-tabs-link,
.ucmenu-wrap .crm-tabs-strip .crm-tabs-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.crm-tab-icon {
  font-size: 0.95em;
  color: #64748b;
  opacity: 0.95;
  flex-shrink: 0;
}

.crm-page .crm-tabs-strip .crm-tabs-link.is-selected .crm-tab-icon,
.ucmenu-wrap .crm-tabs-strip .crm-tabs-link.is-selected .crm-tab-icon {
  color: #475569;
}

.crm-page .crm-tabs-strip .crm-tabs-link:hover,
.ucmenu-wrap .crm-tabs-strip .crm-tabs-link:hover {
  color: #334155;
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(226, 232, 240, 0.9);
  text-decoration: none;
}

.crm-page .crm-tabs-strip .crm-tabs-link.is-selected,
.ucmenu-wrap .crm-tabs-strip .crm-tabs-link.is-selected {
  color: #1a1d23;
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  font-weight: 600;
}

.crm-page .crm-tabs-strip .crm-tabs-link.is-selected:hover,
.ucmenu-wrap .crm-tabs-strip .crm-tabs-link.is-selected:hover {
  color: #1a1d23;
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.crm-page .crm-tabs-strip .crm-tab-count,
.ucmenu-wrap .crm-tabs-strip .crm-tab-count,
.crm-page .crm-tabs-strip #contactEmailCount.crm-tab-count,
.ucmenu-wrap .crm-tabs-strip #contactEmailCount.crm-tab-count,
.crm-page .crm-tabs-strip #emailCount.crm-tab-count,
.ucmenu-wrap .crm-tabs-strip #emailCount.crm-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
  background: rgba(15, 23, 42, 0.06);
  color: #64748b;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 0;
  min-width: 1.25rem;
  height: 1.25rem;
  text-align: center;
  vertical-align: middle;
}

.crm-page .crm-tabs-strip .crm-tabs-link.is-selected .crm-tab-count,
.ucmenu-wrap .crm-tabs-strip .crm-tabs-link.is-selected .crm-tab-count,
.crm-page .crm-tabs-strip .crm-tabs-link.is-selected #contactEmailCount.crm-tab-count,
.ucmenu-wrap .crm-tabs-strip .crm-tabs-link.is-selected #contactEmailCount.crm-tab-count,
.crm-page .crm-tabs-strip .crm-tabs-link.is-selected #emailCount.crm-tab-count,
.ucmenu-wrap .crm-tabs-strip .crm-tabs-link.is-selected #emailCount.crm-tab-count {
  background: #e8f2ff;
  color: #1a6fd4;
}

.crm-page .crm-tabs-strip.crm-tabs-strip-sub .crm-tabs-link,
.ucmenu-wrap .crm-tabs-strip.crm-tabs-strip-sub .crm-tabs-link {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .crm-page:not(.crm-approval-page):not(.crm-invoices-page) .ucmenu-tabs-row,
  .ucmenu-wrap:not(.pc-portal-nav):not(.resources-hub-nav):not(.approval-menu-wrap):not(.invoice-menu-wrap):not(.schedules-roles-menu-wrap):not(.ucmenu-proposal-wrap) .ucmenu-tabs-row-crm {
    padding: 4px;
    border-radius: 12px;
  }

  .crm-page .crm-tabs-strip .crm-tabs-link,
  .ucmenu-wrap .crm-tabs-strip .crm-tabs-link {
    padding: 7px 11px;
    font-size: 13px;
    border-radius: 8px;
  }

  .crm-page .crm-tabs-strip .crm-tab-count,
  .ucmenu-wrap .crm-tabs-strip .crm-tab-count {
    font-size: 12px;
    padding: 1px 6px;
  }
}

/* Overview card actions */
.crm-card-action,
.crm-ov-card-hdr a.crm-card-action {
  font-size: 13px;
  font-weight: 500;
  color: #1a6fd4 !important;
  text-decoration: none !important;
}

.crm-card-action:hover,
.crm-ov-card-hdr a.crm-card-action:hover {
  color: #1558a8 !important;
  text-decoration: underline !important;
}

.crm-ov-add-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #1a6fd4 !important;
  text-decoration: none !important;
}

.crm-ov-add-link:hover { text-decoration: underline !important; color: #1558a8 !important; }

.crm-ov-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-bottom: 1rem;
}

.crm-ov-card-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  font-size: 14px;
  color: #1a1d23;
}

.crm-ov-card-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.crm-ov-card-title .bi {
  color: #1a6fd4;
  font-size: 15px;
}

.crm-ov-card-body {
  padding: 4px 14px 14px;
}

.crm-ov-layout {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 340px);
  gap: 16px;
  align-items: start;
}

.crm-ov-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.crm-ov-opp-item {
  padding: 14px 10px;
  border-radius: 8px;
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.1s;
}

.crm-ov-opp-item:last-child { border-bottom: none; }

.crm-ov-opp-item:hover { background: #f8fafc; }

.crm-ov-opp-row-1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.crm-ov-opp-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a6fd4;
  line-height: 1.35;
}

.crm-ov-opp-val {
  font-size: 15px;
  font-weight: 700;
  color: #1a1d23;
  white-space: nowrap;
}

.crm-ov-opp-row-2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 13px;
  color: #8a9ab0;
}

.crm-ov-opp-row-2 .crm-badge { margin-right: 0; }

.crm-ov-prob-high { color: #1a9e5f; font-weight: 600; }
.crm-ov-prob-mid { color: #c47d0a; font-weight: 600; }
.crm-ov-prob-low { color: #8a9ab0; font-weight: 600; }

.crm-ov-stage-track {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.crm-ov-stage-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.35s ease;
}

.crm-ov-card .crm-field-row {
  padding-left: 2px;
  padding-right: 2px;
}

.crm-ov-card .crm-field-val a {
  color: #1a6fd4;
  text-decoration: none;
}

.crm-ov-card .crm-field-val a:hover { text-decoration: underline; }

.crm-ov-health-row { margin-bottom: 10px; }

.crm-ov-health-row:last-child { margin-bottom: 0; }

.crm-ov-health-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #8a9ab0;
  margin-bottom: 4px;
}

.crm-ov-health-val { font-weight: 600; }

.crm-ov-health-val-high { color: #1a9e5f; }
.crm-ov-health-val-mid { color: #c47d0a; }
.crm-ov-health-val-low { color: #d13232; }
.crm-ov-health-val-accent { color: #1a6fd4; }

.crm-ov-health-bar {
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.crm-ov-health-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.35s ease;
}

@media (max-width: 992px) {
  .crm-ov-layout { grid-template-columns: 1fr; }
}

/* Contact header bar */
.crm-contact-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.crm-contact-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid #cbd5e1;
  background: #e8f0fb;
  color: #1a6fd4;
}

.crm-contact-avatar.av-green { background: #e6f7ef; color: #1a9e5f; }
.crm-contact-avatar.av-purple { background: #f0ecfb; color: #6b4fbf; }
.crm-contact-avatar.av-amber { background: #fef3dc; color: #c47d0a; }
.crm-contact-avatar.av-teal { background: #e3f5f7; color: #0e8fa0; }
.crm-contact-avatar.av-blue { background: #e8f0fb; color: #1a6fd4; }

.crm-contact-header h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #1a1d23;
}

.crm-contact-header h1.crm-company-header-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-contact-header h1 .crm-zoho-list-icon {
  font-size: 16px;
  vertical-align: middle;
}

/* Proposal header bar (proposal folder pages via ucmenu) */
.crm-proposal-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1.35rem;
  padding: 0 0 0.85rem;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  background: transparent;
  flex-wrap: wrap;
  box-shadow: none;
}

.crm-proposal-avatar {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #1a6fd4 0%, #3d8fe8 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26, 111, 212, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.crm-proposal-avatar-num {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: center;
  padding: 0 5px;
}

.crm-proposal-header h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #1a1d23;
  line-height: 1.3;
}

.crm-proposal-subtitle {
  font-size: 14px;
  color: #4a5568;
  margin-top: 3px;
}

.crm-proposal-header .crm-tm-budget-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 0;
  background: #e8f0fb;
  color: #1557a8;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease;
}

.crm-proposal-header .crm-tm-budget-alert:hover,
.crm-proposal-header .crm-tm-budget-alert:focus-visible {
  background: #dbeafe;
  outline: none;
}

.crm-proposal-header .crm-tm-budget-alert:focus-visible {
  box-shadow: 0 0 0 2px rgba(21, 87, 168, 0.18);
}

.crm-proposal-header .crm-tm-budget-alert--warn {
  background: #fef6e7;
  color: #92400e;
}

.crm-proposal-header .crm-tm-budget-alert--warn:hover,
.crm-proposal-header .crm-tm-budget-alert--warn:focus-visible {
  background: #fdecc8;
}

.crm-proposal-header .crm-tm-budget-alert--warn:focus-visible {
  box-shadow: 0 0 0 2px rgba(146, 64, 14, 0.18);
}

.crm-proposal-header .crm-tm-budget-alert > .bi {
  flex-shrink: 0;
}

.crm-proposal-header .crm-tm-budget-open-icon {
  margin-left: 2px;
  font-size: 11px;
}

.crm-tm-budget-modal .modal-dialog {
  max-width: 760px;
}

.crm-tm-budget-section {
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.crm-tm-budget-section + .crm-tm-budget-section,
.crm-tm-budget-section + .crm-tm-budget-plan {
  margin-top: 1rem;
}

.crm-tm-budget-section h6 {
  margin: 0 0 .65rem;
  color: #334155;
  font-size: .875rem;
  font-weight: 700;
}

.crm-tm-budget-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .4rem 0;
  border-bottom: 1px solid #eef2f7;
  color: #64748b;
  font-size: .875rem;
}

.crm-tm-budget-detail-row strong {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.crm-tm-budget-detail-row.is-over strong {
  color: #b42318;
}

.crm-tm-budget-formula {
  margin-top: .75rem;
  padding: .55rem .7rem;
  border-radius: 7px;
  background: #f8fafc;
  color: #475569;
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
}

.crm-tm-budget-caveat {
  margin-top: .6rem;
  padding: .5rem .65rem;
  border-left: 3px solid #e0a93c;
  border-radius: 6px;
  background: #fef6e7;
  color: #78350f;
  font-size: .8rem;
  line-height: 1.4;
}

.crm-tm-budget-logic {
  margin: 0;
  padding-left: 1.15rem;
  color: #475569;
  font-size: .84rem;
  line-height: 1.45;
}

.crm-tm-budget-logic li + li {
  margin-top: .45rem;
}

.crm-tm-budget-logic code {
  font-size: .78rem;
  color: #334155;
}

.crm-tm-budget-section--collapse {
  padding: .65rem .85rem;
}

.crm-tm-budget-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  padding: .35rem .15rem;
  border: 0;
  background: transparent;
  color: #1a6fd4;
  font: inherit;
  font-size: .875rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.crm-tm-budget-collapse-btn:hover,
.crm-tm-budget-collapse-btn:focus-visible {
  color: #0f4f9e;
  outline: none;
}

.crm-tm-budget-collapse-btn .bi-chevron-down {
  transition: transform .15s ease;
}

.crm-tm-budget-collapse-btn[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

.crm-tm-budget-table-wrap {
  margin-top: .65rem;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.crm-tm-budget-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: .82rem;
}

.crm-tm-budget-table th,
.crm-tm-budget-table td {
  padding: .5rem .65rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.crm-tm-budget-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.crm-tm-budget-table tbody tr:last-child td {
  border-bottom: 0;
}

.crm-tm-budget-table tfoot td {
  background: #f8fafc;
  border-bottom: 0;
  border-top: 1px solid #e2e8f0;
  color: #0f172a;
  font-weight: 700;
}

.crm-tm-budget-table .text-end {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.crm-tm-budget-table td.is-over,
.crm-tm-budget-table tr.is-severe td.is-over {
  color: #b42318;
  font-weight: 700;
}

.crm-tm-budget-table tr.is-severe td {
  background: #fff7f7;
}

.crm-tm-budget-kind {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: .72rem;
  font-weight: 700;
}

.crm-tm-budget-path {
  color: #64748b;
  max-width: 18rem;
}

.crm-tm-budget-table-note {
  margin-top: .55rem;
  color: #64748b;
  font-size: .78rem;
}

.crm-tm-budget-plan {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #f0cf78;
  border-radius: 10px;
  background: #fffbeb;
  color: #4b5563;
  font-size: .875rem;
}

.crm-tm-budget-plan-title {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .6rem;
  color: #92400e;
  font-weight: 700;
}

.crm-tm-budget-plan ol {
  margin: 0;
  padding-left: 1.2rem;
}

.crm-tm-budget-plan li + li {
  margin-top: .5rem;
}

.crm-tm-budget-plan-note {
  margin-top: .75rem;
  padding-top: .65rem;
  border-top: 1px solid rgba(146, 64, 14, .18);
  color: #78350f;
  font-weight: 600;
}

/* Project header bar (project folder pages via ucmenu) */
.crm-project-header {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1.35rem;
  padding: 0 0 0.85rem;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  background: transparent;
  flex-wrap: wrap;
  box-shadow: none;
}

.crm-project-header-title-link {
  color: #1a1d23;
  text-decoration: none;
  transition: color .15s ease;
}

.crm-project-header-title-link:hover,
.crm-project-header-title-link:focus {
  color: #1a6fd4;
  text-decoration: none;
}

.crm-project-avatar {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #2d9c85 0%, #45b89e 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(45, 156, 133, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.crm-project-avatar-num {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: center;
  padding: 0 5px;
}

.crm-project-header h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #1a1d23;
  line-height: 1.3;
}

.crm-project-subtitle {
  font-size: 14px;
  color: #4a5568;
  margin-top: 3px;
}

.crm-project-header .crm-badge,
.crm-project-header .crm-chip,
.crm-project-header .crm-badge-row a.crm-badge-link {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  line-height: 1.25;
}

/* Deliverable header bar (prop deliverable pages ? p + id in URL) */
.crm-deliverable-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(135deg, #fafbfc 0%, #fff 52%, #f5f8fc 100%);
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.crm-deliverable-avatar {
  min-width: 118px;
  height: 64px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #475569 0%, #64748b 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(71, 85, 105, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.35);
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

button.crm-deliverable-avatar:hover {
  background: linear-gradient(145deg, #3f4b5a 0%, #596578 100%);
  box-shadow: 0 4px 12px rgba(71, 85, 105, 0.28);
}

button.crm-deliverable-avatar:active {
  transform: translateY(1px);
}

button.crm-deliverable-avatar:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.crm-deliverable-avatar-num {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.crm-deliverable-id-copy-icon,
.crm-deliverable-id-copied-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.crm-deliverable-id-copied-icon {
  display: none;
}

.crm-deliverable-avatar.is-copied {
  background: linear-gradient(145deg, #166534 0%, #16a34a 100%);
  border-color: rgba(255, 255, 255, 0.45);
}

.crm-deliverable-avatar.is-copied .crm-deliverable-id-copy-icon {
  display: none;
}

.crm-deliverable-avatar.is-copied .crm-deliverable-id-copied-icon {
  display: inline-block;
}

.crm-deliverable-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1d23;
  line-height: 1.3;
}

.crm-deliverable-subtitle {
  font-size: 13px;
  color: #4a5568;
  margin-top: 3px;
}

.crm-deliverable-header-body {
  min-width: 0;
}

.crm-deliverable-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.crm-deliverable-header-main {
  min-width: 0;
  flex: 1 1 auto;
}

.crm-deliverable-header .crm-badge-row {
  margin-top: 8px;
}

.crm-deliverable-header .crm-badge-budget,
.crm-deliverable-header .crm-badge-total {
  white-space: nowrap;
}

.crm-deliverable-header-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.crm-deliverable-header-actions .btn {
  white-space: nowrap;
}

@media (max-width: 767px) {
  .crm-deliverable-header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-deliverable-header-actions {
    justify-content: flex-start;
  }
}

.crm-contact-subtitle {
  font-size: 14px;
  color: #4a5568;
  margin-top: 3px;
}

.crm-badge-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.crm-quick-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.crm-quick-actions .crm-kpi-action-count,
.crm-quick-actions .crm-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  background: rgba(15, 23, 42, 0.06);
  color: #64748b;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
  min-width: 1.15rem;
  text-align: center;
  vertical-align: middle;
}

/* Keep count readable when outline buttons go dark on hover/focus/active */
.crm-quick-actions .btn:hover .crm-kpi-action-count,
.crm-quick-actions .btn:focus .crm-kpi-action-count,
.crm-quick-actions .btn:active .crm-kpi-action-count,
.crm-quick-actions .btn.active .crm-kpi-action-count,
.crm-quick-actions .btn:hover .crm-tab-count,
.crm-quick-actions .btn:focus .crm-tab-count,
.crm-quick-actions .btn:active .crm-tab-count,
.crm-quick-actions .btn.active .crm-tab-count {
  background: #fff;
  color: #334155;
}

/* Badges & chips */
.crm-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.crm-badge-blue { background: #e8f0fb; color: #1a6fd4; }
.crm-badge-green { background: #e6f7ef; color: #1a9e5f; }
.crm-badge-amber { background: #fef3dc; color: #c47d0a; }

.crm-badge-row a.crm-badge-link {
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.crm-badge-row a.crm-badge-link:hover,
.crm-badge-row a.crm-badge-link:focus {
  text-decoration: none;
}

.crm-badge-row a.crm-badge-link-amber {
  background: #fffaf3;
  color: #c47d0a;
  border-color: #e8c47a;
}

.crm-badge-row a.crm-badge-link-amber:hover,
.crm-badge-row a.crm-badge-link-amber:focus {
  background: #fef3dc;
  border-color: #c47d0a;
  color: #a86808;
}

/* Quiet clickable count pill ? purple, no bold / no outline border */
.crm-badge-row a.crm-badge-link-quiet {
  font-weight: 500;
  border: none;
  background: #f0ecfb;
  color: #6b4fbf;
}

.crm-badge-row a.crm-badge-link-quiet:hover,
.crm-badge-row a.crm-badge-link-quiet:focus {
  background: #e8e0f8;
  border: none;
  color: #5a3fa8;
}
.crm-badge-red { background: #fdeaea; color: #d13232; }
.crm-badge-gray { background: #f1f3f5; color: #6c757d; }
.crm-badge-purple { background: #f3e8ff; color: #6d28d9; }
.crm-badge-teal { background: #e3f5f7; color: #0e8fa0; }

.crm-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}

.crm-chip::before { content: '?'; font-size: 7px; }
.crm-chip-active { background: #e6f7ef; color: #1a9e5f; }
.crm-chip-success { background: #e6f7ef; color: #1a9e5f; }
.crm-chip-primary { background: #e8f0fb; color: #1a6fd4; }
.crm-chip-inactive { background: #f1f3f5; color: #6c757d; }
.crm-chip-archived { background: #fef3dc; color: #c47d0a; }
.crm-chip-approved { background: #e6f7ef; color: #1a9e5f; }
.crm-chip-draft { background: #f1f3f5; color: #495057; }
.crm-chip-internal-review { background: #fef3dc; color: #c47d0a; }
.crm-chip-client-review { background: #f0ecfb; color: #6b4fbf; }
.crm-chip-pending { background: #fef3dc; color: #c47d0a; }
.crm-chip-info { background: #e3f5f7; color: #0e8fa0; }
.crm-chip-design { background: #f0ecfb; color: #6b4fbf; }
.crm-chip-construction { background: #fdeaea; color: #d13232; }
.crm-chip-lost { background: #fdeaea; color: #d13232; }

/* Facility / project header status chips ? same palette as homepage_ap */
.crm-facility-summary-header .crm-chip.crm-call-status-1,
.crm-deliverable-header .crm-chip.crm-call-status-1,
.crm-badge-row .crm-chip.crm-call-status-1 { background: #fef3dc; color: #c48d30; }
.crm-facility-summary-header .crm-chip.crm-call-status-2,
.crm-deliverable-header .crm-chip.crm-call-status-2,
.crm-badge-row .crm-chip.crm-call-status-2 { background: #e6f7ef; color: #1a9e5f; }
.crm-facility-summary-header .crm-chip.crm-call-status-3,
.crm-deliverable-header .crm-chip.crm-call-status-3,
.crm-badge-row .crm-chip.crm-call-status-3 { background: #e8f0fb; color: #1a6fd4; }
.crm-facility-summary-header .crm-chip.crm-call-status-4,
.crm-deliverable-header .crm-chip.crm-call-status-4,
.crm-badge-row .crm-chip.crm-call-status-4 { background: #fdeaea; color: #d13232; }
.crm-facility-summary-header .crm-chip.crm-call-status-5,
.crm-deliverable-header .crm-chip.crm-call-status-5,
.crm-badge-row .crm-chip.crm-call-status-5 { background: #f0ecfb; color: #6348e0; }
.crm-facility-summary-header .crm-chip.crm-call-status-6,
.crm-deliverable-header .crm-chip.crm-call-status-6,
.crm-badge-row .crm-chip.crm-call-status-6 { background: #e3f5f7; color: #348f6a; }
.crm-facility-summary-header .crm-chip.crm-call-status-7,
.crm-deliverable-header .crm-chip.crm-call-status-7,
.crm-badge-row .crm-chip.crm-call-status-7 { background: #e2e8f0; color: #0f172a; }
.crm-facility-summary-header .crm-chip.crm-call-status-8,
.crm-deliverable-header .crm-chip.crm-call-status-8,
.crm-badge-row .crm-chip.crm-call-status-8 { background: #eef2f7; color: #64748b; }

/* Contact proposals tab */
.crm-proposals-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .crm-proposals-stats { grid-template-columns: 1fr; }
}

.crm-proposals-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.crm-proposals-toolbar .crm-status-filters {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.35rem;
}

.crm-proposals-toolbar .crm-status-filters input[type="checkbox"] {
  margin: 0 0.35rem 0 0;
}

.crm-proposals-toolbar .crm-status-filters label {
  margin: 0 !important;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.crm-proposals-table {
  width: 100%;
  margin-bottom: 0;
}

.crm-proposals-table thead th {
  font-size: 12px;
  font-weight: 600;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
  white-space: nowrap;
  padding: 10px 14px;
}

.crm-proposals-table tbody td {
  padding: 12px 14px;
  font-size: 14px;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
}

.crm-proposals-table tbody tr:hover td {
  background: #e8f0fb;
}

.crm-prop-link {
  font-weight: 600;
  color: #1a6fd4;
  text-decoration: none;
}

.crm-prop-link:hover {
  text-decoration: underline;
  color: #1558a8;
}

.crm-prop-id,
.crm-prop-muted {
  color: #8a9ab0;
  font-size: 13px;
}

.crm-prop-po {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  color: #8a9ab0;
}

.crm-prop-amount {
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}

.crm-proposals-total {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  border-top: 2px solid #e2e8f0;
  text-align: right;
  background: #f8fafc;
}

.crm-amendment-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

.crm-amendment-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a9ab0;
  margin-bottom: 6px;
}

.crm-amendment-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
}

.crm-amendment-row:last-child {
  margin-bottom: 0;
}

.crm-amendment-total {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.crm-prop-new {
  font-size: 12px;
  font-weight: 600;
  color: #1a9e5f;
  margin-left: 6px;
}

/* Field rows (summary) */
.crm-field-group { margin-bottom: 1.125rem; }

.crm-field-group-label {
  font-size: 12px;
  font-weight: 700;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.crm-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #f1f3f5;
  font-size: 14px;
}

.crm-field-row:last-child { border-bottom: none; }
.crm-field-key { color: #8a9ab0; }
.crm-field-val { color: #1a1d23; font-weight: 500; text-align: right; max-width: 60%; }

/* Company summary ? two-card layout, balanced field rows */
.company-summary-page .crm-summary-two-col {
  align-items: stretch;
}
.company-summary-page .crm-summary-two-col > .crm-summary-card {
  height: 100%;
}
.company-summary-page .crm-summary-card-body {
  padding-top: 0.75rem;
  padding-bottom: 1rem;
}
.company-summary-page .crm-field-row {
  gap: 16px;
  align-items: flex-start;
  padding: 10px 0;
}
.company-summary-page .crm-field-key {
  flex: 0 0 42%;
  min-width: 0;
  line-height: 1.4;
}
.company-summary-page .crm-field-val {
  flex: 1 1 auto;
  max-width: none;
  text-align: right;
  line-height: 1.4;
  word-break: break-word;
}
.company-summary-page .crm-field-val .crm-badge,
.company-summary-page .crm-field-val .crm-zoho-entity-badge {
  display: inline-flex;
  max-width: 100%;
}

/* Disabled form controls ? subtle gray, matches Bootstrap selects */
.crm-page .form-control:disabled,
.crm-page .form-control[disabled],
.crm-page .form-select:disabled,
.crm-page .form-select[disabled],
.crm-page textarea.form-control:disabled,
.crm-page input.form-control:disabled {
  background-color: #e9ecef !important;
  background-image: none !important;
  color: #6c757d !important;
  border: 1px solid #dee2e6 !important;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
  -webkit-text-fill-color: #6c757d;
}

.crm-page .input-group:has(.form-control:disabled) .input-group-text,
.crm-page .input-group:has(.form-control[disabled]) .input-group-text {
  background-color: #e9ecef;
  color: #6c757d;
  border-color: #dee2e6;
}

.crm-page .input-group:has(.form-control:disabled) .form-control,
.crm-page .input-group:has(.form-control[disabled]) .form-control {
  border-left: none !important;
}

.crm-page .form-control:disabled::placeholder,
.crm-page .form-control[disabled]::placeholder {
  color: #adb5bd;
}

/* Cards (overview) */
.crm-ov-card,
.crm-opp-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.crm-ov-card-hdr,
.crm-opp-card .crm-ov-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  font-weight: 600;
}

/* CRM tab pages ? toolbar + card shell (prototype) */
.crm-tab-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.crm-tab-toolbar-summary {
  font-size: 14px;
  color: #8a9ab0;
}

.crm-email-opp-filter {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #f0f7ff;
  box-shadow: none;
}

.crm-email-opp-filter-count {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.crm-email-opp-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  background: #dbeafe;
  color: #1d4ed8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  box-shadow: none;
}

.crm-email-opp-filter-chip .bi {
  font-size: 0.8rem;
  opacity: 0.85;
}

.crm-email-opp-filter-clear {
  font-size: 12px;
  font-weight: 600;
  color: #1a6fd4;
  text-decoration: none;
}

.crm-email-opp-filter-clear:hover {
  color: #1558ad;
  text-decoration: underline;
}

.crm-tab-card {
  padding: 0 !important;
  overflow: hidden;
}

.crm-tab-card > .card-body,
.crm-tab-card-body {
  padding: 14px 16px;
}

.crm-tab-card-body-flush {
  padding: 8px 12px 12px;
}

/* Activity filter pills */
.crm-activity-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.crm-activity-filter .filter-pill {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.crm-activity-filter .filter-pill:hover {
  background: #f8fafc;
  color: #334155;
}

.crm-activity-filter .filter-pill.active {
  background: #e8f0fb;
  border-color: #c2d9f7;
  color: #1a6fd4;
}

.crm-activity-filter .filter-pill .bi {
  font-size: 13px;
  margin-right: 2px;
  vertical-align: -0.1em;
  opacity: 0.9;
}

.crm-activity-filter .filter-pill.active .bi {
  opacity: 1;
}

.crm-activity-filter .crm-filter-member {
  max-width: 200px;
  margin-left: auto;
  font-size: 13px;
}

/* Activity timeline */
.crm-tl-item {
  display: flex;
  gap: 12px;
  padding: 11px 10px;
  border-radius: 8px;
  border-bottom: 1px solid #f1f3f5;
  transition: background 0.1s;
}

.crm-tl-item:last-child { border-bottom: none; }

.crm-tl-item:hover { background: #f8fafc; }

.crm-tl-body {
  flex: 1;
  min-width: 0;
}

.crm-tl-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 1px;
}

.crm-tl-icon .bi {
  font-size: 15px;
  line-height: 1;
}

.crm-tl-email { background: #e8f0fb; color: #1a6fd4; }
.crm-tl-call { background: #e6f7ef; color: #1a9e5f; }
.crm-tl-meeting { background: #f0ecfb; color: #6b4fbf; }
.crm-tl-note { background: #fef3dc; color: #c47d0a; }
.crm-tl-proposal { background: #e3f5f7; color: #0e8fa0; }

.crm-tl-group-label,
.crm-month-heading {
  font-size: 12px;
  font-weight: 700;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 10px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-tl-group-label::after,
.crm-month-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.crm-tl-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
  line-height: 1.35;
}

.crm-tl-preview {
  font-size: 13px;
  color: #8a9ab0;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.crm-tl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 4px;
  font-size: 12px;
  color: #8a9ab0;
}

.crm-tl-meta a { color: #1a6fd4; text-decoration: none; }
.crm-tl-meta a:hover { text-decoration: underline; }

/* Opportunities */
.crm-opp-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.crm-opp-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  margin-bottom: 0 !important;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.crm-opp-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1d23;
  line-height: 1.3;
}

.crm-opp-card-sub {
  font-size: 14px;
  color: #8a9ab0;
  margin-top: 3px;
}

.crm-opp-card-value {
  font-size: 20px;
  font-weight: 700;
  color: #1a6fd4;
  line-height: 1.1;
}

.crm-opp-card-value-lbl {
  font-size: 13px;
  color: #8a9ab0;
  margin-top: 2px;
}

.crm-stage-steps {
  display: flex;
  margin-top: 14px;
}

.crm-stage-step {
  flex: 1;
  padding: 7px 4px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  background: #f1f3f5;
  border: 1px solid #e2e8f0;
  color: #8a9ab0;
  border-right: none;
  transition: background 0.15s, color 0.15s;
}

.crm-stage-step:first-child {
  border-radius: 6px 0 0 6px;
}

.crm-stage-step:last-child {
  border-radius: 0 6px 6px 0;
  border-right: 1px solid #e2e8f0;
}

.crm-stage-step.active {
  background: #e8f0fb;
  color: #1a6fd4;
  border-color: #c2d9f7;
}

.crm-opp-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.crm-opp-meta-lbl {
  font-size: 12px;
  color: #8a9ab0;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.crm-opp-meta-val {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
}

.crm-opp-meta-val.prob-high { color: #1a9e5f; }
.crm-opp-meta-val.prob-mid { color: #c47d0a; }
.crm-opp-meta-val.prob-low { color: #8a9ab0; }

.crm-opp-notes-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  font-size: 14px;
  color: #8a9ab0;
  line-height: 1.5;
}

.crm-opp-notes-block strong { color: #4a5568; }

/* Tasks */
.crm-task-section-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}

.crm-task-section-lbl + .crm-task-section-lbl,
.crm-task-section-spaced {
  margin-top: 18px;
}

.crm-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid #f1f3f5;
  border-radius: 6px;
  transition: background 0.1s;
}

.crm-task-item:last-child { border-bottom: none; }

.crm-task-item:hover { background: #f8fafc; }

.crm-task-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 0;
  border-radius: 5px;
  cursor: pointer;
}

.crm-task-check-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: #1a9e5f;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.crm-task-check-done::before { content: '?'; }

.crm-task-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a1d23;
  line-height: 1.35;
}

.crm-task-item.crm-task-done .crm-task-name {
  text-decoration: line-through;
  color: #8a9ab0;
  font-weight: 400;
}

.crm-task-sub {
  font-size: 12px;
  color: #8a9ab0;
  margin-top: 2px;
}

.crm-task-sub a { color: #1a6fd4; }

.crm-task-badge-wrap {
  flex-shrink: 0;
  text-align: right;
}

.crm-task-due-muted {
  font-size: 12px;
  color: #8a9ab0;
}

.crm-task-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #16a34a;
  white-space: nowrap;
}

.crm-task-page-hint {
  font-size: 13px;
  color: #64748b;
}

.crm-task-page-hint strong {
  color: #334155;
  font-weight: 600;
}

.crm-task-view-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.crm-task-view-tab {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.crm-task-view-tab:hover {
  color: #334155;
  background: #eef2f7;
}

.crm-task-view-tab.active {
  background: #fff;
  color: #1a6fd4;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.crm-task-view-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.crm-task-view-tab.active .crm-task-view-count {
  background: #dbeafe;
  color: #1a6fd4;
}

.crm-task-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  color: #1a6fd4;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.crm-task-toggle-btn:hover {
  background: #e8f0fb;
  border-color: #93c5fd;
}

.crm-task-toggle-btn.is-busy {
  opacity: 0.55;
  cursor: wait;
}

.crm-task-toggle-reopen {
  border-color: #e2e8f0;
  background: #fff;
  color: #64748b;
}

.crm-task-toggle-reopen:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.crm-task-status-action {
  flex-shrink: 0;
}

.crm-priority-high { color: #c47d0a; font-size: 12px; font-weight: 600; }
.crm-priority-urgent { color: #d13232; font-size: 12px; font-weight: 600; }
.crm-priority-normal { color: #6c757d; font-size: 12px; font-weight: 500; }

.crm-stage-picker .btn-check + .btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.65rem;
}

.crm-stage-picker .btn-check:checked + .btn {
  background: #1a6fd4;
  border-color: #1a6fd4;
  color: #fff;
}

/* Contact CRM tab pages ? unified list layout */
.crm-contact-tab-page .crm-kpi-strip {
  margin-bottom: 16px;
}

.crm-contact-list-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
}

.crm-contact-list-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.crm-contact-list-card-hdr-stacked {
  align-items: flex-start;
}

.crm-contact-list-card-hdr-stacked .crm-activity-filter {
  flex: 1;
  min-width: 0;
}

.crm-contact-list-card-body {
  padding: 0 !important;
}

.crm-contact-list-card-body-flush {
  padding: 0 !important;
}

.crm-segment-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #fff;
}

.crm-segment-tab {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.crm-segment-tab:hover {
  color: #334155;
  background: #f1f5f9;
}

.crm-segment-tab.active {
  background: #1a6fd4;
  color: #fff;
}

.crm-segment-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.crm-segment-tab.active .crm-segment-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.crm-contact-list {
  display: flex;
  flex-direction: column;
}

.crm-contact-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  transition: background 0.12s;
}

.crm-contact-list-item:last-child {
  border-bottom: none;
}

.crm-contact-list-item:hover {
  background: #fafbfc;
}

.crm-contact-list-item-muted {
  opacity: 0.88;
}

.crm-contact-list-main {
  flex: 1;
  min-width: 0;
}

.crm-contact-list-aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

.crm-contact-list-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.crm-contact-list-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
  line-height: 1.35;
}

.crm-contact-list-item-muted .crm-contact-list-title {
  color: #64748b;
}

.crm-contact-list-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.4;
}

.crm-contact-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.crm-contact-list-meta span:not(:last-child)::after {
  content: '?';
  margin-left: 12px;
  color: #cbd5e1;
}

.crm-contact-list-value {
  font-size: 15px;
  font-weight: 700;
  color: #1a6fd4;
  white-space: nowrap;
}

.crm-contact-list-value-sm {
  font-size: 13px;
}

.crm-contact-list-notes {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

/* Shared CRM contact tab tables (tasks, activities) */
.crm-crm-table {
  width: 100%;
}

.crm-crm-table-hdr,
.crm-crm-table-row {
  display: grid;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 16px;
}

.crm-crm-table-hdr {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.crm-crm-table-row {
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  transition: background 0.12s;
}

.crm-crm-table-row:last-child {
  border-bottom: none;
}

.crm-crm-table-row:hover {
  background: #fafbfc;
}

.crm-crm-table-row-muted {
  opacity: 0.9;
}

.crm-crm-table-row-muted .crm-crm-row-title {
  color: #64748b;
}

.crm-crm-col {
  min-width: 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.35;
}

.crm-crm-col-main {
  align-self: start;
  padding-top: 1px;
}

.crm-crm-col-actions {
  display: flex;
  justify-content: flex-end;
}

.crm-crm-col-check {
  text-align: center;
}

.crm-crm-row-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
  line-height: 1.35;
  word-break: break-word;
}

.crm-crm-row-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.crm-crm-row-sub:empty {
  display: none;
}

.crm-crm-row-notes {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}

.crm-note-expand {
  margin-top: 6px;
  max-width: 100%;
}

.crm-note-text {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  word-break: break-word;
  white-space: normal;
}

.crm-note-expand:not(.crm-note-expand-truncated) .crm-note-text,
.crm-note-expand.is-expanded .crm-note-text-full {
  max-height: none;
}

.crm-note-expand-truncated:not(.is-expanded) .crm-note-text-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.crm-note-toggle {
  display: inline-block;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  color: #1a6fd4;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
}

.crm-note-toggle:hover {
  text-decoration: underline;
  color: #1558a8;
}

.crm-crm-col-main .crm-note-expand,
.crm-opp-page .crm-opp-col-main .crm-note-expand {
  margin-top: 6px;
}

.crm-crm-cell-empty {
  color: #cbd5e1;
}

.crm-crm-col-proposal .crm-linked-proposal {
  margin-top: 0;
  max-width: 100%;
}

.crm-crm-table-group-label {
  padding: 10px 16px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
  background: #fafbfc;
  border-bottom: 1px solid #f1f5f9;
}

/* Tasks table */
.crm-tasks-page .crm-task-table .crm-crm-table-hdr,
.crm-tasks-page .crm-task-table .crm-crm-table-row {
  grid-template-columns:
    44px
    minmax(200px, 2.3fr)
    minmax(72px, 0.7fr)
    minmax(88px, 0.75fr)
    minmax(100px, 1fr)
    minmax(120px, 1.1fr)
    64px;
}

.crm-tasks-page .crm-task-table-completed .crm-crm-table-hdr,
.crm-tasks-page .crm-task-table-completed .crm-crm-table-row {
  grid-template-columns:
    44px
    minmax(220px, 2.5fr)
    minmax(100px, 0.9fr)
    minmax(100px, 1fr)
    minmax(120px, 1.1fr)
    64px;
}

.crm-tasks-page .crm-task-check {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #1a6fd4;
}

.crm-tasks-page .crm-task-check-wrap {
  display: flex;
  justify-content: center;
}

.crm-tasks-page .crm-task-row-title-done {
  text-decoration: line-through;
  color: #94a3b8 !important;
}

.crm-tasks-page .crm-crm-col-assignee,
.crm-tasks-page .crm-crm-col-completed {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Activities table */
.crm-act-page .crm-act-table .crm-crm-table-hdr,
.crm-act-page .crm-act-table .crm-crm-table-row {
  grid-template-columns:
    44px
    minmax(220px, 2.4fr)
    minmax(100px, 0.85fr)
    minmax(100px, 1fr)
    minmax(110px, 1fr)
    64px;
}

.crm-act-page .crm-crm-col-type {
  display: flex;
  justify-content: center;
}

.crm-act-page .crm-crm-col-type .crm-tl-icon {
  margin: 0;
  flex-shrink: 0;
}

.crm-act-page .crm-crm-col-member,
.crm-act-page .crm-crm-col-date {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-crm-row-meta {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.35;
}

@media (max-width: 991px) {
  .crm-tasks-page .crm-task-table,
  .crm-act-page .crm-act-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .crm-tasks-page .crm-task-table .crm-crm-table-hdr,
  .crm-tasks-page .crm-task-table .crm-crm-table-row {
    min-width: 860px;
  }

  .crm-tasks-page .crm-task-table-completed .crm-crm-table-hdr,
  .crm-tasks-page .crm-task-table-completed .crm-crm-table-row {
    min-width: 720px;
  }

  .crm-act-page .crm-act-table .crm-crm-table-hdr,
  .crm-act-page .crm-act-table .crm-crm-table-row {
    min-width: 720px;
  }
}

/* Opportunity list ? full-width table grid */
.crm-opp-page .crm-opp-table {
  width: 100%;
}

.crm-opp-page .crm-opp-table-hdr,
.crm-opp-page .crm-opp-table-row {
  display: grid;
  grid-template-columns:
    minmax(168px, auto)
    minmax(160px, 2fr)
    minmax(88px, 0.9fr)
    78px
    minmax(72px, 0.7fr)
    minmax(100px, 1fr)
    56px
    minmax(72px, 0.7fr)
    minmax(110px, 1fr)
    64px;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 16px;
}

.crm-opp-page .crm-opp-table-closed .crm-opp-table-hdr,
.crm-opp-page .crm-opp-table-closed .crm-opp-table-row {
  grid-template-columns:
    minmax(168px, auto)
    minmax(180px, 2.2fr)
    minmax(100px, 1fr)
    78px
    minmax(80px, 0.8fr)
    minmax(130px, 1.2fr)
    64px;
}

.crm-opp-page .crm-opp-table-hdr {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.crm-opp-page .crm-opp-table-row {
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  transition: background 0.12s;
}

.crm-opp-page .crm-opp-table-row:last-child {
  border-bottom: none;
}

.crm-opp-page .crm-opp-table-row:hover {
  background: #fafbfc;
}

.crm-opp-page .crm-opp-table-row-muted {
  opacity: 0.9;
}

.crm-opp-page .crm-opp-table-row-muted .crm-opp-row-title {
  color: #64748b;
}

.crm-opp-page .crm-opp-col {
  min-width: 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.35;
}

.crm-opp-page .crm-opp-col-main {
  align-self: start;
  padding-top: 1px;
}

.crm-opp-page .crm-opp-col-id {
  display: flex;
  align-items: center;
}

.crm-opp-page .crm-opp-col-id .crm-opp-email-token {
  margin-top: 0;
  width: auto;
  min-width: 148px;
  max-width: none;
  justify-content: space-between;
  padding: 7px 12px;
  font-size: 14px;
  gap: 8px;
}

.crm-opp-page .crm-opp-col-stage {
  display: flex;
  align-items: center;
}

.crm-opp-page .crm-opp-col-emails {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.crm-opp-page .crm-opp-col-emails .crm-opp-email-count {
  margin: 0;
}

.crm-opp-page .crm-opp-col-emails .crm-opp-email-count-zero {
  margin: 0;
}

.crm-opp-page .crm-opp-col-value {
  font-size: 14px;
  font-weight: 700;
  color: #1a6fd4;
  white-space: nowrap;
  text-align: right;
}

.crm-opp-page .crm-opp-col-prob {
  text-align: center;
  font-weight: 600;
}

.crm-opp-page .crm-opp-col-close,
.crm-opp-page .crm-opp-col-owner {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-opp-page .crm-opp-col-proposal {
  overflow: hidden;
}

.crm-opp-page .crm-opp-col-proposal .crm-linked-proposal {
  margin-top: 0;
  max-width: 100%;
}

.crm-opp-page .crm-opp-col-actions {
  display: flex;
  justify-content: flex-end;
}

.crm-opp-page .crm-opp-row-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
  line-height: 1.35;
  word-break: break-word;
}

.crm-opp-page .crm-opp-row-sub {
  margin-top: 2px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
}

.crm-opp-email-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.03em;
  line-height: 1.3;
  cursor: pointer;
  user-select: all;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.crm-opp-email-token-link {
  text-decoration: none;
  cursor: pointer;
}

a.crm-opp-email-token-link:hover,
.crm-opp-email-token:hover {
  background: #eef2f7;
  border-color: #cbd5e1;
  color: #0f172a;
  text-decoration: none;
}

.crm-opp-email-token-static {
  cursor: default;
  user-select: text;
}

.crm-opp-email-token-static:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1e293b;
}

.crm-opp-email-token:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.crm-opp-email-token-text {
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-opp-email-token-copy,
.crm-opp-email-token-copied {
  font-size: 0.95rem;
  flex-shrink: 0;
}

.crm-opp-email-token-copy {
  color: #94a3b8;
}

.crm-opp-email-token-copied {
  display: none;
  color: #16a34a;
}

.crm-opp-email-token.is-copied {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.crm-opp-email-token.is-copied .crm-opp-email-token-copy {
  display: none;
}

.crm-opp-email-token.is-copied .crm-opp-email-token-copied {
  display: inline-block;
}

.crm-opportunities-list-page .crm-opp-email-token {
  margin-top: 0;
}

.crm-opportunities-list-page .crm-opp-id-link {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1a6fd4;
  text-decoration: none;
}

.crm-opportunities-list-page .crm-opp-id-link:hover {
  color: #1558ad;
  text-decoration: underline;
}

.crm-opportunities-list-page .crm-opp-id-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #475569;
}

.crm-opportunities-list-page .crm-opp-cc-note {
  margin-bottom: 14px;
}

.crm-opportunities-list-page .crm-col-id {
  width: 11rem;
  min-width: 11rem;
  white-space: nowrap;
}

.crm-opportunities-list-page .crm-col-emails .crm-opp-email-count {
  margin: 0;
}

.crm-opp-cc-note {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.crm-opp-cc-note-label {
  font-weight: 700;
  color: #475569;
}

.crm-opp-cc-note-email,
.crm-opp-cc-note-token {
  color: #475569;
  font-weight: 600;
}

.crm-opp-cc-note-token {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

.crm-opp-emails-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  margin-left: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
  vertical-align: top;
}

.crm-opp-emails-link:hover {
  background: #dbeafe;
  color: #1e40af;
  text-decoration: none;
}

.crm-opp-email-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 3rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.12);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}

a.crm-opp-email-count:hover {
  background: #dbeafe;
  border-color: #60a5fa;
  color: #1e40af;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.18);
}

a.crm-opp-email-count:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.12);
}

.crm-opp-email-count .bi {
  font-size: 0.9rem;
}

.crm-opp-email-count-zero {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-weight: 500;
  box-shadow: none;
  cursor: default;
}

.crm-opp-page .crm-opp-row-notes {
  margin-top: 0;
}

.crm-opp-page .crm-opp-prob-high { color: #16a34a; }
.crm-opp-page .crm-opp-prob-mid { color: #d97706; }
.crm-opp-page .crm-opp-prob-low { color: #94a3b8; }
.crm-opp-page .crm-opp-table-hdr .crm-opp-col-value {
  text-align: right;
}

.crm-opp-page .crm-opp-table-hdr .crm-opp-col-prob {
  text-align: center;
}

@media (max-width: 991px) {
  .crm-opp-page .crm-opp-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .crm-opp-page .crm-opp-table-hdr,
  .crm-opp-page .crm-opp-table-row {
    min-width: 1080px;
  }

  .crm-opp-page .crm-opp-table-closed .crm-opp-table-hdr,
  .crm-opp-page .crm-opp-table-closed .crm-opp-table-row {
    min-width: 820px;
  }
}

/* Legacy opp list item ? superseded by table grid on crm-opp-page */
.crm-opp-item {
  display: block;
}

.crm-opp-item-body {
  width: 100%;
  min-width: 0;
}

.crm-opp-item .crm-contact-list-title-row {
  margin-bottom: 0;
  align-items: center;
}

.crm-opp-item .crm-contact-list-title-row .crm-opp-item-value {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: #1a6fd4;
  white-space: nowrap;
}

.crm-opp-item .crm-contact-list-sub {
  margin-top: 4px;
}

.crm-opp-item-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 6px;
  justify-content: flex-start;
}

.crm-opp-item-footer .crm-contact-list-meta {
  flex: 0 1 auto;
  margin-top: 0;
}

.crm-opp-item-footer .crm-opp-item-actions {
  flex-shrink: 0;
}

.crm-opp-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.crm-opp-item-footer .crm-contact-list-meta:empty {
  display: none;
}

.crm-opp-item-footer-end {
  justify-content: flex-end;
}

.crm-contact-tab-page .crm-tl-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin: 0;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
}

.crm-contact-tab-page .crm-tl-item:hover {
  background: #fafbfc;
  border-color: #f1f5f9;
}

.crm-contact-tab-page .crm-tl-group-label {
  padding: 10px 16px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
  background: #fafbfc;
  border-bottom: 1px solid #f1f5f9;
}

.crm-contact-tab-page .crm-task-toggle-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  justify-content: center;
}

.crm-contact-tab-page .crm-task-toggle-btn span {
  display: none;
}

.crm-contact-tab-page .crm-task-check-done {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.crm-contact-tab-page .crm-contact-empty {
  margin: 24px 16px;
  border: 1px dashed #e2e8f0;
  border-radius: 10px;
}

.crm-crm-modal .modal-footer .crm-btn-secondary,
.crm-crm-modal .modal-footer input.crm-btn-secondary,
.crm-crm-modal .modal-footer button.crm-btn-secondary {
  background: #fff !important;
  border-color: #e2e8f0 !important;
  color: #4a5568 !important;
}

.crm-crm-modal .modal-footer .crm-btn-secondary:hover,
.crm-crm-modal .modal-footer input.crm-btn-secondary:hover,
.crm-crm-modal .modal-footer button.crm-btn-secondary:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1a1d23 !important;
}

/* Tasks page ? hint + checkbox complete */
.crm-tasks-page .crm-task-page-hint {
  margin: 0;
  padding: 12px 16px;
  font-size: 13px;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.crm-tasks-page .crm-task-page-hint strong {
  color: #334155;
  font-weight: 600;
}

.crm-task-row-busy {
  opacity: 0.55;
  pointer-events: none;
}

.crm-task-check-readonly {
  text-align: center;
  font-size: 12px;
}

/* Contact CRM tab pages ? opportunities, tasks, activities */
.crm-contact-tab-page .crm-tab-toolbar {
  margin-bottom: 16px;
}

.crm-contact-kpi-strip {
  margin-bottom: 16px;
}

.crm-contact-kpi-strip .crm-stat-sub.danger {
  color: #d13232;
}

.crm-linked-proposal {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  margin-top: 6px;
  padding: 3px 9px 3px 7px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  vertical-align: middle;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.crm-linked-proposal:hover {
  background: #f0f7ff;
  border-color: #bfdbfe;
  color: #1a6fd4;
  text-decoration: none;
}

.crm-linked-proposal .bi-file-earmark-text {
  font-size: 0.875rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.crm-linked-proposal .bi-bullseye {
  font-size: 0.875rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.crm-linked-proposal:hover .bi-file-earmark-text,
.crm-linked-proposal:hover .bi-bullseye {
  color: #1a6fd4;
}

.crm-linked-proposal-label {
  display: none;
}

.crm-linked-proposal-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  font-weight: 600;
}

.crm-linked-proposal .bi-box-arrow-up-right {
  display: none;
}

.crm-contact-tab-page .crm-linked-proposal {
  margin-top: 4px;
}

.crm-opp-card .crm-linked-proposal {
  margin-top: 8px;
}

.crm-crm-modal .modal-content {
  border: none;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.crm-crm-modal .modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.crm-crm-modal .modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1d23;
}

.crm-crm-modal .modal-body {
  padding: 1.25rem;
  background: #f8fafc;
}

.crm-crm-modal .modal-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.crm-crm-modal .modal-footer .crm-btn,
.crm-crm-modal .modal-footer input.crm-btn,
.crm-crm-modal .modal-footer button.crm-btn,
.crm-crm-modal .modal-footer a.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.crm-crm-modal .modal-footer .crm-btn-primary,
.crm-crm-modal .modal-footer input.crm-btn-primary,
.crm-crm-modal .modal-footer button.crm-btn-primary,
.crm-crm-modal .modal-footer a.crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-crm-modal .modal-footer .crm-btn-primary:hover,
.crm-crm-modal .modal-footer .crm-btn-primary:focus,
.crm-crm-modal .modal-footer input.crm-btn-primary:hover,
.crm-crm-modal .modal-footer input.crm-btn-primary:focus,
.crm-crm-modal .modal-footer button.crm-btn-primary:hover,
.crm-crm-modal .modal-footer button.crm-btn-primary:focus,
.crm-crm-modal .modal-footer a.crm-btn-primary:hover,
.crm-crm-modal .modal-footer a.crm-btn-primary:focus {
  background: #1559b0 !important;
  border-color: #1559b0 !important;
  color: #fff !important;
}

.crm-crm-modal .modal-footer .crm-btn-secondary,
.crm-crm-modal .modal-footer input.crm-btn-secondary,
.crm-crm-modal .modal-footer button.crm-btn-secondary,
.crm-crm-modal .modal-footer a.crm-btn-secondary {
  background: #fff !important;
  border-color: #e2e8f0 !important;
  color: #4a5568 !important;
}

.crm-crm-modal .modal-footer .crm-btn-secondary:hover,
.crm-crm-modal .modal-footer .crm-btn-secondary:focus,
.crm-crm-modal .modal-footer input.crm-btn-secondary:hover,
.crm-crm-modal .modal-footer input.crm-btn-secondary:focus,
.crm-crm-modal .modal-footer button.crm-btn-secondary:hover,
.crm-crm-modal .modal-footer button.crm-btn-secondary:focus,
.crm-crm-modal .modal-footer a.crm-btn-secondary:hover,
.crm-crm-modal .modal-footer a.crm-btn-secondary:focus {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1a1d23 !important;
}

.crm-tab-toolbar .crm-btn,
.crm-tab-toolbar input.crm-btn,
.crm-tab-toolbar button.crm-btn,
.crm-tab-toolbar a.crm-btn,
.crm-contact-list-card-hdr .crm-btn,
.crm-contact-list-card-hdr input.crm-btn,
.crm-contact-list-card-hdr button.crm-btn,
.crm-contact-list-card-hdr a.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.crm-tab-toolbar a.crm-btn:hover,
.crm-tab-toolbar a.crm-btn:focus,
.crm-contact-list-card-hdr a.crm-btn:hover,
.crm-contact-list-card-hdr a.crm-btn:focus {
  text-decoration: none;
}

.crm-tab-toolbar .crm-btn-primary,
.crm-tab-toolbar input.crm-btn-primary,
.crm-tab-toolbar button.crm-btn-primary,
.crm-tab-toolbar a.crm-btn-primary,
.crm-contact-list-card-hdr .crm-btn-primary,
.crm-contact-list-card-hdr input.crm-btn-primary,
.crm-contact-list-card-hdr button.crm-btn-primary,
.crm-contact-list-card-hdr a.crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-tab-toolbar .crm-btn-primary:hover,
.crm-tab-toolbar .crm-btn-primary:focus,
.crm-tab-toolbar input.crm-btn-primary:hover,
.crm-tab-toolbar input.crm-btn-primary:focus,
.crm-tab-toolbar button.crm-btn-primary:hover,
.crm-tab-toolbar button.crm-btn-primary:focus,
.crm-tab-toolbar a.crm-btn-primary:hover,
.crm-tab-toolbar a.crm-btn-primary:focus,
.crm-contact-list-card-hdr .crm-btn-primary:hover,
.crm-contact-list-card-hdr .crm-btn-primary:focus,
.crm-contact-list-card-hdr input.crm-btn-primary:hover,
.crm-contact-list-card-hdr input.crm-btn-primary:focus,
.crm-contact-list-card-hdr button.crm-btn-primary:hover,
.crm-contact-list-card-hdr button.crm-btn-primary:focus,
.crm-contact-list-card-hdr a.crm-btn-primary:hover,
.crm-contact-list-card-hdr a.crm-btn-primary:focus {
  background: #1559b0 !important;
  border-color: #1559b0 !important;
  color: #fff !important;
}

.crm-tab-toolbar .crm-btn-sm,
.crm-tab-toolbar input.crm-btn-sm,
.crm-tab-toolbar button.crm-btn-sm,
.crm-tab-toolbar a.crm-btn-sm,
.crm-contact-list-card-hdr .crm-btn-sm,
.crm-contact-list-card-hdr input.crm-btn-sm,
.crm-contact-list-card-hdr button.crm-btn-sm,
.crm-contact-list-card-hdr a.crm-btn-sm {
  min-height: 30px;
  padding: 6px 12px !important;
  font-size: 12px !important;
}

/* Shared Show more / Show less (comm.aspx, editsum.aspx, summary, portal widgets) */
.crm-show-more-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.85rem;
  color: #64748b;
  font-size: 12px;
}

.crm-show-more-btn,
a.crm-show-more-btn,
button.crm-show-more-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-sizing: border-box !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0 10px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  background: #fff !important;
  color: #1e293b !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none !important;
}

.crm-show-more-btn:hover,
a.crm-show-more-btn:hover,
button.crm-show-more-btn:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  text-decoration: none !important;
}

.crm-show-more-btn .bi {
  font-size: 13px;
  line-height: 1;
}

.crm-crm-modal .crm-modal-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.125rem;
  margin-bottom: 1rem;
}

.crm-crm-modal .crm-modal-section:last-child {
  margin-bottom: 0;
}

.crm-crm-modal .crm-form-section {
  margin: 0 0 0.875rem;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.crm-opp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.crm-opp-card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.crm-opp-card-aside {
  text-align: right;
  flex-shrink: 0;
}

.crm-opp-empty,
.crm-contact-empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: #8a9ab0;
  border: 1px dashed #e2e8f0;
  border-radius: 12px;
  background: #fafbfc;
}

.crm-opp-empty .bi,
.crm-contact-empty .bi {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.45;
}

.crm-opp-closed-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1a6fd4;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}

.crm-opp-closed-toggle:hover {
  background: #f0f7ff;
  color: #1558a8;
}

.crm-task-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-contact-tab-page .crm-task-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.crm-contact-tab-page .crm-task-item:hover {
  border-color: #cbd5e1;
  background: #fafbfc;
}

.crm-contact-tab-page .crm-task-item.crm-task-done {
  opacity: 0.85;
  background: #f8fafc;
}

.crm-task-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.crm-activity-count-badge {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.crm-type-picker .btn-check + .btn {
  border-color: #e2e8f0;
  color: #475569;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
}

.crm-type-picker .btn-check + .btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.crm-type-picker .btn-check:checked + .btn {
  background: #1a6fd4;
  border-color: #1a6fd4;
  color: #fff;
  box-shadow: 0 0 0 0.15rem rgba(26, 111, 212, 0.18);
}

.crm-contact-tab-page .crm-tl-item {
  border-radius: 10px;
  margin: 0 8px 6px;
  border: 1px solid transparent;
}

.crm-contact-tab-page .crm-tl-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.crm-tl-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .crm-opp-meta-grid { grid-template-columns: 1fr; }
  .crm-stage-step { font-size: 12px; padding: 6px 2px; }
}

/* Contact / CRM files tab (files.aspx) */
.crm-files-page {
  max-width: 100%;
}

.crm-files-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
  color: #8a9ab0;
}

.crm-files-page .crm-files-archive-filter {
  min-width: 140px;
}

.crm-files-page .crm-page-header-actions .crm-filter-select {
  min-height: 30px;
  height: 30px;
  font-size: 0.78rem;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

/* Match KPI header Edit / Exit / Kore height (30px) */
.crm-files-page .crm-page-header-actions .crm-btn,
.crm-files-page .crm-page-header-actions a.crm-btn,
.crm-files-page .crm-page-header-actions .crm-btn-sm,
.crm-files-page .crm-page-header-actions a.crm-btn-sm {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  box-sizing: border-box !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0.2rem 0.75rem !important;
  border-radius: 6px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.crm-files-page .crm-page-header-actions .crm-btn .bi {
  font-size: 0.85rem;
  line-height: 1;
}

/* Print All ? file_report.aspx (standalone popup, no master) */
.crm-files-print-page {
  background: #f5f7fa;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}

.crm-files-print-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 20;
}

.crm-files-print-toolbar .crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  cursor: pointer;
  box-sizing: border-box;
}

.crm-files-print-toolbar .crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-files-print-toolbar .crm-btn-primary:hover {
  background: #1559b0 !important;
  border-color: #1559b0 !important;
  color: #fff !important;
}

.crm-files-print-toolbar .crm-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1a1d23;
}

.crm-files-print-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.crm-files-print-report {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 28px 32px;
}

.crm-files-print-hdr {
  text-align: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.crm-files-print-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1d23;
  margin: 0;
  line-height: 1.3;
}

.crm-files-print-sub {
  font-size: 13px;
  color: #8a9ab0;
  margin-top: 4px;
}

.crm-files-print-thread {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eef2f6;
  page-break-inside: avoid;
}

.crm-files-print-thread:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.crm-files-print-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: #edf2f7;
  color: #4a5568;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.crm-files-print-reply-count {
  font-weight: 500;
  color: #8a9ab0;
  margin-left: 6px;
}

.crm-files-print-page .RadTreeView,
.crm-files-print-page .crm-files-print-tree {
  font-size: 13px;
  color: #1a1d23;
}

.crm-files-print-page .RadTreeView .rtChk {
  display: none !important;
}

.crm-files-print-page .RadTreeView a,
.crm-files-print-page .crm-files-print-tree a,
.crm-files-print-page .RadTreeView .rtIn {
  color: #1a6fd4 !important;
  text-decoration: none !important;
}

@media print {
  .no-print,
  .crm-files-print-toolbar {
    display: none !important;
  }

  .crm-files-print-page {
    background: #fff;
  }

  .crm-files-print-shell {
    max-width: none;
    padding: 0;
  }

  .crm-files-print-report {
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }

  .crm-files-print-thread {
    page-break-inside: avoid;
  }
}

.crm-files-layout {
  margin-left: 0;
  margin-right: 0;
}

.crm-files-list-col,
.crm-files-detail-col {
  min-width: 0;
}

.crm-files-pane {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  height: 100%;
}

.crm-files-error {
  display: block;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #f1c2c2;
  border-radius: 10px;
  background: #fef2f2;
  color: #9b1c1c;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.crm-files-error:empty,
.crm-files-error[style*="display:none"],
.crm-files-error[style*="display: none"] {
  display: none !important;
  margin: 0;
  padding: 0;
  border: none;
}

.crm-files-list-hdr {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
}

.crm-files-thread-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.crm-files-thread-search-field > .bi-search {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}

.crm-files-thread-search-input.form-control {
  height: 32px;
  font-size: 13px;
  font-weight: 400;
  padding: 6px 32px 6px 30px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  box-shadow: none;
}

.crm-files-thread-search-input.form-control:focus {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
}

.crm-files-thread-search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.crm-files-thread-search-clear:hover,
.crm-files-thread-search-clear:focus {
  background: #f1f5f9;
  color: #0f172a;
  outline: none;
}

.crm-files-thread-search-clear[hidden] {
  display: none !important;
}

.crm-files-thread-search-empty {
  padding: 1.5rem 1rem !important;
}

.crm-files-thread-search-empty[hidden] {
  display: none !important;
}

.crm-files-filter {
  flex: 1;
  min-width: 100px;
}

.crm-files-filter .crm-filter-select {
  width: 100%;
  font-size: 13px;
}

.crm-files-list-scroll {
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}

.crm-files-list-entry .crm-files-list-item {
  display: block;
}

.crm-files-list-item,
.crm-files-list-item:hover,
.crm-files-list-item:focus,
.crm-files-list-item:active {
  border: none;
  border-bottom: 1px solid #f1f3f5;
  border-left: 3px solid transparent;
  border-radius: 0;
  padding: 12px 14px 12px 11px;
  text-align: left;
  width: 100%;
  background: #fff;
  color: #1a1d23;
  text-decoration: none !important;
  display: block;
  box-shadow: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.crm-files-list-item:hover {
  background: #f8fafc;
  color: #1a1d23;
}

.crm-files-list-item.active,
.crm-files-list-item.active:hover {
  background: #e8f0fb;
  border-left-color: #1a6fd4;
  color: #1a1d23;
}

.crm-files-list-item.is-unread .crm-files-list-title {
  font-weight: 700;
}

.crm-files-list-item * {
  text-decoration: none !important;
}

.crm-files-list-item.active .crm-files-list-title {
  color: #1a6fd4;
  font-weight: 600;
}

.crm-files-list-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.crm-files-list-status {
  min-width: 1.5rem;
  padding-top: 2px;
  text-align: right;
}

.crm-files-list-num {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}

.crm-files-list-body {
  flex: 1;
  min-width: 0;
}

.crm-files-type {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.4;
}

.crm-files-type-forum {
  background: #e8f0fb;
  color: #1a6fd4;
}

.crm-files-type-design {
  background: #f3e8ff;
  color: #7c3aed;
}

.crm-files-type-task {
  background: #ecfdf5;
  color: #059669;
}

.crm-files-badge-new {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: 4px;
  background: #dcfce7;
  color: #15803d;
}

.crm-files-badge-replies {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.crm-files-list-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
  line-height: 1.35;
  word-break: break-word;
}

.crm-files-list-att {
  margin-left: 6px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 400;
}

.crm-files-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #8a9ab0;
  margin-top: 4px;
}

.crm-files-detail-pane .crm-files-detail-body {
  padding: 0;
}

.crm-files-detail-body {
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.crm-files-empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: #8a9ab0;
}

.crm-files-empty-detail {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.crm-files-empty-icon {
  font-size: 2.5rem;
  color: #cbd5e1;
  margin-bottom: 12px;
  display: block;
}

.crm-files-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 6px;
}

.crm-files-empty-hint {
  font-size: 14px;
  color: #8a9ab0;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.45;
}

/* Forum thread detail */
.crm-files-forum {
  padding: 18px 20px 22px;
}

.crm-files-doc-hdr {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef2f7;
}

.crm-files-doc-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.crm-files-doc-title {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  color: #1a1d23;
  line-height: 1.3;
  flex: 1 1 auto;
}

.crm-files-doc-id {
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 600;
}

.crm-files-doc-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 14px;
}

.crm-files-doc-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155 !important;
  text-decoration: none !important;
  font-weight: 500;
}

.crm-files-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8f0fb;
  color: #1a6fd4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.crm-files-doc-sep {
  color: #cbd5e1;
}

.crm-files-doc-status {
  color: #64748b;
}

.crm-files-page .crm-files-doc-actions,
.crm-files-page .crm-files-doc-actions .crm-btn,
.crm-files-page .crm-files-doc-actions a.crm-btn,
.crm-files-page .crm-files-forum .crm-btn,
.crm-files-page .crm-files-forum a.crm-btn,
.crm-files-page .crm-files-sdr .crm-btn,
.crm-files-page .crm-files-sdr a.crm-btn,
.crm-files-page .crm-files-task .crm-btn,
.crm-files-page .crm-files-task a.crm-btn,
.crm-files-page .crm-files-detail-pane .crm-btn,
.crm-files-page .crm-files-detail-pane a.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 10px !important;
  border-radius: 5px;
  font-size: 12px !important;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  border: none !important;
  background: transparent;
  color: #4a5568;
  box-shadow: none !important;
  cursor: pointer;
  box-sizing: border-box;
}

.crm-files-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.crm-files-doc-actions-compact {
  margin-top: 10px;
}

.crm-files-page .crm-files-forum .crm-btn:hover,
.crm-files-page .crm-files-forum a.crm-btn:hover,
.crm-files-page .crm-files-sdr .crm-btn:hover,
.crm-files-page .crm-files-sdr a.crm-btn:hover,
.crm-files-page .crm-files-task .crm-btn:hover,
.crm-files-page .crm-files-task a.crm-btn:hover,
.crm-files-page .crm-files-detail-pane .crm-btn:hover,
.crm-files-page .crm-files-detail-pane a.crm-btn:hover {
  background: #f1f5f9 !important;
  color: #1a1d23 !important;
}

.crm-files-page .crm-files-forum .crm-btn-primary,
.crm-files-page .crm-files-forum a.crm-btn-primary,
.crm-files-page .crm-files-sdr .crm-btn-primary,
.crm-files-page .crm-files-sdr a.crm-btn-primary,
.crm-files-page .crm-files-task .crm-btn-primary,
.crm-files-page .crm-files-task a.crm-btn-primary,
.crm-files-page .crm-files-detail-pane .crm-btn-primary,
.crm-files-page .crm-files-detail-pane a.crm-btn-primary {
  background: #e8f0fb !important;
  color: #1a6fd4 !important;
}

.crm-files-page .crm-files-forum .crm-btn-primary:hover,
.crm-files-page .crm-files-forum a.crm-btn-primary:hover,
.crm-files-page .crm-files-sdr .crm-btn-primary:hover,
.crm-files-page .crm-files-sdr a.crm-btn-primary:hover,
.crm-files-page .crm-files-task .crm-btn-primary:hover,
.crm-files-page .crm-files-task a.crm-btn-primary:hover,
.crm-files-page .crm-files-detail-pane .crm-btn-primary:hover,
.crm-files-page .crm-files-detail-pane a.crm-btn-primary:hover {
  background: #d7e8fa !important;
  color: #1559b0 !important;
}

.crm-files-page .crm-files-forum .crm-btn-secondary,
.crm-files-page .crm-files-forum a.crm-btn-secondary,
.crm-files-page .crm-files-sdr .crm-btn-secondary,
.crm-files-page .crm-files-sdr a.crm-btn-secondary,
.crm-files-page .crm-files-task .crm-btn-secondary,
.crm-files-page .crm-files-task a.crm-btn-secondary,
.crm-files-page .crm-files-detail-pane .crm-btn-secondary,
.crm-files-page .crm-files-detail-pane a.crm-btn-secondary {
  background: transparent !important;
  color: #475569 !important;
}

.crm-files-page .crm-files-forum .crm-btn-secondary:hover,
.crm-files-page .crm-files-forum a.crm-btn-secondary:hover,
.crm-files-page .crm-files-sdr .crm-btn-secondary:hover,
.crm-files-page .crm-files-sdr a.crm-btn-secondary:hover,
.crm-files-page .crm-files-task .crm-btn-secondary:hover,
.crm-files-page .crm-files-task a.crm-btn-secondary:hover,
.crm-files-page .crm-files-detail-pane .crm-btn-secondary:hover,
.crm-files-page .crm-files-detail-pane a.crm-btn-secondary:hover {
  background: #f1f5f9 !important;
  color: #1a6fd4 !important;
}

.crm-files-page .crm-files-forum .crm-btn-danger,
.crm-files-page .crm-files-forum a.crm-btn-danger,
.crm-files-page .crm-files-sdr .crm-btn-danger,
.crm-files-page .crm-files-sdr a.crm-btn-danger,
.crm-files-page .crm-files-task .crm-btn-danger,
.crm-files-page .crm-files-task a.crm-btn-danger,
.crm-files-page .crm-files-detail-pane .crm-btn-danger,
.crm-files-page .crm-files-detail-pane a.crm-btn-danger {
  background: transparent !important;
  color: #b91c1c !important;
}

.crm-files-page .crm-files-forum .crm-btn-danger:hover,
.crm-files-page .crm-files-forum a.crm-btn-danger:hover,
.crm-files-page .crm-files-sdr .crm-btn-danger:hover,
.crm-files-page .crm-files-sdr a.crm-btn-danger:hover,
.crm-files-page .crm-files-task .crm-btn-danger:hover,
.crm-files-page .crm-files-task a.crm-btn-danger:hover,
.crm-files-page .crm-files-detail-pane .crm-btn-danger:hover,
.crm-files-page .crm-files-detail-pane a.crm-btn-danger:hover {
  background: #fef2f2 !important;
  color: #991b1b !important;
}

.crm-files-page .crm-files-forum .crm-btn-sm,
.crm-files-page .crm-files-sdr .crm-btn-sm,
.crm-files-page .crm-files-task .crm-btn-sm,
.crm-files-page .crm-files-detail-pane .crm-btn-sm {
  min-height: 26px;
  padding: 3px 8px !important;
  font-size: 12px !important;
}

.crm-files-doc-body {
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  margin: 0 0 18px;
}

.crm-files-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  color: #1a1d23;
  margin-bottom: 8px;
}

.crm-files-section-title .bi {
  color: #1a6fd4;
}

/* Attachments: white surface, hairline only ? no gray card fill */
.crm-files-files-panel {
  margin: 0 0 18px;
  padding: 0;
  background: transparent;
  border: none;
}

.crm-files-files-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f7;
}

.crm-files-checkall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.crm-file-attach-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-file-attach-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
}

.crm-file-attach-item:last-child {
  border-bottom: none;
}

.crm-file-attach-icon {
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  width: 1.25rem;
  text-align: center;
  flex: 0 0 auto;
}

.crm-file-attach-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.crm-file-attach-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 550;
  color: #1a6fd4 !important;
  text-decoration: none !important;
  word-break: break-word;
}

.crm-file-attach-name:hover {
  text-decoration: underline !important;
}

.crm-file-attach-size {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
  text-align: right;
}

.crm-files-files-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
}

.crm-files-ext-link {
  margin: 0;
}

.crm-files-ext-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.crm-files-ext-url {
  font-size: 12px;
  word-break: break-all;
  color: #475569;
}

.crm-copy-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #0f766e !important;
  text-decoration: none !important;
  cursor: pointer;
}

.crm-copy-link-btn:hover {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #0f766e !important;
}

.crm-copy-link-btn i {
  font-size: 15px;
  line-height: 1;
}

.crm-files-meta-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 4px;
}

.crm-files-replies {
  margin-top: 8px;
}

.crm-files-reply {
  border-top: 1px solid #eef2f7;
  padding: 14px 0;
  margin: 0;
  background: transparent;
}

.crm-files-reply-hdr {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.crm-files-reply-num {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  margin-right: 6px;
}

.crm-files-reply-title {
  font-size: 14px;
  color: #1a1d23;
}

.crm-files-reply-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #8a9ab0;
}

.crm-files-reply-body {
  margin-bottom: 8px;
}

/* Soften legacy Material chrome when design/task UCs embed in files page */
.crm-files-page .crm-files-detail-body .card {
  border: none;
  box-shadow: none;
  margin: 0;
}

.crm-files-page .crm-files-detail-body .card-header.card-header-icon {
  background: #fff;
  border-bottom: 1px solid #eef2f7;
  color: #1a1d23;
  padding: 14px 16px;
}

.crm-files-page .crm-files-detail-body .card-header .card-icon {
  display: none;
}

.crm-files-page .crm-files-detail-body .card-title {
  font-size: 16px;
  font-weight: 650;
  color: #1a1d23;
  margin: 0;
}

.crm-files-page .crm-files-detail-body .card-body {
  padding: 16px 18px;
}

.crm-files-page .crm-files-detail-body label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 2px;
}


/* Add / edit file forms ? use shared .crm-add-form field styles */

/* Contact emails tab (contact_emails.aspx + deliverable_comm contact mode) */
.crm-deliverable-comm-card {
  overflow: hidden;
}

.crm-emails-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.crm-emails-toolbar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.crm-emails-toolbar-actions--start {
  margin-right: 0;
}

.crm-emails-toolbar-actions--end {
  margin-left: auto;
}

.crm-emails-toolbar-title {
  flex: 1 1 auto;
  min-width: 0;
}

.crm-emails-search {
  width: 320px;
  max-width: 100%;
}

.crm-emails-grid-wrap {
  position: relative;
  min-height: 160px;
}

.crm-emails-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.82);
}

.crm-emails-loading-inner {
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
}

.crm-emails-search .form-control {
  border-color: #e2e8f0;
  background: #fff;
  box-shadow: none;
}

.crm-emails-search .form-control:focus {
  border-color: #cbd5e1;
  box-shadow: none;
}

.crm-emails-search-btn {
  border-color: #e2e8f0 !important;
  background: #fff !important;
  color: #64748b !important;
  box-shadow: none !important;
}

.crm-emails-search-btn:hover,
.crm-emails-search-btn:focus {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #334155 !important;
}

/* Non-CRM pages use the same light toolbar layout */
.deliverable-comm-card > .border-bottom.bg-light,
.deliverable-comm-card .px-3.py-2.border-bottom.bg-light {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crm-emails-table {
  margin-bottom: 0;
  font-size: 14px;
}

.crm-emails-table > :not(caption) > * > * {
  padding: 10px 14px;
  font-size: 14px;
  color: #1a1d23;
  vertical-align: middle;
  border-bottom: 1px solid #f1f3f5;
}

.crm-emails-thead th {
  font-size: 12px;
  font-weight: 600;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.crm-page .crm-emails-table tbody tr:hover td {
  background: #e8f0fb;
  cursor: pointer;
}

.crm-emails-empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: #8a9ab0;
}

.crm-emails-empty-icon {
  font-size: 2rem;
  color: #cbd5e1;
  display: block;
  margin-bottom: 10px;
}

.crm-emails-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 4px;
}

.crm-emails-empty-hint {
  font-size: 14px;
  color: #8a9ab0;
}

.crm-deliverable-comm-card .border-top.bg-light {
  background: #f8fafc !important;
  border-top-color: #e2e8f0 !important;
}

/* Deliverable emails/meetings sub-tabs (projects_deliverable_emails.aspx) */
.crm-page.crm-deliverable-page .deliverable-comm-card .crm-deliverable-comm-subnav {
  padding: 0 0.75rem 0.35rem;
  margin-bottom: 0;
  background: transparent;
  border: none;
}

.crm-page.crm-deliverable-page .deliverable-comm-card .crm-deliverable-comm-subnav .proposal-subnav {
  gap: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.crm-page.crm-deliverable-page .deliverable-comm-card .crm-deliverable-comm-subnav .nav-link {
  border: none;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.crm-page.crm-deliverable-page .deliverable-comm-card .crm-deliverable-comm-subnav .nav-link:hover,
.crm-page.crm-deliverable-page .deliverable-comm-card .crm-deliverable-comm-subnav .nav-link:focus {
  background: transparent;
  border: none;
  border-bottom: 2px solid #e2e8f0;
  color: #1a1d23;
  box-shadow: none;
}

.crm-page.crm-deliverable-page .deliverable-comm-card .crm-deliverable-comm-subnav .nav-link.active,
.crm-page.crm-deliverable-page .deliverable-comm-card .crm-deliverable-comm-subnav button.nav-link.active {
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid #1a6fd4 !important;
  color: #1a6fd4 !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

/* Portfolio homepage header actions (View Contacts / View Companies / Add) */
.crm-page .crm-page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-page .crm-page-header-actions .crm-btn,
.crm-page .crm-page-header-actions a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.crm-page .crm-page-header-actions a.crm-btn:hover,
.crm-page .crm-page-header-actions a.crm-btn:focus {
  text-decoration: none;
}

.crm-page .crm-page-header-actions .crm-btn-secondary:hover,
.crm-page .crm-page-header-actions .crm-btn-secondary:focus {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1a1d23;
}

.crm-page .crm-page-header-actions .crm-btn-primary,
.crm-page .crm-page-header-actions a.btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-page .crm-page-header-actions .crm-btn-primary:hover,
.crm-page .crm-page-header-actions .crm-btn-primary:focus,
.crm-page .crm-page-header-actions a.btn-primary:hover,
.crm-page .crm-page-header-actions a.btn-primary:focus {
  background: #1559b0 !important;
  border-color: #1559b0 !important;
  color: #fff !important;
}

.crm-page .crm-page-header-actions .crm-btn .bi {
  font-size: 14px;
  line-height: 1;
}

/* List toolbar (contacts homepage) */
.crm-list-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.crm-list-count {
  margin-left: auto;
  font-size: 13px;
  color: #8a9ab0;
  white-space: nowrap;
}

.crm-filter-input {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  color: #1e293b;
  font-size: 14px;
  outline: none;
  min-width: 220px;
}

.crm-filter-input:focus {
  border-color: #1a6fd4;
}

.crm-filter-select.form-select {
  width: auto;
  min-width: 140px;
  font-size: 14px;
  /* Keep right padding for Bootstrap chevron ? do not use shorthand that sets padding-right: 12px */
  padding: 8px 2.5rem 8px 12px;
  border-radius: 6px;
  background-position: right 0.65rem center;
  background-size: 14px 10px;
}

.crm-filter-select-contact-type {
  min-width: 280px;
  width: 280px;
  max-width: 100%;
}

.crm-filter-select-contact-owner {
  min-width: 160px;
  max-width: 200px;
}

.crm-filter-select-pipeline-stage {
  min-width: 170px;
  max-width: 210px;
}

/* Commission tracking report (Enhancement 7) */
.crm-page.crm-commission-report-page .crm-commission-pending-rule {
  font-size: 13px;
}

.crm-page.crm-commission-report-page .crm-commission-notes {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.crm-page.crm-commission-report-page .crm-commission-notes-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.crm-page.crm-commission-report-page .crm-commission-notes-summary::-webkit-details-marker {
  display: none;
}

.crm-page.crm-commission-report-page .crm-commission-notes-summary:hover {
  background: #f8fafc;
}

.crm-page.crm-commission-report-page .crm-commission-notes-caret {
  font-size: 13px;
  color: #64748b;
  transition: transform 0.2s ease;
}

.crm-page.crm-commission-report-page .crm-commission-notes[open] .crm-commission-notes-caret {
  transform: rotate(180deg);
}

.crm-page.crm-commission-report-page .crm-commission-notes-body {
  padding: 0 16px 14px;
  border-top: 1px solid #f1f5f9;
}

.crm-page.crm-commission-report-page .crm-commission-notes-list {
  margin: 12px 0 0;
  padding-left: 1.1rem;
  font-size: 13px;
  line-height: 1.55;
  color: #64748b;
}

.crm-page.crm-commission-report-page .crm-commission-notes-list li + li {
  margin-top: 0.45rem;
}

.crm-page.crm-commission-report-page .crm-commission-notes-list strong {
  color: #334155;
  font-weight: 600;
}

.crm-page.crm-commission-report-page .crm-commission-status-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.crm-page.crm-commission-report-page .crm-commission-kpi-row > .crm-stat-card {
  flex: 1 1 calc(25% - 8px);
  min-width: 140px;
}

.crm-page.crm-commission-report-page .crm-commission-table-card,
.crm-page.crm-commission-report-page .crm-commission-table-card .crm-sticky-table-wrap {
  overflow: visible;
}

.crm-page.crm-commission-report-page .crm-commission-table {
  border-collapse: separate;
  border-spacing: 0;
}

.crm-page.crm-commission-report-page .crm-commission-table thead th,
.crm-page.crm-commission-report-page .crm-commission-table th.crm-commission-th {
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  font-size: 12px !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  background-color: #f8fafc !important;
  background-clip: padding-box;
  border-top: none !important;
  border-bottom: 1px solid #e2e8f0;
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
  padding: 0.45rem 0.65rem;
  white-space: nowrap;
  vertical-align: middle;
}

.crm-page.crm-commission-report-page .crm-commission-table tbody td {
  font-size: 13px;
  padding: 0.45rem 0.65rem;
  border-bottom-color: #f1f5f9;
  vertical-align: middle;
}

.crm-page.crm-commission-report-page .crm-badge-amber {
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.crm-page.crm-commission-report-page .crm-commission-pay-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.crm-page.crm-commission-report-page .crm-commission-pay-notes-btn {
  padding: 0 4px;
  line-height: 1;
}

/* Bills & Expenses dashboard ? executive overview */
.crm-page.crm-ap-page .crm-ap-executive {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.crm-page.crm-ap-page .crm-ap-exec-header {
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.crm-page.crm-ap-page .crm-ap-exec-scope {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.4;
}
.crm-page.crm-ap-page .crm-ap-exec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}
.crm-page.crm-ap-page .crm-ap-exec-tile {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-right: 1px solid #f1f5f9;
  min-width: 0;
}
.crm-page.crm-ap-page .crm-ap-exec-tile:last-child {
  border-right: none;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-icon.is-bill {
  background: #dbeafe;
  color: #1d4ed8;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-icon.is-open {
  background: #e0e7ff;
  color: #4338ca;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-icon.is-expense {
  background: #ccfbf1;
  color: #0f766e;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-icon.is-attn {
  background: #fef3c7;
  color: #b45309;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-body {
  min-width: 0;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 4px;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-val {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.15;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-val.accent {
  color: #4338ca;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-sub {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-warn {
  background: #fffbeb;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-warn .crm-ap-exec-tile-val {
  color: #b45309;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-warn .crm-ap-exec-tile-icon.is-attn {
  background: #fde68a;
  color: #92400e;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-ok {
  background: #f0fdf4;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-ok .crm-ap-exec-tile-val {
  color: #15803d;
  font-size: 17px;
}
.crm-page.crm-ap-page .crm-ap-exec-tile-ok .crm-ap-exec-tile-icon.is-attn {
  background: #bbf7d0;
  color: #15803d;
}
@media (max-width: 1100px) {
  .crm-page.crm-ap-page .crm-ap-exec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .crm-page.crm-ap-page .crm-ap-exec-tile:nth-child(2) {
    border-right: none;
  }
  .crm-page.crm-ap-page .crm-ap-exec-tile:nth-child(1),
  .crm-page.crm-ap-page .crm-ap-exec-tile:nth-child(2) {
    border-bottom: 1px solid #f1f5f9;
  }
}
@media (max-width: 768px) {
  .crm-page.crm-ap-page .crm-ap-exec-grid {
    grid-template-columns: 1fr;
  }
  .crm-page.crm-ap-page .crm-ap-exec-tile {
    border-right: none;
    border-bottom: 1px solid #f1f5f9;
  }
  .crm-page.crm-ap-page .crm-ap-exec-tile:last-child {
    border-bottom: none;
  }
}

.crm-page.crm-ap-page .crm-ap-tabs .nav-link {
  font-weight: 600;
  color: #64748b;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.55rem 1rem;
}
.crm-page.crm-ap-page .crm-ap-tabs .nav-link.active {
  color: #1a1d23;
  background: transparent;
  border-bottom-color: #0d6efd;
}
.crm-page.crm-ap-page .crm-ap-tabs .nav-link,
.crm-page.crm-ap-page .crm-ap-tabs .nav-link:link,
.crm-page.crm-ap-page .crm-ap-tabs .nav-link:visited,
.crm-page.crm-ap-page .crm-ap-tabs .nav-link:hover,
.crm-page.crm-ap-page .crm-ap-tabs .nav-link:focus {
  text-decoration: none !important;
}
.crm-page.crm-ap-page .crm-ap-table thead th a,
.crm-page.crm-ap-page .crm-ap-table thead th a:link,
.crm-page.crm-ap-page .crm-ap-table thead th a:visited,
.crm-page.crm-ap-page .crm-ap-table thead th a:active,
.crm-page.crm-ap-page .crm-ap-table thead th a:focus {
  color: #8a9ab0 !important;
  text-decoration: none !important;
  font-weight: 600;
}
.crm-page.crm-ap-page .crm-ap-table thead th a:hover {
  color: #64748b !important;
  text-decoration: underline !important;
}
.crm-page.crm-ap-page .crm-ap-table tbody td a.crm-table-link,
.crm-page.crm-ap-page .crm-ap-table tbody td a.crm-table-link:link,
.crm-page.crm-ap-page .crm-ap-table tbody td a.crm-table-link:visited {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 500;
}
.crm-page.crm-ap-page .crm-ap-table tbody td a.crm-table-link:hover {
  color: #0a58ca;
  text-decoration: underline;
}
.crm-page.crm-ap-page .crm-ap-table-card,
.crm-page.crm-ap-page .crm-ap-table-card .crm-sticky-table-wrap {
  overflow: visible;
}
.crm-page.crm-ap-page .crm-ap-table thead th {
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.crm-page.crm-ap-page .crm-ap-table tbody td {
  font-size: 13px;
  padding: 0.45rem 0.65rem;
  border-bottom-color: #f1f5f9;
  vertical-align: middle;
}
#apClearedArchiveModal .modal-dialog.crm-ap-archive-modal-dialog {
  max-width: min(96vw, 1720px);
  width: 96vw;
  margin: 1.25rem auto;
}
#apClearedArchiveModal .modal-content {
  min-height: calc(100vh - 2.5rem);
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
}
#apClearedArchiveModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#apClearedArchiveModal .crm-ap-archive-table-wrap {
  flex: 1 1 auto;
  overflow: auto;
  max-width: 100%;
  max-height: calc(100vh - 13rem);
}
#apClearedArchiveModal .crm-ap-archive-table-wrap .crm-ap-table thead th {
  position: static;
  top: auto;
  z-index: auto;
}
#apClearedArchiveModal .crm-ap-archive-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
#apClearedArchiveModal .crm-ap-archive-toolbar .row {
  width: 100%;
}
#apClearedArchiveModal .ap-archive-chk-col {
  width: 2.25rem;
}
#apClearedArchiveModal .ap-archive-actions-col {
  width: 1%;
}
#apClearedArchiveModal .ap-archive-reopen-one {
  color: #1a6fd4 !important;
  border-color: #b8d4f0 !important;
  background: #f0f7ff !important;
  font-size: 12px !important;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0 9px !important;
  min-height: 28px;
  height: 28px;
  white-space: nowrap;
  text-decoration: none !important;
}
#apClearedArchiveModal .ap-archive-reopen-one .bi {
  color: #1a6fd4 !important;
  font-size: 14px;
}
#apClearedArchiveModal .ap-archive-reopen-one:hover,
#apClearedArchiveModal .ap-archive-reopen-one:focus,
#apClearedArchiveModal .ap-archive-reopen-one:focus-visible {
  background: #e8f0fb !important;
  border-color: #7eb8e8 !important;
  color: #1558a8 !important;
  text-decoration: none !important;
}
#apClearedArchiveModal .ap-archive-reopen-one:hover .bi,
#apClearedArchiveModal .ap-archive-reopen-one:focus .bi,
#apClearedArchiveModal .ap-archive-reopen-one:focus-visible .bi {
  color: #1558a8 !important;
}
.crm-page.crm-ap-page .crm-ap-attn-warn {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border: 1px solid #fbbf24;
  border-left: 4px solid #d97706;
  border-radius: 0.5rem;
  background: #fffbeb;
  color: #78350f;
}
.crm-page.crm-ap-page .crm-ap-attn-warn-icon {
  flex-shrink: 0;
  font-size: 1.5rem;
  color: #d97706;
  line-height: 1;
  margin-top: 0.1rem;
}
.crm-page.crm-ap-page .crm-ap-attn-warn-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: #92400e;
}
.crm-page.crm-ap-page .crm-ap-attn-warn-body p {
  font-size: 0.9rem;
  line-height: 1.45;
}
.crm-page.crm-ap-page .crm-ap-attn-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.crm-page.crm-ap-page .ap-attn-chk-col {
  width: 2.25rem;
}
.crm-page.crm-ap-page .ap-attn-actions-col {
  width: 1%;
}
.crm-page.crm-ap-page .ap-attn-clear-one {
  color: #b45309 !important;
  border-color: #fcd34d !important;
  background: #fffbeb !important;
  font-size: 12px !important;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0 9px !important;
  min-height: 28px;
  height: 28px;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(217, 119, 6, 0.08);
}
.crm-page.crm-ap-page .ap-attn-clear-one .bi {
  color: #d97706 !important;
  font-size: 14px;
}
.crm-page.crm-ap-page .ap-attn-clear-one:hover,
.crm-page.crm-ap-page .ap-attn-clear-one:focus,
.crm-page.crm-ap-page .ap-attn-clear-one:focus-visible {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #92400e !important;
  box-shadow: 0 1px 2px rgba(217, 119, 6, 0.12);
}
.crm-page.crm-ap-page .ap-attn-clear-one:hover .bi,
.crm-page.crm-ap-page .ap-attn-clear-one:focus .bi,
.crm-page.crm-ap-page .ap-attn-clear-one:focus-visible .bi {
  color: #b45309 !important;
}
.crm-page.crm-ap-page .ap-attn-clear-one:active {
  background: #fde68a !important;
  border-color: #d97706 !important;
  color: #78350f !important;
}
.crm-page.crm-ap-page .ap-prop-links a:hover {
  color: #0d6efd !important;
}
.crm-page.crm-ap-page .ap-type-badge {
  font-weight: 600;
  font-size: 12px;
  padding: 3px 9px;
  border: 1px solid transparent;
}
.crm-page.crm-ap-page .ap-type-bill {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
}
.crm-page.crm-ap-page .ap-type-expense {
  background: #ccfbf1 !important;
  color: #0f766e !important;
  border-color: #5eead4 !important;
}

.crm-page.crm-commission-report-page .crm-commission-pay-notes-btn:hover {
  color: #1558d6;
}

.crm-page.crm-commission-report-page #commissionPayModalProposal {
  font-weight: 600;
  color: #334155;
}

.crm-filter-select-proposal-company {
  min-width: 180px;
  max-width: 220px;
}

.crm-filter-select-proposal-mgr {
  min-width: 160px;
  max-width: 200px;
}

.crm-deliverables-toolbar .crm-deliverables-rollout-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Multi-select checklist filter dropdowns (Regions / Facility Types / Rollout Status) */
.crm-checklist-dd {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.crm-checklist-dd-btn.form-select {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: auto;
  min-width: 160px;
  max-width: 240px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  /* Keep Bootstrap form-select chevron; hide BS dropdown caret */
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #e2e8f0;
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: #1a6fd4;
  --bs-btn-active-bg: #fff;
  --bs-btn-active-border-color: #1a6fd4;
  color: #1e293b;
  box-shadow: none;
}

.crm-checklist-dd-btn.form-select::after {
  display: none;
}

.crm-checklist-dd-label {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 400;
}

.crm-checklist-dd-menu {
  min-width: 240px;
  max-width: 320px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  z-index: 1080;
}

.crm-checklist-dd-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
}

.crm-checklist-dd-all-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.crm-checklist-dd-clear {
  font-size: 12px;
  text-decoration: none;
  color: #64748b;
  white-space: nowrap;
}

.crm-checklist-dd-clear:hover {
  color: #1a6fd4;
}

.crm-checklist-dd-body {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px 0;
}

.crm-checklist-dd-list {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 8px;
  margin: 0;
  padding: 2px 4px;
}

.crm-checklist-dd-list input[type="checkbox"] {
  margin: 0 0 0 8px;
  accent-color: #1a6fd4;
  cursor: pointer;
}

.crm-checklist-dd-list label {
  display: block;
  margin: 0;
  padding: 7px 12px 7px 0;
  font-size: 13px;
  font-weight: 400;
  color: #1e293b;
  cursor: pointer;
  line-height: 1.35;
  border-radius: 4px;
}

.crm-checklist-dd-list label:hover {
  color: #0f172a;
}

.crm-checklist-dd-list br {
  display: none;
}

.crm-checklist-dd-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}

.crm-checklist-dd-apply {
  display: none !important;
}

.crm-filter-select-del-pm {
  min-width: 170px;
  max-width: 220px;
}

.crm-filter-select-del-milestone {
  min-width: 150px;
  max-width: 200px;
}

.crm-deliverables-secondary-filters {
  width: 100%;
  clear: both;
}

.crm-deliverables-due-date-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 400;
}

.crm-deliverables-due-date-cb {
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  vertical-align: middle;
}

.crm-deliverables-due-date-text {
  font-size: 14px;
  color: #475569;
  line-height: 1.2;
}

.crm-deliverables-date-range {
  display: none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.crm-deliverables-date-range.is-visible {
  display: flex;
}

.crm-deliverables-date-range .form-control {
  width: 150px;
  min-width: 150px;
}

.crm-deliverables-date-sep {
  color: #94a3b8;
  font-size: 14px;
}

.crm-deliverables-date-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-deliverables-rollout-counts {
  width: 100%;
  clear: both;
  margin-top: 0 !important;
}

.crm-deliverables-milestone-columns {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
}

.crm-deliverables-milestone-columns .crm-milestone-columns-picker {
  flex: 1 1 280px;
  min-width: 200px;
  max-width: 480px;
}

.crm-deliverables-milestone-columns .crm-milestone-columns-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.crm-deliverables-filter-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.crm-ford-matrix-table-wrap {
  overflow: visible;
  max-width: 100%;
}

/* Deliverables list grid ? shared on projects_deliverables, prop_deliverables2, prop_deliverables, Ford matrix */
.crm-deliverables-table-wrap {
  overflow: visible;
  max-width: 100%;
}

.crm-deliverables-table-wrap .dataTables_wrapper,
.crm-deliverables-table-wrap .dataTables_scroll,
.crm-deliverables-table-wrap .dataTables_scrollHead,
.crm-deliverables-table-wrap .dataTables_scrollBody {
  overflow: visible !important;
  width: 100% !important;
  max-width: 100%;
}

.crm-deliverables-table-wrap .dataTables_scrollHeadInner,
.crm-deliverables-table-wrap .dataTables_scrollHeadInner table,
.crm-deliverables-table-wrap table.dataTable {
  width: 100% !important;
  margin: 0 !important;
}

.crm-deliverables-table-wrap #rptid,
.crm-deliverables-table-wrap .crm-deliverables-table,
.crm-deliverables-table-wrap #fordMatrixTable {
  width: 100% !important;
  margin-bottom: 0;
  font-size: 14px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.crm-ford-matrix-table-wrap #fordMatrixTable {
  width: max-content !important;
  min-width: 100%;
}

.crm-deliverables-table-wrap #rptid thead th,
.crm-deliverables-table-wrap .crm-deliverables-table thead th,
.crm-deliverables-table-wrap #fordMatrixTable thead th,
.crm-deliverables-table-wrap #tblMilestoneDetails thead th,
.prop-rollout-page .prop-rollout-details-table-wrap #tblMilestoneDetails thead th {
  font-size: 12px;
  font-weight: 600;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
  padding: 10px 12px;
  white-space: nowrap;
  vertical-align: middle;
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  border-top: none !important;
  background-color: #f8fafc !important;
  background-clip: padding-box;
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
}

.crm-deliverables-table-wrap #rptid tbody td,
.crm-deliverables-table-wrap .crm-deliverables-table tbody td {
  font-size: 14px;
  padding: 10px 12px;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
  color: #1a1d23;
  line-height: 1.4;
}

.crm-deliverables-table-wrap #rptid tbody tr:hover td,
.crm-deliverables-table-wrap .crm-deliverables-table tbody tr:hover td {
  background: #f8fafc;
}

.crm-deliverable-name-link,
.crm-deliverables-table-wrap #rptid a.crm-deliverable-name-link,
.crm-deliverables-table-wrap .crm-deliverables-table a.crm-deliverable-name-link,
.crm-deliverables-table-wrap #rptid a.text-primary,
.crm-deliverables-table-wrap .crm-deliverables-table a.text-primary {
  font-size: 14px;
  font-weight: 600;
  color: #1a6fd4;
  text-decoration: none !important;
}

.crm-deliverable-name-link:hover,
.crm-deliverable-name-link:focus,
.crm-deliverables-table-wrap #rptid a.crm-deliverable-name-link:hover,
.crm-deliverables-table-wrap .crm-deliverables-table a.crm-deliverable-name-link:hover,
.crm-deliverables-table-wrap #rptid a.text-primary:hover,
.crm-deliverables-table-wrap .crm-deliverables-table a.text-primary:hover {
  color: #1558a8;
  text-decoration: none !important;
}

.crm-deliverables-table-wrap #rptid .bill-type-flat,
.crm-deliverables-table-wrap #rptid .crm-badge:not(.crm-badge-date-xs),
.crm-deliverables-table-wrap #rptid .crm-chip {
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.crm-deliverables-table-wrap #rptid .crm-badge-date-xs {
  font-size: 12px;
  font-weight: 600;
  padding: 1px 6px;
  line-height: 1.25;
  vertical-align: baseline;
}

.crm-deliverables-table-wrap #rptid .prop-del-last-task-line,
.crm-deliverables-table-wrap .crm-deliverables-table .prop-del-last-task-line {
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
}

.crm-deliverables-table-wrap #rptid .crm-deliverable-rollout-info,
.crm-deliverables-table-wrap .crm-deliverables-table .crm-deliverable-rollout-info {
  font-size: 14px;
  line-height: 1.4;
  color: #1a1d23;
}

.crm-deliverables-table-wrap .crm-deliverable-desc-cell {
  max-width: 28rem;
  white-space: normal;
  word-break: break-word;
}

.crm-contacts-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.crm-contacts-card:has(.crm-contacts-table),
.crm-contacts-card:has(.crm-proposals-table),
.crm-contacts-card:has(.crm-projects-table-wrap) {
  overflow: visible;
}

.crm-contacts-card .table {
  margin-bottom: 0;
}

.crm-contacts-card .crm-projects-table-wrap,
.crm-contacts-card .crm-proposals-table-wrap {
  overflow: visible;
  max-width: 100%;
}

.crm-contacts-card .crm-projects-table-wrap .dataTables_wrapper,
.crm-contacts-card .crm-proposals-table-wrap .dataTables_wrapper,
.crm-contacts-card .dataTables_wrapper,
.crm-contacts-card .crm-projects-table-wrap .dataTables_scroll,
.crm-contacts-card .crm-proposals-table-wrap .dataTables_scroll,
.crm-contacts-card .crm-projects-table-wrap .dataTables_scrollBody,
.crm-contacts-card .crm-proposals-table-wrap .dataTables_scrollBody,
.crm-contacts-card .dataTables_scroll,
.crm-contacts-card .dataTables_scrollBody {
  overflow: visible !important;
  width: 100% !important;
  max-width: 100%;
}

.crm-contacts-card .crm-projects-table-wrap table.dataTable,
.crm-contacts-card .crm-proposals-table-wrap table.dataTable,
.crm-contacts-card .crm-projects-table-wrap .dataTables_scrollHeadInner table,
.crm-contacts-card .crm-proposals-table-wrap .dataTables_scrollHeadInner table {
  width: 100% !important;
  margin: 0 !important;
}

.crm-page.crm-project-homepage .crm-list-toolbar {
  max-width: 100%;
}

/* Contacts list grid ? match prototype .contacts-table (13px cells, 11px headers) */
.crm-contacts-card .crm-contacts-table {
  width: 100%;
  margin-bottom: 0;
  font-size: 14px;
  border-collapse: separate;
  border-spacing: 0;
}

.crm-contacts-card .crm-contacts-table > :not(caption) > * > * {
  padding: 12px 14px;
  font-size: 14px;
  color: #1a1d23;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: none;
}

.crm-contacts-card .crm-contacts-table thead th {
  font-size: 12px;
  font-weight: 600;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 8px 10px;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
  white-space: normal;
  line-height: 1.25;
  vertical-align: bottom;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  border-top: none !important;
  background-color: #f8fafc !important;
  background-clip: padding-box;
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
}

/* Wide contact list (homepage) ? stacked headers + sane column mins */
.crm-contacts-card .crm-contact-list-table thead th {
  padding: 8px 8px;
}

.crm-contacts-card .crm-contact-list-table > :not(caption) > * > * {
  padding-left: 10px;
  padding-right: 10px;
}

.crm-contacts-card .crm-contact-list-table .crm-col-email {
  min-width: 8.5rem;
}

.crm-contacts-card .crm-contact-list-table .crm-col-type,
.crm-contacts-card .crm-contact-list-table .crm-col-status {
  min-width: 4.75rem;
}

.crm-contacts-card .crm-contact-list-table .crm-col-opps,
.crm-contacts-card .crm-contact-list-table .crm-col-pipeline,
.crm-contacts-card .crm-contact-list-table .crm-col-tasks,
.crm-contacts-card .crm-contact-list-table .crm-col-emails {
  min-width: 4.25rem;
}

.crm-contacts-card .crm-contact-list-table .crm-col-activity {
  min-width: 4.5rem;
}

.crm-contacts-card .crm-proposals-table,
.crm-contacts-card #rptid {
  border-collapse: separate;
  border-spacing: 0;
}

.crm-contacts-card .crm-proposals-table thead th,
.crm-contacts-card #rptid thead th {
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  border-top: none !important;
  background-color: #f8fafc !important;
  background-clip: padding-box;
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
}

.crm-contacts-card .crm-contacts-table tbody tr:last-child td {
  border-bottom: none;
}

.crm-contacts-card .crm-contacts-table tbody tr:hover td {
  background: #e8f0fb;
  cursor: pointer;
}

.crm-contacts-card .crm-contacts-table .crm-col-zoho {
  width: 3rem;
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}

.crm-zoho-list-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  font-size: 1rem;
  line-height: 1;
  cursor: default;
}

.crm-zoho-list-icon.is-linked {
  color: #1a6fd4;
}

.crm-zoho-list-icon.is-unlinked {
  color: #cbd5e1;
}

.crm-zoho-list-icon.is-linked:hover {
  color: #0b5ed7;
}

.crm-contact-name-link {
  font-size: 14px;
  font-weight: 600;
  color: #1a6fd4;
  text-decoration: none;
}

.crm-contact-name-link:hover {
  text-decoration: underline;
  color: #1558a8;
}

.crm-page.crm-opp-add-form .crm-required {
  color: #d13232;
  font-weight: 700;
  margin-left: 2px;
}

.crm-page.crm-opp-add-form .crm-form-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
}

.crm-page.crm-opp-add-form .crm-form-alert-danger {
  border: 1px solid #f1c2c2;
  background: #fef2f2;
  color: #9b1c1c;
}

.crm-page.crm-opp-add-form .crm-form-alert-danger .bi {
  font-size: 1.1rem;
  margin-top: 1px;
}

.crm-page.crm-opp-add-form .crm-form-alert-text {
  margin: 0;
  font-weight: 500;
}

.crm-page.crm-opp-add-form .crm-field-error {
  min-height: 0;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: #d13232;
  font-weight: 500;
}

.crm-page.crm-opp-add-form .crm-field-error:empty {
  display: none;
}

.crm-page.crm-opp-add-form .form-control.is-invalid,
.crm-page.crm-opp-add-form .form-select.is-invalid {
  border-color: #d13232;
  box-shadow: 0 0 0 0.2rem rgba(209, 50, 50, 0.12);
}

.crm-page.crm-opp-add-form .crm-add-quick-btn {
  min-width: 42px;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}

.crm-page.crm-opportunities-list-page .crm-contacts-card .crm-contacts-table tbody tr:hover td {
  cursor: default;
}

.crm-page.crm-opportunities-list-page .crm-contacts-card .crm-contacts-table a {
  cursor: pointer;
}

.crm-view-link {
  font-size: 13px;
  font-weight: 600;
  color: #1a6fd4;
  text-decoration: none;
  white-space: nowrap;
}

.crm-view-link:hover {
  text-decoration: underline;
}

/* Row / grid action buttons (edit, delete, view) */
.crm-row-actions,
.crm-table-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.crm-page .crm-table-actions {
  justify-content: flex-end;
}

.crm-action-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px !important;
  margin: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #64748b !important;
  font-size: 15px !important;
  font-weight: 500;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  vertical-align: middle;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

button.crm-action-btn {
  cursor: pointer;
  font-family: inherit;
}

.crm-action-btn:hover,
.crm-action-btn:focus {
  text-decoration: none !important;
  box-shadow: none !important;
}

.crm-action-btn .bi {
  font-size: 15px;
  line-height: 1;
}

/* Icon-only action buttons ? square, no inner whitespace gap from LinkButton markup */
.crm-action-btn:not(.crm-action-labeled):not(.crm-action-view) {
  width: 30px;
  min-width: 30px;
  max-width: 30px;
  padding: 0 !important;
  gap: 0;
  font-size: 0 !important;
  line-height: 0 !important;
  text-align: center;
}

.crm-action-btn:not(.crm-action-labeled):not(.crm-action-view) .bi {
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.crm-action-btn:not(.crm-action-labeled):not(.crm-action-view) .bi::before {
  vertical-align: 0;
  line-height: 1;
}

.crm-action-edit:hover,
.crm-action-edit:focus {
  background: #e8f0fb !important;
  border-color: #b8d4f0 !important;
  color: #1a6fd4 !important;
}

.crm-action-delete {
  color: #d13232 !important;
  border-color: #f0d4d4 !important;
  background: #fffafa !important;
}

.crm-action-delete .bi {
  color: #d13232 !important;
}

.crm-action-delete:hover,
.crm-action-delete:focus {
  background: #fdeaea !important;
  border-color: #f5c4c4 !important;
  color: #d13232 !important;
}

.crm-action-view {
  color: #1a6fd4 !important;
  font-size: 13px !important;
  font-weight: 600;
  padding: 0 10px !important;
}

.crm-action-view:hover,
.crm-action-view:focus {
  background: #e8f0fb !important;
  border-color: #b8d4f0 !important;
  color: #1558a8 !important;
}

.crm-amendment-row .crm-action-btn {
  min-width: 28px;
  height: 28px;
}

.crm-action-labeled {
  width: auto;
  min-width: auto;
  padding: 0 10px !important;
  gap: 5px;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.crm-action-labeled .bi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.crm-action-labeled .bi::before {
  vertical-align: 0;
  line-height: 1;
}

.crm-action-btn.crm-action-labeled:hover:not(.crm-action-delete):not(.crm-action-edit):not(.crm-action-view) {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

.crm-filter-card {
  padding: 1.25rem 1.5rem 1rem;
  margin-bottom: 1rem;
}

/* Table polish inside CRM pages */
.crm-page .table thead th {
  font-size: 12px;
  font-weight: 600;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
}

.crm-page .table tbody tr:hover td {
  background: #e8f0fb;
}

.crm-contact-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crm-contact-name-cell .crm-avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.crm-contact-company {
  font-size: 12px;
  color: #8a9ab0;
  line-height: 1.35;
  margin-top: 1px;
}

.crm-contact-email {
  font-size: 13px;
  color: #475569;
  word-break: break-word;
}

.crm-contact-email:hover,
.crm-contact-email:focus {
  color: #2563eb;
}

.crm-main-side {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 1200px) {
  .crm-main-side { grid-template-columns: 1fr; }
}

/* Proposal summary (proposal_summary.aspx) ? CRM shell; Rad folder tabs unchanged */
.proposal-summary-page .proposal-summary-actions .btn {
  border-radius: 8px;
  font-weight: 500;
}

.proposal-summary-page .proposal-summary-shell {
  margin-bottom: 1.25rem;
}

.proposal-summary-page .proposal-main-link {
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

/* Dashboard / Summary sub-nav (Bootstrap pills ? not RadTabStrip) */
.proposal-summary-page .proposal-subnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 5px;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow-x: auto;
  scrollbar-width: thin;
}

.proposal-summary-page .proposal-subnav .nav-item {
  flex-shrink: 0;
}

.proposal-summary-page .proposal-subnav .nav-link {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.45rem 1rem;
  font-size: 14px;
  font-weight: 500;
  color: #4a5568;
  background: transparent;
  white-space: nowrap;
}

.proposal-summary-page .proposal-subnav .nav-link:hover {
  background: #fff;
  border-color: #e2e8f0;
  color: #1a1d23;
}

.proposal-summary-page .proposal-subnav .nav-link.active,
.proposal-summary-page .proposal-subnav .nav-link.active:hover,
.proposal-summary-page .proposal-subnav .nav-link.active:focus,
.proposal-summary-page .proposal-subnav button.nav-link.active,
.proposal-summary-page .proposal-subnav button.nav-link.active:hover,
.proposal-summary-page .proposal-subnav button.nav-link.active:focus {
  background: #fff !important;
  border-color: #e2e8f0 !important;
  color: #1a1d23 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.proposal-summary-page .proposal-tab-content {
  padding-top: 0.25rem;
}

.proposal-summary-page .proposal-tab-content .tab-pane {
  display: none;
}

.proposal-summary-page .proposal-tab-content .tab-pane.active,
.proposal-summary-page .proposal-tab-content .tab-pane.show {
  display: block;
}

.proposal-summary-page .crm-proposal-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

@media (max-width: 992px) {
  .proposal-summary-page .crm-proposal-detail-grid {
    grid-template-columns: 1fr;
  }
}

.proposal-summary-page .crm-field-val a {
  color: #1a6fd4;
  font-weight: 500;
  text-decoration: none;
}

.proposal-summary-page .crm-field-val a:hover {
  text-decoration: underline;
}

.proposal-summary-page .crm-field-row-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.proposal-summary-page .crm-field-row-stack .crm-field-val {
  text-align: left;
  max-width: 100%;
  width: 100%;
  font-weight: 400;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* Project summary ? dashboard stack + detail grid */
.project-summary-page .project-summary-shell {
  margin-bottom: 1.25rem;
}

.project-summary-page .project-summary-shell > .crm-summary-card-hdr {
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
}

.project-summary-page .proposal-subnav {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 0;
  gap: 1.25rem;
}

.project-summary-page .proposal-subnav .nav-link {
  border: none;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.project-summary-page .proposal-subnav .nav-link:hover,
.project-summary-page .proposal-subnav .nav-link:focus {
  background: transparent;
  border: none;
  border-bottom: 2px solid #e2e8f0;
  color: #1a1d23;
  box-shadow: none;
}

.project-summary-page .proposal-subnav .nav-link.active,
.project-summary-page .proposal-subnav .nav-link.active:hover,
.project-summary-page .proposal-subnav .nav-link.active:focus,
.project-summary-page .proposal-subnav button.nav-link.active,
.project-summary-page .proposal-subnav button.nav-link.active:hover,
.project-summary-page .proposal-subnav button.nav-link.active:focus {
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid #1a6fd4 !important;
  color: #1a6fd4 !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.project-summary-page .project-summary-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 992px) {
  .project-summary-page .project-summary-detail-grid {
    grid-template-columns: 1fr;
  }
}

.project-summary-page .pd-dash-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-summary-page .pd-dash-stack .crm-summary-card .crm-summary-card-body h5,
.project-summary-page .pd-dash-stack .crm-summary-card .crm-summary-card-body h6 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
}

.project-summary-page .pd-dash-stack .table thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a9ab0;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
}

.project-summary-page .pd-dash-stack .table tbody td {
  font-size: 14px;
  vertical-align: middle;
}

.project-summary-page .pd-dash-stack .table-hover tbody tr:hover,
.project-summary-page .pd-dash-stack .table-row-hover:hover {
  background: rgba(26, 110, 245, 0.03) !important;
}

.project-summary-page .pd-dash-stack a.text-primary {
  color: #1a6fd4 !important;
  text-decoration: none !important;
  font-weight: 600;
}

.project-summary-page .pd-dash-stack a.text-primary:hover {
  color: #1558a8 !important;
}

.project-summary-page .crm-summary-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* Dashboard tab ? child controls */
.proposal-summary-page .proposal-dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.proposal-summary-page .proposal-dashboard-stack .ps-chart-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1d23;
  margin: 0 0 0.75rem;
  padding: 0;
  border: none;
}

.proposal-summary-page .proposal-dashboard-stack .ps-chart-section-title .bi {
  color: #8a9ab0;
}

.proposal-summary-page .proposal-dashboard-stack .ps-chart-canvas-wrap {
  position: relative;
  height: 360px;
  margin-bottom: 0.25rem;
}

.proposal-summary-page .ps-billing-kpi-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  margin-top: 1.125rem !important;
  margin-bottom: 0 !important;
}

@media (max-width: 768px) {
  .proposal-summary-page .ps-billing-kpi-strip {
    grid-template-columns: 1fr !important;
  }
}

.proposal-summary-page .ps-billing-kpi-tile {
  position: relative;
  overflow: hidden;
  padding-top: 18px !important;
}

.proposal-summary-page .ps-kpi-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.proposal-summary-page .ps-kpi-accent--green {
  background: linear-gradient(90deg, var(--ps-chart-invoice), var(--ps-chart-invoice-mid));
}

.proposal-summary-page .ps-kpi-accent--expense,
.proposal-summary-page .ps-kpi-accent--rose {
  background: linear-gradient(90deg, var(--ps-chart-expense), var(--ps-chart-expense-mid));
}

.proposal-summary-page .ps-kpi-accent--pending {
  background: linear-gradient(90deg, var(--ps-chart-pending), var(--ps-chart-pending-mid));
}

.proposal-summary-page .ps-billing-kpi-tile .crm-kpi-val {
  font-variant-numeric: tabular-nums;
}

.proposal-summary-page .crm-kpi-val-invoice {
  color: var(--ps-chart-invoice-text) !important;
}

.proposal-summary-page .crm-kpi-val-expense {
  color: var(--ps-chart-expense-text) !important;
}

.proposal-summary-page .crm-kpi-val-pending,
.proposal-summary-page .ps-pending-amt {
  color: var(--ps-chart-pending-text) !important;
}

.proposal-summary-page .proposal-dashboard-stack .crm-summary-card .crm-summary-card-body {
  padding: 1rem 1.15rem 1.125rem;
}

.proposal-summary-page .proposal-dashboard-stack .ps-subc-block {
  padding-top: 1.25rem;
}

.proposal-summary-page .proposal-dashboard-stack .ps-exp-block {
  margin-bottom: 0;
}

.proposal-summary-page .ps-billing-addon-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.proposal-summary-page .ps-billing-addon-foot .crm-card-action {
  font-size: 13px;
  font-weight: 500;
}

.proposal-summary-page .text-muted {
  color: #8a9ab0 !important;
}

/* Shared proposal / billing CRM shell (proposal_summary pattern) */
.crm-summary-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  background: #fff;
  overflow: hidden;
}

/* Sticky thead needs visible overflow on card shell (deliverables, prop invoice, etc.) */
.crm-summary-card:has(.crm-deliverables-table-wrap),
.crm-summary-card:has(.crm-sticky-table-wrap),
.crm-summary-card:has(.crm-tasksheet-table-wrap) {
  overflow: visible;
}

.crm-page.crm-prop-page {
  margin-bottom: 1.5rem;
}

.crm-page.crm-prop-page .table thead th {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom-color: #e2e8f0;
}

.crm-page.crm-prop-documents-page .crm-prop-documents-table tbody td {
  font-size: 14px;
  vertical-align: top;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  line-height: 1.45;
}

.crm-page.crm-prop-documents-page .crm-prop-documents-table .crm-table-link {
  font-size: 14px;
}

.crm-page.crm-prop-documents-page .prop-doc-po-detail {
  font-size: 13px;
}

.crm-page.crm-prop-documents-page .prop-doc-attach-list li + li {
  margin-top: 0.35rem;
}

.crm-page.crm-prop-documents-page .prop-doc-attach-list .crm-table-link {
  font-weight: 500;
}

.crm-page.crm-prop-documents-page .crm-table-actions {
  justify-content: flex-end;
}

.crm-page.crm-prop-documents-page.crm-add-form .crm-prop-document-form {
  max-width: 760px;
}

.crm-page.crm-prop-documents-page .prop-doc-existing-files-panel {
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.crm-page.crm-prop-documents-page .prop-doc-file-checklist span {
  display: block;
  margin-bottom: 0.45rem;
}

.crm-page.crm-prop-documents-page .prop-doc-file-checklist label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1a1d23;
  cursor: pointer;
}

.crm-page.crm-prop-documents-page .prop-doc-file-checklist label:hover {
  background: rgba(37, 99, 235, 0.06);
}

.crm-page.crm-prop-documents-page .prop-doc-file-checklist input[type="checkbox"] {
  margin-top: 0.2rem;
}

.crm-page.crm-prop-documents-page .prop-doc-file-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
}

/* Proposal billing schedule */
.crm-page.crm-prop-billing-page .prop-billing-total-wrap {
  min-width: 140px;
}

.crm-page.crm-prop-billing-page .prop-billing-total-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a9ab0;
}

.crm-page.crm-prop-billing-page .prop-billing-total-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1d23;
  line-height: 1.2;
}

.crm-page.crm-prop-billing-page .prop-billing-total-note {
  font-size: 12px;
  color: #64748b;
  margin-top: 0.15rem;
}

.crm-page.crm-prop-billing-page .crm-billing-block-body {
  padding-top: 0.15rem;
}

.crm-page.crm-prop-billing-page input[type="date"].form-control {
  max-width: 14rem;
}

/* Plain ul/li radios & checkboxes ? same spacing enabled and disabled */
.crm-page.crm-prop-billing-page span:has(> ul.prop-billing-option-list),
.crm-page.crm-prop-billing-page span:has(> ul.prop-billing-check-list) {
  display: block;
  opacity: 1 !important;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list,
.crm-page.crm-prop-billing-page ul.prop-billing-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list--stack,
.crm-page.crm-prop-billing-page ul.prop-billing-check-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list--row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.75rem;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list li,
.crm-page.crm-prop-billing-page ul.prop-billing-check-list li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  list-style: none;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list input[type="radio"],
.crm-page.crm-prop-billing-page ul.prop-billing-option-list input[type="checkbox"],
.crm-page.crm-prop-billing-page ul.prop-billing-check-list input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  margin: 0 0.625rem 0 0 !important;
  padding: 0 !important;
  flex: 0 0 1rem;
  border: 1.5px solid #94a3b8;
  background-color: #fff;
  box-sizing: border-box;
  vertical-align: middle;
  cursor: pointer;
  opacity: 1 !important;
  filter: none !important;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list input[type="radio"] {
  border-radius: 50%;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list input[type="checkbox"],
.crm-page.crm-prop-billing-page ul.prop-billing-check-list input[type="checkbox"] {
  border-radius: 0.2rem;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list input[type="radio"]:checked {
  border-color: #1a6fd4;
  box-shadow: inset 0 0 0 0.22rem #1a6fd4;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list input[type="checkbox"]:checked,
.crm-page.crm-prop-billing-page ul.prop-billing-check-list input[type="checkbox"]:checked {
  border-color: #1a6fd4;
  background-color: #1a6fd4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022z'/%3E%3C/svg%3E");
  background-size: 0.7rem;
  background-position: center;
  background-repeat: no-repeat;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list input[type="radio"]:disabled,
.crm-page.crm-prop-billing-page ul.prop-billing-option-list input[type="checkbox"]:disabled,
.crm-page.crm-prop-billing-page ul.prop-billing-check-list input[type="checkbox"]:disabled {
  cursor: not-allowed;
  border-color: #cbd5e1;
  background-color: #f1f5f9;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list input[type="radio"]:checked:disabled {
  border-color: #94a3b8;
  background-color: #f1f5f9;
  box-shadow: inset 0 0 0 0.22rem #94a3b8;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list input[type="checkbox"]:checked:disabled,
.crm-page.crm-prop-billing-page ul.prop-billing-check-list input[type="checkbox"]:checked:disabled {
  border-color: #94a3b8;
  background-color: #94a3b8;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list label,
.crm-page.crm-prop-billing-page ul.prop-billing-check-list label {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #1a1d23;
  cursor: pointer;
}

.crm-page.crm-prop-billing-page ul.prop-billing-option-list li:has(input:disabled) label,
.crm-page.crm-prop-billing-page ul.prop-billing-check-list li:has(input:disabled) label,
.crm-page.crm-prop-billing-page ul.prop-billing-check-list li.prop-billing-role-locked label {
  color: #6c757d;
  cursor: not-allowed;
}

.crm-page.crm-prop-billing-page .prop-billing-periods-input {
  width: 4.5rem;
}

.crm-page.crm-prop-billing-page .prop-billing-period-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: visible;
  background: #fff;
}

.crm-page.crm-prop-billing-page .prop-billing-period-table {
  margin-bottom: 0;
}

.crm-page.crm-prop-billing-page .prop-billing-period-table thead th {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.65rem 0.85rem;
  white-space: nowrap;
}

.crm-page.crm-prop-billing-page .prop-billing-period-table tbody td {
  padding: 0.55rem 0.85rem;
  vertical-align: middle;
  border-bottom: 1px solid #eef2f6;
}

.crm-page.crm-prop-billing-page .prop-billing-period-table tbody tr:last-child td {
  border-bottom: none;
}

.crm-page.crm-prop-billing-page .prop-billing-period-table input[type="date"].form-control {
  max-width: none;
  min-width: 9.5rem;
}

.crm-page.crm-prop-billing-page .prop-billing-period-amount-group {
  width: 8.5rem;
}

.crm-page.crm-prop-billing-page .prop-billing-info-callout {
  padding: 0.75rem 0.9rem;
  border-left: 3px solid rgba(26, 111, 212, 0.45);
  background: #f0f7ff;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #475569;
}

.crm-page.crm-prop-page .exp-summary-dash {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  width: 100%;
}

.crm-page.crm-prop-page .exp-summary-dash > .exp-summary-item {
  flex: 1 1 140px;
  min-width: 0;
}

.crm-page.crm-prop-page .exp-summary-item {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.7rem 0.9rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-page.crm-prop-page .exp-summary-item .lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.crm-page.crm-prop-page .exp-summary-item .val {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  color: #212529;
  font-variant-numeric: tabular-nums;
}

.crm-page.crm-prop-page .exp-summary-item.summary-billable {
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
  border-color: #a3cfbb;
  box-shadow: 0 1px 3px rgba(25, 135, 84, 0.12);
}

.crm-page.crm-prop-page .exp-summary-item.summary-billable .lbl {
  color: #0f5132;
}

.crm-page.crm-prop-page .exp-summary-item.summary-billable .val {
  color: #198754;
  font-size: 1.28rem;
  font-weight: 600;
}

.crm-page.crm-prop-page .exp-summary-item.summary-remaining .val.text-danger,
.crm-page.crm-prop-page .exp-summary-item.summary-remaining .val .text-danger {
  color: #dc3545;
  font-weight: 600;
}

.crm-page.crm-prop-page .exp-summary-item .val-note {
  font-size: 11px;
  color: #6c757d;
  margin-top: 0.15rem;
  line-height: 1.2;
}

.crm-page.crm-prop-page .exp-kore-invoice-badge.crm-badge-green {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
}

.crm-page.crm-prop-page a.exp-kore-invoice-badge.crm-badge-green {
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.crm-page.crm-prop-page a.exp-kore-invoice-badge.crm-badge-green:hover,
.crm-page.crm-prop-page a.exp-kore-invoice-badge.crm-badge-green:focus {
  background: #d4f0e3;
  color: #158f52;
  text-decoration: none;
}

.crm-page.crm-prop-page .exp-billable-locked-badge.crm-badge-gray {
  font-size: 12px;
  font-weight: 600;
}

.crm-page.crm-prop-page .prop-inv-status-cell .crm-chip {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  white-space: nowrap;
  max-width: 100%;
}

.bc-approval-icon-btn {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  line-height: 1;
  cursor: pointer;
  font-size: 15px;
  vertical-align: middle;
}

.bc-approval-icon-btn:hover,
.bc-approval-icon-btn:focus {
  opacity: 0.85;
}

.bc-approval-icon-btn:focus-visible {
  outline: 2px solid rgba(26, 111, 212, 0.35);
  outline-offset: 2px;
  border-radius: 2px;
}

.bc-approval-icon-btn.bc-approval-icon--approved {
  color: #1a9e5f;
}

.bc-approval-icon-btn.bc-approval-icon--pending {
  color: #c47d0a;
}

.bc-approval-icon-btn.bc-approval-icon--inactive {
  color: #6c757d;
}

.bc-approval-not-due {
  display: inline-block;
  min-width: 1rem;
  text-align: center;
  font-size: 14px;
  line-height: 1;
  color: #adb5bd;
}

.crm-page.crm-prop-page .prop-inv-approval-cell {
  white-space: nowrap;
  width: 1%;
  text-align: center;
}

.crm-page.crm-prop-page .prop-inv-approval-cell .bc-approval-icon-btn {
  vertical-align: middle;
}

.crm-page.crm-prop-page .crm-chip .crm-chip-inv-days {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0.92;
}

.crm-page.crm-prop-page .crm-chip .crm-chip-inv-days .bi {
  font-size: 9px;
  line-height: 1;
}

.crm-page.crm-prop-page .crm-chip.crm-chip-inv-days--unpaid {
  box-shadow: inset 0 0 0 1px rgba(209, 50, 50, 0.15);
}

.crm-page.crm-prop-page .crm-chip.crm-chip-inv-days--partial {
  box-shadow: inset 0 0 0 1px rgba(196, 125, 10, 0.2);
}

.crm-page.crm-prop-page .crm-chip.crm-chip-inv-days--late {
  box-shadow: inset 0 0 0 1px rgba(153, 27, 27, 0.25);
  font-weight: 600;
}

.crm-page.crm-prop-page .crm-chip.crm-chip-inv-days--late .crm-chip-inv-days {
  font-weight: 700;
}

.crm-page.crm-prop-page .prop-inv-invoice-num {
  font-weight: 600;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: #1a1d23 !important;
  text-decoration: none !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  cursor: default;
}

/* Invoice log iframes (unbilled / billed) */
.crm-page.crm-invoice-log-page {
  background: transparent !important;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  color: #1a1d23;
}

.crm-invoice-log-page.bg-light,
body.crm-invoice-log-page {
  background: transparent !important;
}

.crm-invoice-log-page .crm-log-proposal-label {
  color: #1a1d23 !important;
  font-weight: 600;
}

.crm-invoice-log-page .crm-summary-card {
  margin-bottom: 0;
}

.crm-invoice-log-page h5 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
  margin-bottom: 0.75rem;
}

/* ?? Proposal dashboard ?? */
.proposal-dashboard-page {
  margin-bottom: 1.5rem;
  --pd-surface: #ffffff;
  --pd-border: #c4c6d4;
  --pd-text2: #44475a;
  --pd-accent: #1558d6;
}

.proposal-dashboard-page .pd-main-proposal {
  margin-bottom: 1rem;
  padding: 10px 14px;
  background: var(--pd-surface);
  border: 1px solid var(--pd-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.proposal-dashboard-page .pd-main-proposal-lbl {
  font-size: 13px;
  color: var(--pd-text2);
}

.proposal-dashboard-page .pd-main-proposal-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--pd-accent) !important;
  text-decoration: none !important;
  border: 1px solid rgba(21, 88, 214, 0.25);
  background: rgba(21, 88, 214, 0.06);
  border-radius: 8px;
  padding: 6px 12px;
}

.proposal-dashboard-page .pd-main-proposal-btn:hover {
  background: rgba(21, 88, 214, 0.12);
}

.proposal-dashboard-page .pd-dash-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.proposal-dashboard-page .pd-rollout-footer {
  margin-top: 20px;
}

.proposal-dashboard-page .pd-rollout-report-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%);
  border: 1px solid #c7d7f0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.proposal-dashboard-page .pd-rollout-report-copy {
  min-width: 0;
  flex: 1 1 220px;
}

.proposal-dashboard-page .pd-rollout-report-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #526da8;
  margin-bottom: 4px;
}

.proposal-dashboard-page .pd-rollout-report-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #1a1d23;
  line-height: 1.3;
  margin-bottom: 4px;
}

.proposal-dashboard-page .pd-rollout-report-sub {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}

.proposal-dashboard-page .pd-rollout-report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 10px 16px !important;
  border-radius: 8px;
  border: 1px solid #1558d6;
  background: #1a6fd4;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(21, 88, 214, 0.2);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.proposal-dashboard-page .pd-rollout-report-btn:hover,
.proposal-dashboard-page .pd-rollout-report-btn:focus {
  background: #1558a8;
  border-color: #1558a8;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(21, 88, 214, 0.22);
  transform: translateY(-1px);
}

.proposal-dashboard-page .pd-rollout-report-btn .pd-rollout-report-btn-arrow {
  font-size: 1.15rem;
  line-height: 1;
  margin-left: 2px;
}

@media (max-width: 576px) {
  .proposal-dashboard-page .pd-rollout-report-card {
    align-items: stretch;
  }

  .proposal-dashboard-page .pd-rollout-report-btn {
    width: 100%;
  }
}

/* Proposal dashboard charts ? harmonized teal / periwinkle / clay */
.proposal-dashboard-page,
.proposal-summary-page {
  --ps-chart-invoice: #2d9c85;
  --ps-chart-invoice-mid: #4ab8a0;
  --ps-chart-invoice-text: #247a68;
  --ps-chart-pending: #6889c4;
  --ps-chart-pending-mid: #8aa4d4;
  --ps-chart-pending-text: #526da8;
  --ps-chart-expense: #c9846a;
  --ps-chart-expense-mid: #dba088;
  --ps-chart-expense-text: #a86b52;
  --ps-chart-remaining-text: #4a5568;
}

/* Proposal dashboard ? classic chart row (100% no PO, 50/50 with PO) */
.proposal-dashboard-page .ps-chart-block .ps-chart-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1d23;
  margin: 0 0 0.75rem;
  padding: 0;
  border: none;
}

.proposal-dashboard-page .ps-chart-block .ps-chart-section-title .bi {
  color: #8a9ab0;
}

.proposal-dashboard-page .ps-chart-block .ps-chart-canvas-wrap {
  position: relative;
  height: 360px;
  margin-bottom: 0.25rem;
}

.proposal-dashboard-page .ps-chart-block .ps-chart-canvas-wrap--budget {
  height: 320px;
}

.proposal-dashboard-page .ps-chart-block .ps-billing-kpi-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  margin-top: 1.125rem !important;
  margin-bottom: 0 !important;
}

/* Budget consumption summary ? avoid inline span wrap in narrow chart column */
.ps-budget-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 10px;
}

.proposal-dashboard-page .ps-chart-block .ps-budget-kpi-strip {
  margin-bottom: 0.875rem !important;
}

.ps-budget-kpi-item {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  min-width: 0;
}

.ps-budget-kpi-lbl {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a9ab0;
  margin-bottom: 4px;
  line-height: 1.3;
}

.ps-budget-kpi-val {
  font-size: 15px;
  font-weight: 700;
  color: #1a1d23;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.ps-budget-kpi-val--remaining {
  color: var(--ps-chart-remaining-text, #4a5568) !important;
}

.ps-budget-kpi-sub {
  font-size: 12px;
  color: #8a9ab0;
  margin-top: 3px;
  line-height: 1.35;
}

.ps-budget-kpi-notes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0.75rem;
}

.ps-budget-kpi-note {
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e8edf2;
}

.proposal-dashboard-page .ps-chart-block .ps-budget-kpi-note .ps-pending-amt {
  color: var(--ps-chart-pending-text);
}

.proposal-dashboard-page .ps-chart-block .ps-billing-kpi-tile {
  position: relative;
  overflow: hidden;
  padding-top: 18px !important;
}

.proposal-dashboard-page .ps-chart-block .ps-kpi-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.proposal-dashboard-page .ps-chart-block .ps-kpi-accent--green {
  background: linear-gradient(90deg, var(--ps-chart-invoice), var(--ps-chart-invoice-mid));
}

.proposal-dashboard-page .ps-chart-block .ps-kpi-accent--expense,
.proposal-dashboard-page .ps-chart-block .ps-kpi-accent--rose {
  background: linear-gradient(90deg, var(--ps-chart-expense), var(--ps-chart-expense-mid));
}

.proposal-dashboard-page .ps-chart-block .ps-kpi-accent--pending {
  background: linear-gradient(90deg, var(--ps-chart-pending), var(--ps-chart-pending-mid));
}

.proposal-dashboard-page .ps-chart-block .crm-kpi-val-invoice {
  color: var(--ps-chart-invoice-text) !important;
}

.proposal-dashboard-page .ps-chart-block .crm-kpi-val-expense {
  color: var(--ps-chart-expense-text) !important;
}

.proposal-dashboard-page .ps-chart-block .crm-kpi-val-pending {
  color: var(--ps-chart-pending-text) !important;
}

.proposal-dashboard-page .ps-chart-block .ps-budget-kpi-val--remaining {
  color: var(--ps-chart-remaining-text) !important;
}

@media (max-width: 991px) {
  .proposal-dashboard-page .ps-chart-block .ps-chart-col-billings,
  .proposal-dashboard-page .ps-chart-block .ps-chart-col-budget {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.proposal-dashboard-page .fin-dash .fin-g32 {
  gap: 12px;
}

.proposal-dashboard-page .fin-dash .fin-ch {
  padding: 10px 14px;
}

.proposal-dashboard-page .fin-dash .fin-cb {
  padding: 12px 14px 14px;
}

.proposal-dashboard-page .fin-dash .fin-krow {
  margin-top: 12px;
  gap: 10px;
}

.proposal-dashboard-page .fin-dash .fin-kpi {
  padding: 12px 14px 10px;
}

.proposal-dashboard-page .fin-dash .fin-mb {
  margin-bottom: 10px;
}

.proposal-dashboard-page .fin-dash .fin-slbl {
  margin-bottom: 8px;
}

/* Finance-style chart grid (shared fin-dash component) */
.fin-dash .fin-slbl {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #44475a;
  margin: 0 0 12px;
}

.fin-dash .fin-mb {
  margin-bottom: 16px;
}

.fin-dash .fin-g32 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.fin-dash .fin-g32-main,
.fin-dash .fin-g32-side {
  min-width: 0;
}

.fin-dash .fin-card {
  background: #fff;
  border: 1px solid #c4c6d4;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 3px 1px rgba(0, 0, 0, 0.06);
  height: 100%;
}

.fin-dash .fin-ch {
  padding: 14px 18px;
  border-bottom: 1px solid #c4c6d4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fin-dash .fin-ct {
  font-size: 14px;
  font-weight: 600;
  color: #1b1c22;
}

.fin-dash .fin-ct .bi {
  color: #8a9ab0;
}

.fin-dash .fin-ctag {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: #dde0ed;
  color: #44475a;
  flex-shrink: 0;
}

.fin-dash .fin-ctag--muted {
  background: #dde0ed;
  color: #44475a;
}

/* Harmonized palette on proposal dashboard */
.proposal-dashboard-page .fin-dash .fin-ktop--green {
  background: var(--ps-chart-invoice);
}

.proposal-dashboard-page .fin-dash .fin-ktop--rose {
  background: var(--ps-chart-expense);
}

.proposal-dashboard-page .fin-dash .fin-ktop--blue {
  background: var(--ps-chart-pending);
}

.proposal-dashboard-page .fin-dash .fin-ktop--amber,
.proposal-dashboard-page .fin-dash .fin-ktop--pending {
  background: var(--ps-chart-pending);
}

.proposal-dashboard-page .fin-dash .fin-kval,
.proposal-dashboard-page .fin-dash .fin-kval--accent {
  color: #1b1c22;
}

.proposal-dashboard-page .fin-dash .fin-kval--warn {
  color: #7a4f00;
}

.proposal-dashboard-page .fin-dash .fin-kval--pending,
.proposal-dashboard-page .pd-dash-stack .ps-pending-amt {
  color: var(--ps-chart-pending-text) !important;
}

.fin-dash .fin-cb {
  padding: 18px;
}

.fin-dash .fin-cw {
  position: relative;
  width: 100%;
}

.fin-dash .fin-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #44475a;
}

.fin-dash .fin-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fin-dash .fin-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.fin-dash .fin-swatch--blue {
  background: rgba(104, 137, 196, 0.86);
}

.fin-dash .fin-swatch--green {
  background: rgba(45, 156, 133, 0.88);
}

.fin-dash .fin-swatch--red {
  background: rgba(201, 132, 106, 0.86);
}

.fin-dash .fin-swatch--amber {
  background: rgba(196, 118, 0, 0.72);
}

.fin-dash .fin-swatch--pending {
  background: rgba(104, 137, 196, 0.86);
}

.proposal-dashboard-page .fin-dash .fin-swatch--amber {
  background: rgba(104, 137, 196, 0.86);
}

.fin-dash .fin-cw--billing {
  height: 240px;
  margin-bottom: 4px;
}

.fin-dash .fin-cw--budget {
  height: 220px;
  margin-top: 4px;
}

.fin-dash .fin-krow {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.fin-dash .fin-krow--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fin-dash .fin-kpi {
  background: #fff;
  border: 1px solid #c4c6d4;
  border-radius: 12px;
  padding: 16px 18px 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.fin-dash .fin-ktop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.fin-dash .fin-ktop--blue {
  background: linear-gradient(90deg, #1a6ef5, #6750a4);
}

.fin-dash .fin-ktop--rose {
  background: linear-gradient(90deg, #d13232, #e85d6f);
}

.fin-dash .fin-ktop--green {
  background: linear-gradient(90deg, #0b8a5c, #006a6e);
}

.fin-dash .fin-ktop--amber {
  background: linear-gradient(90deg, #c47600, #b45309);
}

.fin-dash .fin-klbl {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #44475a;
  margin-bottom: 8px;
}

.fin-dash .fin-kval {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #1b1c22;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.fin-dash .fin-kval--accent {
  color: #1558d6;
}

.fin-dash .fin-kval--warn {
  color: #b45309;
}

/* Proposal dashboard ? downstream blocks (rollout, T&M, addon cards) */
.proposal-dashboard-page .pd-dash-stack .fin-dash .ps-subc-block,
.proposal-dashboard-page .pd-dash-stack .fin-dash .ps-exp-block {
  padding-top: 0;
  margin-top: 0;
  margin-bottom: 16px;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card {
  border: 1px solid #c4c6d4 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 3px 1px rgba(0, 0, 0, 0.06) !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card .ps-billing-addon-head {
  padding: 14px 18px !important;
  border-bottom: 1px solid #c4c6d4 !important;
}

.proposal-dashboard-page .pd-dash-stack .card.mt-3 {
  margin-top: 0 !important;
  border: 1px solid #c4c6d4;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 3px 1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.proposal-dashboard-page .pd-dash-stack .card.mt-3 > .card-header {
  padding: 14px 18px;
  border-bottom: 1px solid #c4c6d4;
  background: #fff !important;
}

.proposal-dashboard-page .pd-dash-stack .card.mt-3 > .card-body {
  padding: 18px;
}

.proposal-dashboard-page .pd-dash-stack h4.border-bottom {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #44475a;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin: 24px 0 12px !important;
}

.proposal-dashboard-page .pd-dash-stack h4.border-bottom .bi {
  display: none;
}

.proposal-dashboard-page .pd-dash-stack .table thead th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #44475a;
}

.proposal-dashboard-page .pd-dash-stack .ps-nopo-recap {
  border: 1px solid #c4c6d4;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  background: #fff;
}

/* ?? Proposal dashboard: tame competing colors ?? */
.proposal-dashboard-page .pd-dash-stack .ps-subc-block,
.proposal-dashboard-page .pd-dash-stack .ps-exp-block {
  padding-top: 0 !important;
  margin-bottom: 0 !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card,
.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card--subc,
.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card--exp {
  border: 1px solid #c4c6d4 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 3px 1px rgba(0, 0, 0, 0.06) !important;
  background: #fff !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card .ps-billing-addon-head,
.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card--subc .ps-billing-addon-head,
.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card--exp .ps-billing-addon-head {
  padding: 14px 18px !important;
  border-bottom: 1px solid #c4c6d4 !important;
  border-left: none !important;
  background: #fff !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card .ps-billing-addon-head h6,
.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card .ps-billing-addon-head .bi {
  color: #1b1c22 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card .ps-billing-addon-head .bi {
  color: #8a9ab0 !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card .ps-billing-addon-body {
  padding: 18px !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card .ps-billing-addon-stat {
  background: #f0f2f8 !important;
  border: 1px solid #dde0ed !important;
  border-radius: 8px !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card .ps-billing-addon-stat--emphasis {
  background: #eceef6 !important;
  border-color: #c4c6d4 !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card .ps-billing-addon-stat .val {
  color: #1b1c22 !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-stat--billable .val {
  color: #198754 !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-stat--remaining .val.ps-amt-remaining {
  color: var(--ps-chart-remaining-text) !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-stat--billable .lbl {
  color: #0f5132 !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-stat--remaining .val.ps-amt-remaining-zero {
  color: #6c757d !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card .ps-billing-addon-meta,
.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card .ps-billing-addon-stat .lbl,
.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-card .ps-billing-addon-stat .sub {
  color: #44475a !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-billing-addon-foot {
  border-top-color: #dde0ed !important;
}

.proposal-dashboard-page .pd-dash-stack .crm-card-action,
.proposal-dashboard-page .pd-dash-stack a.crm-card-action {
  color: #1558d6 !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
}

.proposal-dashboard-page .pd-dash-stack .crm-card-action:hover {
  color: #1a6ef5 !important;
  text-decoration: underline !important;
}

/* No-PO recap ? softer warnings */
.proposal-dashboard-page .pd-dash-stack .ps-nopo-recap-hero {
  background: #f0f2f8 !important;
  border-bottom-color: #dde0ed !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-nopo-recap-lead {
  border-left-color: #8a9ab0 !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-nopo-borderlist {
  border-left-color: #c4c6d4 !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-nopo-borderlist--tm {
  border-left-color: #8a9ab0 !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-nopo-warn-card--red,
.proposal-dashboard-page .pd-dash-stack .ps-nopo-warn-card--amber {
  background: #f0f2f8 !important;
  border-color: #dde0ed !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-nopo-warn-pill--red,
.proposal-dashboard-page .pd-dash-stack .ps-nopo-warn-pill--amber {
  background: #eceef6 !important;
  color: #7a4f00 !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-nopo-recap-pct--danger,
.proposal-dashboard-page .pd-dash-stack .text-danger {
  color: #7a4f00 !important;
}

.proposal-dashboard-page .pd-dash-stack .ps-nopo-recap-pct--success {
  color: #1a6b45 !important;
}

/* Rollout tabs */
.proposal-dashboard-page .pd-dash-stack .rollout-nav-pills .rollout-nav-link {
  border-color: #c4c6d4 !important;
  color: #44475a !important;
  background: #fff !important;
  border-radius: 20px !important;
  font-size: 13px !important;
}

.proposal-dashboard-page .pd-dash-stack .rollout-nav-pills .rollout-nav-link:hover {
  border-color: #8a9ab0 !important;
  background: #f0f2f8 !important;
  color: #1b1c22 !important;
}

.proposal-dashboard-page .pd-dash-stack .rollout-nav-pills .rollout-nav-link.active {
  background: rgba(26, 110, 245, 0.1) !important;
  border-color: rgba(26, 110, 245, 0.25) !important;
  color: #1558d6 !important;
}

/* T&M tables */
.proposal-dashboard-page .pd-dash-stack .table-hover tbody tr:hover {
  background: rgba(26, 110, 245, 0.03) !important;
}

.proposal-dashboard-page .pd-dash-stack .table-warning,
.proposal-dashboard-page .pd-dash-stack tr.table-warning,
.proposal-dashboard-page .pd-dash-stack .flat-fee-sum-hold,
.proposal-dashboard-page .pd-dash-stack .tm-sum-row.table-warning {
  --bs-table-bg: #f5f0e8 !important;
  --bs-table-color: #44475a !important;
  background-color: #f5f0e8 !important;
  color: #44475a !important;
}

.proposal-dashboard-page .pd-dash-stack .table-light,
.proposal-dashboard-page .pd-dash-stack tr.table-light,
.proposal-dashboard-page .pd-dash-stack .flat-fee-sum-active,
.proposal-dashboard-page .pd-dash-stack .tm-sum-row.table-light {
  --bs-table-bg: #f0f2f8 !important;
  background-color: #f0f2f8 !important;
  color: #44475a !important;
}

.proposal-dashboard-page .pd-dash-stack .table-secondary,
.proposal-dashboard-page .pd-dash-stack tr.table-secondary,
.proposal-dashboard-page .pd-dash-stack .flat-fee-sum-grand,
.proposal-dashboard-page .pd-dash-stack .tm-sum-row.table-secondary {
  --bs-table-bg: #eceef6 !important;
  background-color: #eceef6 !important;
  color: #1b1c22 !important;
}

.proposal-dashboard-page .pd-dash-stack .badge.bg-design,
.proposal-dashboard-page .pd-dash-stack .badge.rounded-pill.bg-design {
  background-color: #dde0ed !important;
  color: #44475a !important;
}

.proposal-dashboard-page .pd-dash-stack .badge.bg-construction,
.proposal-dashboard-page .pd-dash-stack .badge.rounded-pill.bg-construction {
  background-color: #eceef6 !important;
  color: #44475a !important;
}

.proposal-dashboard-page .pd-dash-stack .badge.text-bg-warning {
  background-color: #f5f0e8 !important;
  color: #7a4f00 !important;
  border: 1px solid #e8dcc8;
}

.proposal-dashboard-page .pd-dash-stack a.text-primary {
  color: #1558d6 !important;
}

.proposal-dashboard-page .pd-dash-stack a.text-primary:hover {
  color: #1a6ef5 !important;
}

.proposal-dashboard-page .pd-dash-stack .alert-info,
.proposal-dashboard-page .pd-dash-stack .alert-light {
  background: #f0f2f8 !important;
  border-color: #dde0ed !important;
  color: #44475a !important;
}

.proposal-dashboard-page .pd-dash-stack .text-warning {
  color: #7a4f00 !important;
}

.proposal-dashboard-page .pd-dash-stack .text-muted,
.proposal-dashboard-page .pd-dash-stack p.text-muted {
  color: #8a9ab0 !important;
}

.proposal-dashboard-page .pd-dash-stack h5,
.proposal-dashboard-page .pd-dash-stack h6 {
  font-size: 14px;
  font-weight: 600;
  color: #1b1c22;
}

.proposal-dashboard-page .pd-dash-stack h5 {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
}

@media (max-width: 1200px) {
  .fin-dash .fin-g32 {
    grid-template-columns: 1fr;
  }

  .fin-dash .fin-krow--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .proposal-dashboard-page .pd-ph-title {
    font-size: 20px;
  }

  .fin-dash .fin-krow--3 {
    grid-template-columns: 1fr;
  }

  .fin-dash .fin-cw--billing {
    height: 220px;
  }

  .fin-dash .fin-cw--budget {
    height: 200px;
  }
}

/* ?? Portal center (employee dashboard) ??????????????????????????????????? */
.portal-center-page {
  --pc-accent: #1a6fd4;
  --pc-green: #1a9e5f;
  --pc-amber: #c47d0a;
  --pc-red: #d13232;
  --pc-neutral: #8a9ab0;
  --pc-border: #e2e8f0;
  --pc-surface: #fff;
  --pc-bg-muted: #f8fafc;
}

.portal-center-page .pc-dash-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Portal tabs ? pill links only, no segmented wrapper chrome */
.portal-center-page .ucmenu-wrap.pc-portal-nav {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
}

.portal-center-page .ucmenu-wrap.pc-portal-nav .ucmenu-tabs-row {
  width: auto !important;
  max-width: 100%;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex;
  justify-content: center;
}

.portal-center-page .pc-portal-tabs-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: auto;
  max-width: 100%;
  padding: 0;
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.portal-center-page .pc-portal-tabs-nav::-webkit-scrollbar {
  height: 4px;
}

.portal-center-page .pc-portal-tabs-nav::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.portal-center-page .pc-portal-tab {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 14px !important;
  margin: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  flex-shrink: 0;
  box-shadow: none !important;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.portal-center-page .pc-portal-tab:hover {
  color: #334155 !important;
  background: rgba(255, 255, 255, 0.65) !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
}

.portal-center-page .pc-portal-tab.active {
  color: #1a1d23 !important;
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  font-weight: 600 !important;
}

.portal-center-page .pc-portal-tab.active:hover {
  color: #1a1d23 !important;
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1) !important;
}

/* Dashboard cards ? one consistent border on every card */
.portal-center-page .card,
.portal-center-page .hot-board.card,
.portal-center-page .uc-unbilled-card.card {
  border: 1px solid #e2e8f0 !important;
  border-left: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.portal-center-page .card {
  overflow: hidden;
}

.portal-center-page .hot-board.card,
.portal-center-page .uc-unbilled-card.card {
  overflow: visible;
}

.portal-center-page .pc-card::before,
.portal-center-page .hot-board.card::before,
.portal-center-page .uc-unbilled-card.card::before {
  display: none !important;
}

.portal-center-page .pc-card--danger .card-header {
  background: linear-gradient(180deg, rgba(209, 50, 50, 0.06) 0%, #fff 100%);
}

.portal-center-page .pc-card--danger .card-title {
  color: var(--pc-red);
}

.portal-center-page .pc-card--warn .card-header {
  background: linear-gradient(180deg, rgba(196, 125, 10, 0.08) 0%, #fff 100%);
}

.portal-center-page .pc-card--warn .card-title {
  color: var(--pc-amber);
}

.portal-center-page .pc-card .card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
}

.portal-center-page .pc-card .card-title i {
  color: var(--pc-accent);
}

.portal-center-page .pc-card--danger .card-title i { color: var(--pc-red); }
.portal-center-page .pc-card--warn .card-title i { color: var(--pc-amber); }
.portal-center-page .pc-card--green .card-title i { color: var(--pc-green); }

/* Event category dots */
.portal-center-page .pc-event-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}

.portal-center-page .pc-event-dot--accent { background: var(--pc-accent); }
.portal-center-page .pc-event-dot--green { background: var(--pc-green); }
.portal-center-page .pc-event-dot--amber { background: var(--pc-amber); }
.portal-center-page .pc-event-dot--red { background: var(--pc-red); }
.portal-center-page .pc-event-dot--neutral { background: #94a3b8; }
.portal-center-page .pc-event-dot--teal { background: #0d9488; }

/* Billable hours stat row */
.portal-center-page .pc-hour-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 0.5rem;
}

@media (max-width: 576px) {
  .portal-center-page .pc-hour-stats {
    grid-template-columns: 1fr;
  }
}

.portal-center-page .pc-hour-stat {
  text-align: center;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--pc-border);
  background: var(--pc-bg-muted);
}

.portal-center-page .pc-hour-stat--billable {
  background: linear-gradient(180deg, rgba(26, 158, 95, 0.08) 0%, #fff 100%);
  border-color: rgba(26, 158, 95, 0.25);
}

.portal-center-page .pc-hour-stat-val {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: #1a1d23;
  margin-bottom: 4px;
}

.portal-center-page .pc-hour-stat--billable .pc-hour-stat-val {
  color: var(--pc-green);
}

.portal-center-page .pc-period-filter {
  min-width: 10.5rem;
  width: auto;
  max-width: 18rem;
}

.portal-center-page .pc-period-range {
  font-size: 13px;
  color: var(--pc-neutral);
  margin: 0;
}

.portal-center-page .pc-qtr-compare-col {
  background: var(--pc-bg-muted, #f8fafc);
  border: 1px solid var(--pc-border, #e2e8f0);
  border-radius: 12px;
  padding: 14px 12px;
}

.portal-center-page .pc-qtr-compare-col--primary {
  border-color: rgba(26, 158, 95, 0.35);
  background: linear-gradient(180deg, rgba(26, 158, 95, 0.06) 0%, #fff 100%);
}

.portal-center-page .pc-qtr-compare-hdr {
  font-size: 13px;
  font-weight: 700;
  color: var(--pc-text, #1a1d23);
  margin-bottom: 10px;
}

.portal-center-page .pc-hour-stats--compact {
  gap: 8px;
}

.portal-center-page .pc-hour-stats--compact .pc-hour-stat {
  padding: 10px 8px;
}

.portal-center-page .pc-hour-stats--compact .pc-hour-stat-val {
  font-size: 1.35rem;
}

.portal-center-page .pc-qtr-compare-pct {
  font-size: 12px;
  color: var(--pc-neutral);
  margin-top: 8px;
  text-align: center;
}

.portal-center-page .pc-qtr-compare-delta {
  font-size: 13px;
  color: var(--pc-neutral);
  padding: 10px 12px;
  background: #f1f5f9;
  border-radius: 8px;
  line-height: 1.6;
}

.portal-center-page .pc-hour-stat-lbl {
  font-size: 12px;
  color: var(--pc-neutral);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.portal-center-page .progress {
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
}

.portal-center-page .progress-bar.bg-success {
  background-color: var(--pc-green) !important;
}

.portal-center-page .progress-bar.bg-danger {
  background-color: var(--pc-red) !important;
}

.portal-center-page .progress-bar.bg-primary {
  background-color: var(--pc-accent) !important;
}

.portal-center-page .table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pc-neutral);
  border-bottom-color: var(--pc-border);
}

.portal-center-page .btn-outline-primary {
  color: var(--pc-accent);
  border-color: #c5ddf5;
}

.portal-center-page .btn-outline-primary:hover {
  background: rgba(26, 111, 212, 0.08);
  border-color: var(--pc-accent);
  color: var(--pc-accent);
}

.portal-center-page .form-select {
  font-size: 13px;
  border-color: var(--pc-border);
  border-radius: 8px;
}

.portal-center-page .hot-board,
.portal-center-page .hot-board .card-header,
.portal-center-page .hot-board .card-body,
.portal-center-page .hot-board .text-muted {
  font-family: inherit;
}

.portal-center-page .hot-board .card-title,
.portal-center-page .uc-unbilled-card .card-title {
  font-size: 14px;
  font-weight: 600;
}

.portal-center-page .hot-board .card-header .text-muted,
.portal-center-page .hot-board .card-header small {
  font-size: 12px;
  color: #8a9ab0 !important;
}

.portal-center-page .hot-board .crm-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  line-height: 1.25;
}

.portal-center-page .hot-board .hot-age-badge {
  font-size: 11px;
  padding: 1px 6px;
  vertical-align: middle;
}

.portal-center-page .hot-board .hot-gcal-badge {
  font-size: 11px;
  padding: 2px 7px;
}

.portal-center-page .hot-kpi-val {
  color: var(--pc-accent) !important;
}

.portal-center-page .hot-kpi-val.kpi-warn { color: var(--pc-red) !important; }
.portal-center-page .hot-kpi-val.kpi-ok,
.portal-center-page .hot-kpi-val.kpi-week-met { color: var(--pc-green) !important; }
.portal-center-page .hot-kpi-val.kpi-mid { color: var(--pc-amber) !important; }

.portal-center-page .hot-item.sev-red { border-left-color: var(--pc-red); }
.portal-center-page .hot-item.sev-orange { border-left-color: var(--pc-amber); }
.portal-center-page .hot-item.sev-yellow { border-left-color: #e8b84a; }
.portal-center-page .hot-item.sev-green { border-left-color: var(--pc-green); }
.portal-center-page .hot-item.sev-blue { border-left-color: var(--pc-accent); }
.portal-center-page .hot-item.sev-purple { border-left-color: #6750a4; }

.portal-center-page .hot-icon.bg-red { background: rgba(209, 50, 50, 0.1); color: var(--pc-red); }
.portal-center-page .hot-icon.bg-orange { background: rgba(196, 125, 10, 0.12); color: var(--pc-amber); }
.portal-center-page .hot-icon.bg-yellow { background: rgba(232, 184, 74, 0.15); color: #a67c00; }
.portal-center-page .hot-icon.bg-green { background: rgba(26, 158, 95, 0.12); color: var(--pc-green); }
.portal-center-page .hot-icon.bg-blue { background: rgba(26, 111, 212, 0.1); color: var(--pc-accent); }
.portal-center-page .hot-icon.bg-purple { background: rgba(103, 80, 164, 0.1); color: #6750a4; }

.portal-center-page .uc-unbilled-flat-pending-tile {
  background: rgba(196, 125, 10, 0.1) !important;
  border-color: rgba(196, 125, 10, 0.3) !important;
}

.portal-center-page .uc-unbilled-subc-kpi-tile {
  background: rgba(103, 80, 164, 0.08) !important;
  border-color: rgba(103, 80, 164, 0.25) !important;
}

.portal-center-page .uc-unbilled-subc-amt {
  color: #6750a4 !important;
}

.portal-center-page .uc-unbilled-exp-kpi-tile {
  background: rgba(26, 111, 212, 0.08) !important;
  border-color: rgba(26, 111, 212, 0.25) !important;
}

.portal-center-page .uc-unbilled-exp-amt {
  color: var(--pc-accent) !important;
}

.portal-center-page .text-danger {
  color: var(--pc-red) !important;
}

.portal-center-page .text-warning {
  color: var(--pc-amber) !important;
}

.portal-center-page .text-muted {
  color: var(--pc-neutral) !important;
}

.portal-center-page .quick-add-btn {
  border: 1px solid var(--pc-border) !important;
  border-radius: 10px !important;
  padding: 12px 20px !important;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.portal-center-page .quick-add-btn:hover {
  border-color: #c5ddf5 !important;
  background: rgba(26, 111, 212, 0.05) !important;
  box-shadow: 0 1px 3px rgba(26, 111, 212, 0.1);
}

.portal-center-page .quick-add-btn .bi {
  color: var(--pc-accent);
}

/* Mobile table cards */
@media (max-width: 768px) {
  .portal-center-page .table-responsive thead {
    display: none;
  }

  .portal-center-page .table-responsive tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--pc-border);
    border-radius: 12px;
    padding: 0.5rem;
  }

  .portal-center-page .table-responsive tbody td {
    display: block;
    text-align: left;
    padding: 0.25rem 0;
    border: none;
  }

  .portal-center-page .table-responsive tbody td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--pc-neutral);
    font-size: 12px;
  }

  .portal-center-page .pc-portal-tab {
    font-size: 13px;
    padding: 7px 14px;
  }

  .portal-center-page #proposalChart {
    max-height: 150px !important;
  }
}

/* My Account (myaccount.aspx) */
.myaccount-page .proposal-subnav {
  background: transparent;
  border: none !important;
  box-shadow: none;
  padding: 0;
  margin-bottom: 1rem;
  gap: 1.25rem;
  flex-wrap: nowrap;
}

.myaccount-page .proposal-subnav .nav-link {
  border: none;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 500;
}

.myaccount-page .proposal-subnav .nav-link:hover,
.myaccount-page .proposal-subnav .nav-link:focus {
  background: transparent;
  border: none;
  border-bottom: 2px solid #e2e8f0;
  color: #1a1d23;
  box-shadow: none;
}

.myaccount-page .proposal-subnav .nav-link.active,
.myaccount-page .proposal-subnav .nav-link.active:hover,
.myaccount-page .proposal-subnav .nav-link.active:focus {
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid #1a6fd4 !important;
  color: #1a6fd4 !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.myaccount-page .card-header .bi-person-circle,
.myaccount-page .myaccount-gcal-icon {
  color: #1a6fd4;
}

.myaccount-page .form-label {
  font-size: 12px;
  font-weight: 600;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.myaccount-page .myaccount-readonly {
  color: #1a1d23;
  font-weight: 500;
  font-size: 15px;
  cursor: default;
}

.myaccount-page .card-footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.myaccount-page .gcal-month {
  border-radius: 10px;
}

/* Deliverable detail ? separate project + deliverable KPI cards, tight gap */
.crm-project-header--deliverable-detail ~ .ucmenu-wrap:not(.crm-deliverable-nav) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: none !important;
}

.crm-project-header--deliverable-detail {
  margin-bottom: 1.15rem !important;
  padding-bottom: 0.75rem !important;
}

.container-fluid:has(.crm-project-header--deliverable-detail) .crm-page.crm-deliverable-page {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.container-fluid:has(.crm-project-header--deliverable-detail) .crm-page.crm-deliverable-page > .crm-deliverable-header {
  margin-top: 0 !important;
  margin-bottom: 0.5rem;
}

/* Deliverable section tabs (deliverable_menu_UC chrome strip below header) */
.crm-page.crm-deliverable-page > .ucmenu-wrap.crm-deliverable-nav,
.crm-page.crm-deliverable-page > .ucmenu-wrap {
  display: block !important;
  width: 100%;
  margin: 0 0 0.75rem !important;
  padding: 0.35rem 0 !important;
  position: sticky;
  top: var(--crm-topbar-height, 52px);
  z-index: 1015;
  background: #f1f5f9;
}

.crm-page.crm-deliverable-page > .ucmenu-wrap .ucmenu-tabs-row {
  width: 100%;
  padding: 5px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.crm-page.crm-deliverable-page > .ucmenu-wrap .crm-tabs-strip .crm-tabs-link {
  font-size: 14px;
  font-weight: 500;
}

.crm-page.crm-deliverable-page > .ucmenu-wrap .crm-tabs-strip .crm-tabs-link.is-selected {
  font-weight: 600;
}

.crm-page.crm-deliverable-page > .ucmenu-wrap .crm-tab-count,
.crm-page.crm-deliverable-page > .ucmenu-wrap #emailCount.crm-tab-count {
  font-size: 12px !important;
  font-weight: 700 !important;
}

/* Deliverable page toolbars ? files, photos, milestones (btn-sm sizing) */
.crm-page.crm-deliverable-page .deliverable-files-toolbar .btn,
.crm-page.crm-deliverable-page .deliverable-files-toolbar a.btn,
.crm-page.crm-deliverable-page .deliverable-files-toolbar button.btn,
.crm-page.crm-deliverable-page .deliverable-files-toolbar input.btn,
.crm-page.crm-deliverable-page .milestones-toolbar .btn,
.crm-page.crm-deliverable-page .milestones-toolbar a.btn,
.crm-page.crm-deliverable-page .milestones-toolbar button.btn,
.crm-page.crm-deliverable-page .milestones-toolbar input.btn,
.crm-page.crm-deliverable-page .container-fluid.mb-4 > .mt-4 .btn {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  line-height: 1.5;
  border-radius: 0.25rem;
}

.crm-page.crm-deliverable-page .deliverable-files-toolbar .input-group-text,
.crm-page.crm-deliverable-page .deliverable-files-toolbar .form-control {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  line-height: 1.5;
}

.crm-page.crm-deliverable-page .deliverable-files-toolbar .input-group-text {
  padding: 0.25rem 0.5rem;
}

.crm-page.crm-deliverable-page .deliverable-files-toolbar .RadComboBox .rcbInput,
.crm-page.crm-deliverable-page .deliverable-files-toolbar .form-control {
  font-size: 0.875rem !important;
  min-height: calc(0.25rem * 2 + 1.5em);
}

/* Notes & Files ? activity filter pills */
.crm-page.crm-deliverable-page .milestone-filter-pills {
  padding: 0.65rem 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.875rem;
}

.crm-page.crm-deliverable-page .milestone-filter-pill {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  margin-right: 0.5rem;
  margin-bottom: 0.35rem;
  transform: none;
}

.crm-page.crm-deliverable-page .milestone-filter-pill:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
  transform: none;
}

.crm-page.crm-deliverable-page .milestone-filter-pill.active,
.crm-page.crm-deliverable-page .milestone-filter-pill.active:hover {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1a1d23 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.crm-page.crm-deliverable-page .milestone-filter-pill .milestone-count {
  font-size: 12px;
  font-weight: 700;
  color: #8a9ab0;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 6px;
  opacity: 1;
}

.crm-page.crm-deliverable-page .milestone-filter-pill.active .milestone-count {
  color: #1a6fd4;
  background: #e8f0fb;
}

/* Notes & Files ? deviation filter pills */
.crm-page.crm-deliverable-page .milestone-filter-pills .text-muted,
.crm-page.crm-deliverable-page .deviation-filter-pill .text-muted {
  font-size: 12px;
  font-weight: 700;
  color: #8a9ab0 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.crm-page.crm-deliverable-page .deviation-filter-pill {
  padding: 0.65rem 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.875rem;
}

.crm-page.crm-deliverable-page .deviation-filter-pill-btn {
  padding: 5px 12px;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  transform: none;
}

.crm-page.crm-deliverable-page .deviation-filter-pill-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
  transform: none;
}

.crm-page.crm-deliverable-page .deviation-filter-pill-btn.active,
.crm-page.crm-deliverable-page .deviation-filter-pill-btn.active:hover {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1a1d23 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.crm-page.crm-deliverable-page .deviation-filter-pill-btn[data-deviation="1"].active .bi-exclamation-triangle-fill {
  color: #c47d0a;
}

/* Proposal deliverable detail pages */
.crm-page.crm-deliverable-page .deliverable-summary-actions {
  margin: 0 0 0.5rem;
  padding: 0;
  border: none;
  background: transparent;
}

.crm-page.crm-deliverable-page .deliverable-summary-actions .btn {
  font-size: 13px;
  padding: 5px 12px;
}

.deliverable-summary-root .crm-field-val .btn,
.deliverable-summary-root .crm-copy-path-btn {
  font-size: 13px;
  padding: 5px 12px;
  line-height: 1.4;
  border-radius: 8px;
}

.deliverable-summary-root .crm-field-val .btn .bi,
.deliverable-summary-root .crm-copy-path-btn .bi {
  font-size: 13px;
}

.deliverable-section-nav-link {
  text-decoration: none;
}

.crm-page.crm-deliverable-page .deliverable-section-nav-sentinel {
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.crm-page.crm-deliverable-page .deliverable-section-nav-shell {
  position: sticky;
  top: 52px;
  z-index: 1020;
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 4px 0;
  background: transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.crm-page.crm-deliverable-page .deliverable-section-nav-shell.is-stuck {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 6px 0 8px;
}

.crm-page.crm-deliverable-page .deliverable-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.crm-page.crm-deliverable-page .deliverable-section-nav-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 6px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.crm-page.crm-deliverable-page .deliverable-section-nav-link:hover {
  color: #334155;
  background: rgba(248, 250, 252, 0.65);
}

.crm-page.crm-deliverable-page .deliverable-section-nav-link.is-active {
  color: #1a6fd4;
  background: transparent;
  border: none;
  box-shadow: none;
  font-weight: 600;
}

.crm-page.crm-deliverable-page .deliverable-summary-root .crm-field-row {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 4px 16px;
  align-items: start;
  justify-content: start;
  padding: 8px 0;
  border-bottom: none;
}

.crm-page.crm-deliverable-page .deliverable-summary-root .crm-field-row .crm-field-key {
  flex: none;
  max-width: none;
  padding-top: 0;
}

.crm-page.crm-deliverable-page .deliverable-summary-root .crm-field-row .crm-field-key {
  font-size: 14px;
}

.crm-page.crm-deliverable-page .deliverable-summary-root .crm-field-row .crm-field-val {
  flex: none;
  text-align: left;
  max-width: none;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  color: #1a1d23;
}

.crm-page.crm-deliverable-page .deliverable-summary-root .crm-field-row--stack {
  display: block;
  padding: 8px 0;
}

.crm-page.crm-deliverable-page .deliverable-summary-root .crm-field-row--stack .crm-field-key {
  display: block;
  margin-bottom: 4px;
}

.crm-page.crm-deliverable-page .deliverable-summary-root .crm-field-row--stack .crm-field-val {
  display: block;
  max-width: 100%;
  font-weight: 400;
  line-height: 1.4;
}

.crm-page.crm-deliverable-page .deliverable-summary-root .crm-cc-note {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: #1a1d23;
}

/* Rollout Project Details ? match Deliverable Information label/value style */
.crm-page.crm-deliverable-page .deliverable-rollout-fields .rollout-field-label {
  padding: 8px 12px 8px 0;
  font-size: 14px;
  font-weight: 400;
  color: #8a9ab0;
  text-transform: none;
  letter-spacing: normal;
}

.crm-page.crm-deliverable-page .deliverable-rollout-fields .rollout-field-val {
  padding: 8px 0;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  max-width: none;
  color: #1a1d23;
}

.crm-page.crm-deliverable-page .deliverable-rollout-fields .rollout-field-val .crm-badge,
.crm-page.crm-deliverable-page .deliverable-rollout-fields .rollout-field-val .crm-chip {
  font-size: 12px;
  font-weight: 600;
  vertical-align: baseline;
}

.crm-page.crm-deliverable-page .deliverable-rollout-fields .rollout-phase-hdr {
  font-size: 12px;
  font-weight: 700;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 12px 12px;
  margin-top: 0;
  margin-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.crm-page.crm-deliverable-page .deliverable-rollout-fields .rollout-phase-hdr:not(:first-of-type) {
  margin-top: 20px;
  padding-top: 18px;
}

.crm-page.crm-deliverable-page .deliverable-rollout-fields .rollout-phase-hdr + .rollout-field-label {
  padding-top: 0;
}

/* Deliverable edit form ? grey CRM labels (match summary field keys) */
.crm-page.crm-deliverable-page .deliverable-edit-root .crm-edit-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #8a9ab0;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  line-height: 1.3;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-edit-label.d-inline {
  display: inline;
  margin-bottom: 0;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-edit-group-hdr {
  font-size: 12px;
  font-weight: 700;
  color: #8a9ab0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding-left: 12px;
}

.crm-page.crm-deliverable-page .deliverable-rollout-fields .crm-edit-group-hdr {
  padding-left: 12px;
}

.crm-page.crm-deliverable-page .deliverable-rollout-fields .crm-edit-label {
  padding-left: 12px;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-date-input-wrap,
.crm-page.crm-deliverable-page .milestones-proj-root .crm-date-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-date-input-wrap .crm-date-input,
.crm-page.crm-deliverable-page .milestones-proj-root .crm-date-input-wrap .crm-date-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  color: #1a1d23;
  padding-right: 0.35rem;
}

.crm-page.crm-deliverable-page .milestones-proj-root .crm-date-input-wrap .crm-date-input {
  min-height: 30px;
  font-size: 0.8125rem;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-date-clear-btn,
.crm-page.crm-deliverable-page .milestones-proj-root .crm-date-clear-btn {
  position: static;
  transform: none;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0 2px;
  margin: 0;
  cursor: pointer;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-date-clear-btn:hover,
.crm-page.crm-deliverable-page .deliverable-edit-root .crm-date-clear-btn:focus-visible,
.crm-page.crm-deliverable-page .milestones-proj-root .crm-date-clear-btn:hover,
.crm-page.crm-deliverable-page .milestones-proj-root .crm-date-clear-btn:focus-visible {
  color: #64748b;
}

.crm-page.crm-deliverable-page .crm-date-input-wrap.is-locked .crm-date-clear-btn,
.crm-page.crm-deliverable-page .crm-date-input-wrap:has(.crm-date-input:disabled) .crm-date-clear-btn,
.crm-page.crm-deliverable-page .crm-date-input-wrap:has(.crm-date-input[readonly]) .crm-date-clear-btn {
  display: none !important;
  pointer-events: none;
}

.crm-page.crm-deliverable-page .deliverable-edit-root input[type="date"].crm-date-input::-webkit-calendar-picker-indicator,
.crm-page.crm-deliverable-page .milestones-proj-root input[type="date"].crm-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.65;
}

/* Hide browser default mm/dd/yyyy hint when empty; show on focus or when a date is set */
.crm-page.crm-deliverable-page .deliverable-edit-root input[type="date"].crm-date-input:not(.crm-date-has-value):not(:focus)::-webkit-datetime-edit,
.crm-page.crm-deliverable-page .milestones-proj-root input[type="date"].crm-date-input:not(.crm-date-has-value):not(:focus)::-webkit-datetime-edit,
.crm-page.crm-deliverable-page .milestones-proj-root input[type="date"].crm-date-input:disabled:not(.crm-date-has-value)::-webkit-datetime-edit,
.crm-page.crm-deliverable-page .milestones-proj-root input[type="date"].crm-date-input[disabled]:not(.crm-date-has-value)::-webkit-datetime-edit,
.crm-page.crm-deliverable-page .milestones-proj-root .crm-date-input-wrap.is-locked input[type="date"].crm-date-input:not(.crm-date-has-value)::-webkit-datetime-edit {
  opacity: 0 !important;
  color: transparent !important;
}

.crm-page.crm-deliverable-page .milestones-proj-root input[type="date"].crm-date-input:disabled:not(.crm-date-has-value),
.crm-page.crm-deliverable-page .milestones-proj-root input[type="date"].crm-date-input[disabled]:not(.crm-date-has-value) {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

.crm-page.crm-deliverable-page .deliverable-edit-root input[type="date"].crm-date-input.crm-date-has-value::-webkit-datetime-edit,
.crm-page.crm-deliverable-page .deliverable-edit-root input[type="date"].crm-date-input:focus::-webkit-datetime-edit,
.crm-page.crm-deliverable-page .milestones-proj-root input[type="date"].crm-date-input.crm-date-has-value::-webkit-datetime-edit,
.crm-page.crm-deliverable-page .milestones-proj-root input[type="date"].crm-date-input:focus::-webkit-datetime-edit,
.crm-page.crm-deliverable-page .milestones-proj-root input[type="date"].crm-date-input:disabled.crm-date-has-value::-webkit-datetime-edit,
.crm-page.crm-deliverable-page .milestones-proj-root input[type="date"].crm-date-input[disabled].crm-date-has-value::-webkit-datetime-edit,
.crm-page.crm-deliverable-page .milestones-proj-root .crm-date-input-wrap.is-locked input[type="date"].crm-date-input.crm-date-has-value::-webkit-datetime-edit {
  opacity: 1;
}

.crm-page.crm-deliverable-page .deliverable-rollout-fields .rollout-phase-hdr .bi {
  color: #94a3b8;
}

.crm-page.crm-deliverable-page .deliverable-rollout-contacts {
  border-left: 1px solid #e2e8f0;
  padding-left: 1.25rem;
}

.crm-page.crm-deliverable-page .crm-rollout-contact-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.crm-page.crm-deliverable-page .crm-rollout-contact-group {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f3f5;
}

.crm-page.crm-deliverable-page .crm-rollout-contact-group--last {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.crm-page.crm-deliverable-page .crm-rollout-contact-hdr {
  font-size: 12px;
  font-weight: 700;
  color: #8a9ab0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.crm-page.crm-deliverable-page .crm-rollout-contact-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 8px;
}

.crm-page.crm-deliverable-page .crm-rollout-contact-row:last-child {
  margin-bottom: 0;
}

.crm-page.crm-deliverable-page .crm-rollout-contact-key {
  font-size: 14px;
  font-weight: 600;
  color: #8a9ab0;
  margin: 0;
  padding: 0;
  line-height: 1.3;
  white-space: nowrap;
}

.crm-page.crm-deliverable-page .deliverable-rollout-fields .form-control,
.crm-page.crm-deliverable-page .deliverable-rollout-fields .form-select,
.crm-page.crm-deliverable-page .deliverable-rollout-fields input[type="date"].crm-date-input {
  font-size: 14px;
  line-height: 1.4;
}

.crm-page.crm-deliverable-page .deliverable-rollout-fields .form-control-sm {
  min-height: 34px;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.crm-page.crm-deliverable-page .crm-rollout-contact-row .form-control {
  min-width: 0;
}

@media (max-width: 767px) {
  .crm-page.crm-deliverable-page .deliverable-rollout-contacts {
    border-left: none;
    border-top: 1px solid #e2e8f0;
    padding-left: 0;
    padding-top: 1rem;
    margin-top: 0.5rem;
  }
}

/* Deliverable edit ? section layout, subcards, actions */
.crm-page.crm-deliverable-page .deliverable-edit-root .crm-edit-section {
  margin-bottom: 1.25rem;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-edit-section-hdr {
  font-size: 12px;
  font-weight: 700;
  color: #8a9ab0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-edit-subcard {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-edit-subcard > .card-body {
  padding: 1rem 1.15rem;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-validation-summary {
  font-size: 14px;
  margin-bottom: 1rem;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-validation-summary ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .deliverable-status-select {
  max-width: 280px;
  min-width: 180px;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .rollout-phase-hdr--toggle {
  cursor: pointer;
  margin-top: 0;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .rollout-phase-hdr--toggle:hover {
  color: #64748b;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-facility-table thead th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 8px 12px;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .crm-facility-table tbody td,
.crm-page.crm-deliverable-page .deliverable-edit-root .crm-facility-table tfoot td {
  font-size: 14px;
  padding: 8px 12px;
  vertical-align: middle;
  border-bottom-color: #f1f3f5;
}

.crm-page.crm-deliverable-page .deliverable-rollout-fields .crm-rollout-contact-val {
  font-size: 14px;
  font-weight: 500;
  color: #1a1d23;
  line-height: 1.4;
  min-width: 0;
  word-break: break-word;
}

.crm-page.crm-deliverable-page .crm-empty-val {
  color: #94a3b8;
  font-weight: 400;
}

@media (max-width: 575.98px) {
  .crm-page.crm-deliverable-page .deliverable-rollout-fields .row > .col-4.rollout-field-label,
  .crm-page.crm-deliverable-page .deliverable-rollout-fields .row > .col-8.mb-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .crm-page.crm-deliverable-page .deliverable-rollout-fields .row > .col-4.rollout-field-label {
    margin-bottom: 4px;
  }
}

.crm-page.crm-deliverable-page .deliverable-summary-root .table thead th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 8px 12px;
}

.crm-page.crm-deliverable-page .deliverable-summary-root .table tbody td {
  font-size: 14px;
  font-weight: 500;
  color: #1a1d23;
  line-height: 1.45;
  padding: 8px 12px;
  vertical-align: middle;
  border-bottom-color: #f1f3f5;
}

.crm-page.crm-deliverable-page .deliverable-summary-root .table tbody td small {
  font-size: 13px;
  font-weight: 500;
  color: #4a5568;
}

.crm-page.crm-deliverable-page .deliverable-summary-root .table.table-sm tbody td {
  font-size: 14px;
  padding: 8px 12px;
}

.crm-page.crm-deliverable-page #deliverable-info,
.crm-page.crm-deliverable-page #rollout,
.crm-page.crm-deliverable-page #resources,
.crm-page.crm-deliverable-page #hours,
.crm-page.crm-deliverable-page #milestones,
.crm-page.crm-deliverable-page #overdue,
.crm-page.crm-deliverable-page #tasks,
.crm-page.crm-deliverable-page #opportunity {
  scroll-margin-top: 108px;
}

.crm-page.crm-deliverable-page .deliverable-summary-root > .card:first-of-type,
.crm-page.crm-deliverable-page .deliverable-summary-root > #deliverable-info {
  margin-top: 0 !important;
}

.crm-page.crm-deliverable-page .card,
.crm-page.crm-deliverable-page .milestone-card {
  border: 1px solid #e2e8f0 !important;
  border-left: 1px solid #e2e8f0 !important;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  background: #fff;
}

.crm-page.crm-deliverable-page .deliverable-summary-root > .card,
.crm-page.crm-deliverable-page .deliverable-summary-root .card {
  border-left: 1px solid #e2e8f0 !important;
}

.crm-page.crm-deliverable-page .card-header {
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.crm-page.crm-deliverable-page .card-header .card-title,
.crm-page.crm-deliverable-page .milestone-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
}

.crm-page.crm-deliverable-page .milestone-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.625rem 1rem;
}

.crm-page.crm-deliverable-page .milestone-title .form-control {
  font-size: 14px;
  line-height: 1.4;
  min-height: 30px;
  padding: 0.2rem 0.45rem;
  height: auto;
  box-sizing: border-box;
}

.crm-page.crm-deliverable-page .milestone-card .task-name-input {
  min-height: 40px;
  height: auto;
  line-height: 1.35;
  resize: vertical;
  overflow: hidden;
}

.crm-page.crm-deliverable-page .milestone-card .task-name-field {
  align-items: flex-start;
  min-height: 40px;
}

/* Milestones ? locked fields read like labels, not gray disabled inputs */
.crm-page.crm-deliverable-page .milestone-card .task-name-input:disabled,
.crm-page.crm-deliverable-page .milestone-card .task-name-input[disabled],
.crm-page.crm-deliverable-page .milestone-card .hours-input:disabled,
.crm-page.crm-deliverable-page .milestone-card .hours-input[disabled],
.crm-page.crm-deliverable-page .milestone-card .date-input:disabled,
.crm-page.crm-deliverable-page .milestone-card .date-input[disabled],
.crm-page.crm-deliverable-page .milestone-title .form-control:disabled,
.crm-page.crm-deliverable-page .milestone-title .form-control[disabled],
.crm-page.crm-deliverable-page .task-table .form-select:disabled,
.crm-page.crm-deliverable-page .task-table .form-select[disabled] {
  background: transparent !important;
  background-color: transparent !important;
  color: #1a1d23 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  cursor: default;
  opacity: 1;
  font-weight: 500;
  -webkit-text-fill-color: #1a1d23;
}

.crm-page.crm-deliverable-page .milestone-card {
  margin-bottom: 1rem;
}

.crm-page.crm-deliverable-page .task-table thead th {
  padding: 0.45rem 0.75rem;
}

.crm-page.crm-deliverable-page .task-table tbody td {
  padding: 0.55rem 0.75rem;
}

.crm-page.crm-deliverable-page .task-table tbody tr {
  border-bottom: 1px solid #e9ecef;
}

.crm-page.crm-deliverable-page .milestones-toolbar {
  gap: 0.5rem;
}

.crm-page.crm-deliverable-page .milestones-toolbar .btn i,
.crm-page.crm-deliverable-page .milestones-toolbar a.btn i {
  font-size: 1em;
}

.crm-page.crm-deliverable-page .btn-add-task {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  line-height: 1.5;
  border-radius: 0.25rem;
}

.crm-page.crm-deliverable-page .milestones-form-actions .btn,
.crm-page.crm-deliverable-page .milestones-form-actions input.btn,
.crm-page.crm-deliverable-page .milestones-form-actions button.btn {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  line-height: 1.5;
  border-radius: 0.25rem;
}

/* Keep Save / Cancel (and notify) pinned while scrolling milestones */
.crm-page.crm-deliverable-page .milestones-uc-root,
.crm-page.crm-deliverable-page .milestones-proj-root,
.crm-page.crm-deliverable-page .deliverable-edit-root,
.crm-page.crm-deliverable-page .crm-deliverable-add-form,
.crm-page.crm-deliverable-page .photo-add-root,
.crm-page.crm-deliverable-page .photo-edit-root {
  padding-bottom: 5.5rem;
}

.crm-page.crm-deliverable-page .milestones-proj-root:has(.milestones-sticky-actions .milestones-notify-row) {
  padding-bottom: 7.25rem;
}

.crm-shell .crm-page.crm-deliverable-page .milestones-sticky-actions {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 260px;
  z-index: 1020;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem 1.5rem;
  margin: 0;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
}

.crm-shell .main-panel.main-panel-expanded .crm-page.crm-deliverable-page .milestones-sticky-actions {
  left: 80px;
}

.crm-page.crm-deliverable-page .milestones-sticky-actions .milestones-notify-row {
  margin: 0;
  padding: 0.35rem 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.crm-page.crm-deliverable-page .milestones-sticky-actions .milestones-form-actions {
  margin: 0;
}

.crm-page.crm-deliverable-page .deliverable-edit-root .deliverable-edit-actions {
  /* sticky bar uses .milestones-sticky-actions; keep flex alignment */
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

@media (max-width: 991px) {
  .crm-shell .crm-page.crm-deliverable-page .milestones-sticky-actions,
  .crm-shell .main-panel.main-panel-expanded .crm-page.crm-deliverable-page .milestones-sticky-actions {
    left: 0;
  }
}

.crm-page.crm-deliverable-page .btn-add-task i {
  font-size: 1em;
}

.crm-page.crm-deliverable-page .milestones-add-task-wrap {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.25rem;
}

/* Add Task + Delete tasks? ? same height and padding in milestone footer */
.crm-page.crm-deliverable-page .milestones-add-task-wrap .btn-add-task,
.crm-page.crm-deliverable-page .milestones-add-task-wrap .crm-action-btn.crm-action-labeled {
  height: auto !important;
  min-height: 31px;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.875rem !important;
  font-weight: 500;
  line-height: 1.5 !important;
  border-radius: 0.25rem !important;
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  vertical-align: middle;
}

.crm-page.crm-deliverable-page .milestone-actions {
  flex-shrink: 0;
  align-self: center;
}

.milestones-rules-popover .popover-body {
  font-size: 0.8125rem;
  color: #475569;
  max-width: 320px;
}

.milestones-rules-popover .popover-body li + li {
  margin-top: 0.35rem;
}

/* Milestones iframe pages (modify_milestones.aspx, assign_resources.aspx) */
.crm-modify-milestones-body,
.crm-assign-resources-body {
  background: #fff;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.crm-modify-milestones-body form,
.crm-assign-resources-body form {
  min-height: 100%;
}

.crm-modify-milestones-page {
  min-height: 100%;
  padding: 0.75rem 1rem 1rem;
}

.crm-assign-resources-page {
  min-height: 100%;
  padding: 0.75rem;
}

.crm-modify-milestones-page .crm-modify-milestones-card {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
  background: transparent;
}

.crm-assign-resources-page .crm-assign-resources-card {
  border: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
  border-radius: 12px;
  background: #fff;
  padding: 1rem 1.25rem 1.25rem;
}

.crm-modify-milestones-page .crm-modify-milestones-card > .card-header {
  padding: 0 0 0.75rem;
  background: transparent;
  border-bottom: 1px solid #e2e8f0;
}

.crm-assign-resources-page .crm-assign-resources-card > .card-header {
  padding: 0 0 0.75rem;
  background: transparent;
  border-bottom: 1px solid #e2e8f0;
}

.crm-modify-milestones-page .crm-modify-milestones-card > .card-body {
  padding: 0.75rem 0 0;
}

.crm-assign-resources-page .crm-assign-resources-card > .card-body {
  padding: 0.75rem 0 0;
}

.crm-modify-milestones-page .crm-modify-milestones-icon,
.crm-assign-resources-page .crm-assign-resources-icon {
  color: #1a6fd4;
}

.crm-modify-milestones-page .container-fluid.mb-4,
.crm-assign-resources-page .container-fluid.mb-4 {
  padding-left: 0;
  padding-right: 0;
  margin-bottom: 0 !important;
}

.crm-assign-resources-page .card-body {
  position: relative;
}

.assign-saving-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.72);
  align-items: center;
  justify-content: center;
}

.assign-saving-overlay.show {
  display: flex;
}

.assign-saving-panel {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

.assign-save-toast {
  display: none;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 25;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  background: #d1e7dd;
  border: 1px solid #badbcc;
  color: #0f5132;
  font-size: 0.875rem;
  font-weight: 600;
}

.assign-save-toast.show {
  display: inline-flex;
}

/* ?? CRM sidebar (ucSideBarMenu.ascx) ?? */
.crm-sidebar-shell,
.crm-sidebar-nav {
  --crm-sidebar-inset: 16px;
  --crm-sidebar-icon-w: 32px;
  --crm-sidebar-icon-gap: 10px;
  --crm-sidebar-icon-size: 15px;
  --crm-sidebar-link-pad-y: 8px;
}

.sidebar:has(.crm-sidebar-nav) {
  background: #0E1733;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0, 0, 0, 0.12);
  color: #ffffff;
}

/* CRM sidebar shell: logo fixed, scroll only the nav area */
.sidebar.crm-sidebar-shell {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0E1733 !important;
  background-color: #0E1733 !important;
  color: #ffffff !important;
}

.sidebar.crm-sidebar-shell .crm-sidebar-logo-block {
  flex-shrink: 0;
}

.sidebar.crm-sidebar-shell .sidebar-wrapper {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.sidebar.crm-sidebar-shell .sidebar-wrapper::-webkit-scrollbar {
  width: 5px;
}

.sidebar.crm-sidebar-shell .sidebar-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar.crm-sidebar-shell .sidebar-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.sidebar.crm-sidebar-shell .sidebar-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.38);
}

.sidebar:has(.crm-sidebar-nav) .logo {
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #0E1733;
}

.sidebar:has(.crm-sidebar-nav) .logo .simple-text {
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sidebar:has(.crm-sidebar-nav) .sidebar-wrapper {
  padding: 0;
}

.crm-sidebar-nav {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}

.crm-sidebar-user {
  padding: 10px var(--crm-sidebar-inset);
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
}

.crm-sidebar-user-link {
  display: flex;
  align-items: center;
  gap: var(--crm-sidebar-icon-gap);
  text-decoration: none;
  color: #ffffff;
  transition: color 0.15s ease;
}

.crm-sidebar-user-link:hover {
  color: #ffffff;
  text-decoration: none;
  opacity: 1;
}

.crm-sidebar-user-avatar {
  width: var(--crm-sidebar-icon-w);
  height: var(--crm-sidebar-icon-w);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.crm-sidebar-user-initials {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.crm-sidebar-user-name,
.crm-sidebar-user-name .sidebar-normal {
  font-size: 12px;
  font-weight: 500;
  color: #ffffff;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3;
  display: block;
}

.crm-sidebar-group + .crm-sidebar-group {
  margin-top: 2px;
}

.crm-sidebar-group-label {
  padding: 14px var(--crm-sidebar-inset) 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.2;
  user-select: none;
}

.crm-sidebar-nav > .crm-sidebar-group:first-of-type .crm-sidebar-group-label {
  padding-top: 18px;
  padding-bottom: 4px;
}

.crm-sidebar-menu {
  padding: 0 0 8px;
  margin: 0;
  list-style: none;
}

.crm-sidebar-group:last-of-type .crm-sidebar-menu {
  padding-bottom: 16px;
}

/* Nested collapse menus ? light indent, no bullet gimmicks */
.crm-sidebar-submenu {
  list-style: none;
  margin: 0 0 4px;
  padding: 0 0 2px;
}

.crm-sidebar-submenu .nav-item {
  margin: 0 !important;
}

.crm-sidebar-nav .crm-sidebar-submenu .nav-link.crm-sidebar-sublink,
.sidebar:has(.crm-sidebar-nav) .crm-sidebar-submenu .nav-link.crm-sidebar-sublink {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  padding: 5px 14px 5px 36px !important;
  margin: 0 6px !important;
  border-radius: 6px !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  background: transparent !important;
  min-height: 0 !important;
}

.crm-sidebar-nav .crm-sidebar-submenu .nav-link.crm-sidebar-sublink:hover,
.sidebar:has(.crm-sidebar-nav) .crm-sidebar-submenu .nav-link.crm-sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

.crm-sidebar-caret {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  transition: transform 0.18s ease;
  margin-left: auto !important;
}

.crm-sidebar-link[aria-expanded="true"] .crm-sidebar-caret {
  transform: rotate(180deg);
  color: rgba(255, 255, 255, 0.55);
}

.crm-sidebar-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  margin: 0 8px 4px;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.crm-sidebar-user-chip .crm-sidebar-icon {
  color: #64748b;
}

.crm-sidebar-menu .nav-item > .crm-sidebar-link[data-bs-toggle="collapse"] {
  font-weight: 500;
}

.sidebar:has(.crm-sidebar-nav) .crm-sidebar-menu .nav-item {
  margin: 0 0 1px;
  border-bottom: none;
}

.sidebar:has(.crm-sidebar-nav) .crm-sidebar-link,
.sidebar .crm-sidebar-nav .crm-sidebar-menu .nav-link.crm-sidebar-link {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  padding: var(--crm-sidebar-link-pad-y) var(--crm-sidebar-inset) !important;
  border-radius: 6px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  gap: var(--crm-sidebar-icon-gap);
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar:has(.crm-sidebar-nav) .crm-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.sidebar:has(.crm-sidebar-nav) .crm-sidebar-link--active,
.sidebar:has(.crm-sidebar-nav) .crm-sidebar-link--active:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 500;
}

.crm-sidebar-icon {
  font-size: var(--crm-sidebar-icon-size);
  width: var(--crm-sidebar-icon-w) !important;
  min-width: var(--crm-sidebar-icon-w);
  flex: 0 0 var(--crm-sidebar-icon-w);
  text-align: center;
  flex-shrink: 0;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar:has(.crm-sidebar-nav) .crm-sidebar-link i.crm-sidebar-icon,
.sidebar .crm-sidebar-nav .crm-sidebar-menu .nav-link.crm-sidebar-link i.crm-sidebar-icon {
  width: var(--crm-sidebar-icon-w) !important;
  min-width: var(--crm-sidebar-icon-w) !important;
  flex: 0 0 var(--crm-sidebar-icon-w) !important;
  margin: 0 !important;
  font-size: var(--crm-sidebar-icon-size) !important;
}

.crm-sidebar-logo-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

.crm-sidebar-label {
  margin: 0;
  font-size: 13px;
  font-weight: inherit;
  flex: 1;
  min-width: 0;
}

.crm-sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: #1a6fd4;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;
}

.crm-sidebar-badge.crm-badge {
  min-width: 0;
  height: auto;
  padding: 3px 9px;
  margin-left: 6px;
  border-radius: 20px;
  font-size: 12px;
  line-height: 1.2;
  vertical-align: middle;
}

.crm-sidebar-badge:empty {
  display: none;
}

/* Collapsed sidebar ? single centered icon rail (requires .sidebar.sidebar-mini, not body alone) */
.sidebar.sidebar-mini.crm-sidebar-shell {
  --crm-sidebar-inset: 0;
  --crm-sidebar-mini-slot: 40px;
  --crm-sidebar-icon-w: 40px;
  --crm-sidebar-icon-size: 18px;
  --crm-sidebar-link-pad-y: 0;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-user-name,
.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-label,
.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-badge,
.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-group-label {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-logo-block {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  padding: 14px 0 10px !important;
  text-align: center !important;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-logo-link {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 4px 6px !important;
  margin: 0 auto !important;
  gap: 0 !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-logo-text {
  display: none !important;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-logo-img,
.sidebar.sidebar-mini.crm-sidebar-shell #crmSidebarLogo {
  width: auto !important;
  max-width: 48px !important;
  min-width: 0 !important;
  height: 24px !important;
  max-height: 24px !important;
  min-height: 24px !important;
  object-fit: contain !important;
  object-position: center center !important;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-logo-mark {
  width: 36px !important;
  height: 36px !important;
  flex: 0 0 36px;
  margin: 0 auto;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-nav,
.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-group,
.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-menu,
.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-menu .nav-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-group + .crm-sidebar-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-nav .nav-link.crm-sidebar-link {
  width: var(--crm-sidebar-mini-slot) !important;
  height: var(--crm-sidebar-mini-slot) !important;
  min-height: var(--crm-sidebar-mini-slot) !important;
  padding: 0 !important;
  margin: 0 auto 2px !important;
  gap: 0 !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex: 0 0 auto;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-menu {
  padding: 0 0 12px !important;
  width: 100%;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-nav .nav-link.crm-sidebar-link .crm-sidebar-icon,
.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-nav .nav-link.crm-sidebar-link i.crm-sidebar-icon {
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  font-size: var(--crm-sidebar-icon-size) !important;
}

/* Collapsed sidebar ? show short abbreviations for submenu items */
.crm-sidebar-abbr {
  display: none;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-caret {
  display: none !important;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-submenu,
.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-submenu .nav-item,
.sidebar.sidebar-mini.crm-sidebar-shell .collapse {
  width: 100%;
  align-items: center;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-nav .crm-sidebar-submenu .nav-link.crm-sidebar-sublink,
.sidebar.sidebar-mini.crm-sidebar-shell:has(.crm-sidebar-nav) .crm-sidebar-submenu .nav-link.crm-sidebar-sublink {
  width: var(--crm-sidebar-mini-slot) !important;
  min-height: 26px !important;
  height: auto !important;
  padding: 4px 2px !important;
  margin: 0 auto 2px !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-nav .crm-sidebar-submenu .nav-link.crm-sidebar-sublink:hover,
.sidebar.sidebar-mini.crm-sidebar-shell:has(.crm-sidebar-nav) .crm-sidebar-submenu .nav-link.crm-sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-submenu .crm-sidebar-abbr {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto !important;
  overflow: visible !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: #ffffff;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar.crm-sidebar-shell:not(.sidebar-mini) .crm-sidebar-abbr {
  display: none !important;
}

/* Expanded sidebar — show labels (do NOT include logo img: height:auto blows it up to full PNG size) */
.sidebar.crm-sidebar-shell:not(.sidebar-mini) .crm-sidebar-label,
.sidebar.crm-sidebar-shell:not(.sidebar-mini) .crm-sidebar-group-label,
.sidebar.crm-sidebar-shell:not(.sidebar-mini) .crm-sidebar-user-name {
  display: block !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  padding: revert !important;
  margin: revert !important;
}

.sidebar.crm-sidebar-shell:not(.sidebar-mini) .crm-sidebar-logo-img,
.sidebar.crm-sidebar-shell:not(.sidebar-mini) #crmSidebarLogo {
  display: block !important;
  width: auto !important;
  max-width: 168px !important;
  min-width: 0 !important;
  height: 32px !important;
  max-height: 32px !important;
  min-height: 32px !important;
  object-fit: contain !important;
  object-position: left center !important;
  margin: 0 !important;
}

.sidebar.crm-sidebar-shell:not(.sidebar-mini) .crm-sidebar-logo-block {
  text-align: left !important;
  justify-content: flex-start !important;
}

.sidebar.crm-sidebar-shell:not(.sidebar-mini) .crm-sidebar-logo-link {
  justify-content: flex-start !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

.sidebar.crm-sidebar-shell:not(.sidebar-mini) .crm-sidebar-badge {
  display: inline-flex !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  padding: 0 6px !important;
  margin-left: 6px !important;
}

/* ?? CRM shell (pcenter.Master) ?? */
.crm-shell {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: #f1f5f9 !important;
  color: #1a1d23;
}

.crm-shell .form {
  background: #f1f5f9;
}

.crm-shell .content {
  padding: 22px 24px !important;
  margin-top: 52px !important;
  overflow: visible !important;
}

.crm-shell .main-panel {
  background: #f1f5f9;
  overflow: visible !important;
}

/* Sidebar logo */
.crm-sidebar-shell .crm-sidebar-logo-block {
  padding: 12px var(--crm-sidebar-inset) 10px !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: #0E1733 !important;
  box-shadow: none !important;
}

.crm-sidebar-logo-img,
#crmSidebarLogo {
  display: block !important;
  width: auto !important;
  max-width: 168px !important;
  min-width: 0 !important;
  height: 32px !important;
  max-height: 32px !important;
  min-height: 32px !important;
  object-fit: contain !important;
  object-position: left center !important;
  margin: 0 !important;
}

.crm-sidebar-logo-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: var(--crm-sidebar-icon-gap);
  text-decoration: none !important;
  color: #ffffff !important;
}

.crm-sidebar-logo-mark {
  width: var(--crm-sidebar-icon-w);
  height: var(--crm-sidebar-icon-w);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1;
}

.crm-sidebar-logo-text {
  display: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
  white-space: nowrap;
}

.crm-sidebar-logo-block .logo-mini {
  display: none !important;
}

.sidebar.sidebar-mini.crm-sidebar-shell .crm-sidebar-logo-text {
  display: none;
}

/* Mobile drawer + backdrop (pcenter.Master hamburger) */
.crm-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.crm-sidebar-backdrop.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 768px) {
  body.crm-sidebar-open {
    overflow: hidden;
    touch-action: none;
  }

  .crm-shell .sidebar,
  .crm-shell .sidebar.crm-sidebar-shell {
    width: min(280px, 88vw) !important;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 1050;
    will-change: transform;
  }

  .crm-shell .sidebar.show {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.18);
  }

  /* Always full-width drawer on mobile ? ignore desktop mini mode */
  .crm-shell .sidebar.sidebar-mini {
    width: min(280px, 88vw) !important;
  }

  .crm-shell .sidebar.sidebar-mini .crm-sidebar-logo-img,
  .crm-shell .sidebar.sidebar-mini:has(.crm-sidebar-nav) .crm-sidebar-user-name,
  .crm-shell .sidebar.sidebar-mini:has(.crm-sidebar-nav) .crm-sidebar-label,
  .crm-shell .sidebar.sidebar-mini:has(.crm-sidebar-nav) .crm-sidebar-badge {
    display: block !important;
  }

  .crm-shell .sidebar.sidebar-mini .crm-sidebar-logo-img,
  .crm-shell .sidebar.sidebar-mini #crmSidebarLogo {
    width: auto !important;
    max-width: 168px !important;
    min-width: 0 !important;
    height: 32px !important;
    max-height: 32px !important;
    min-height: 32px !important;
    object-position: left center !important;
  }

  .crm-shell .sidebar.sidebar-mini .crm-sidebar-abbr {
    display: none !important;
  }

  .crm-shell .sidebar.sidebar-mini .crm-sidebar-logo-block {
    padding: 12px 16px 10px !important;
    text-align: left;
  }

  .crm-shell .sidebar.sidebar-mini .crm-sidebar-logo-link,
  .crm-shell .sidebar.sidebar-mini:has(.crm-sidebar-nav) .crm-sidebar-user-link,
  .crm-shell .sidebar.sidebar-mini:has(.crm-sidebar-nav) .crm-sidebar-link {
    justify-content: flex-start !important;
  }

  .crm-shell .sidebar.sidebar-mini:has(.crm-sidebar-nav) .crm-sidebar-user {
    padding: 10px var(--crm-sidebar-inset, 16px);
  }

  .crm-shell .sidebar.sidebar-mini:has(.crm-sidebar-nav) .crm-sidebar-link {
    padding: 7px var(--crm-sidebar-inset, 16px) !important;
  }

  .crm-shell .main-panel,
  .crm-shell .main-panel.main-panel-expanded {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .crm-shell .crm-topbar,
  .crm-shell .main-panel.main-panel-expanded .crm-topbar {
    left: 0 !important;
    z-index: 1060 !important;
  }
}

/* Topbar */
.crm-shell .crm-topbar {
  position: fixed !important;
  top: 0;
  right: 0;
  left: 260px;
  z-index: 1030;
  height: 52px;
  min-height: 52px;
  padding: 0 20px !important;
  margin: 0 !important;
  background: #fff !important;
  background-color: #fff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  backdrop-filter: none !important;
}

.crm-shell .main-panel.main-panel-expanded .crm-topbar {
  left: 80px;
}

.crm-shell .crm-topbar .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 52px;
  padding: 0 !important;
  overflow: visible;
  max-width: 100%;
}

.crm-shell .crm-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.crm-shell .crm-topbar .navbar-brand,
.crm-shell .crm-navbar-title-wrap {
  min-width: 0;
  overflow: hidden;
}

.crm-shell .crm-topbar .navbar-minimize {
  margin-right: 0;
  flex-shrink: 0;
}

.crm-shell .crm-topbar-collapse {
  flex: 0 0 auto;
  flex-shrink: 0;
}

.crm-shell .crm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.crm-topbar-lockout-grace {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.crm-topbar-lockout-grace:hover,
.crm-topbar-lockout-grace:focus-visible {
  color: #0f172a;
  background: #e2e8f0;
  text-decoration: none;
}

.crm-topbar-lockout-grace strong {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #0f172a;
}

.crm-topbar-lockout-grace.is-urgent {
  color: #b45309;
  background: #fffbeb;
  border-color: #fcd34d;
}

.crm-topbar-lockout-grace.is-urgent strong {
  color: #b45309;
}

.crm-topbar-lockout-grace.is-expired {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.crm-topbar-inbox {
  position: relative;
  flex-shrink: 0;
}

.crm-topbar-inbox-btn {
  position: relative;
  overflow: visible;
}

.crm-topbar-inbox-btn .bi-inbox {
  font-size: 1.05rem;
  line-height: 1;
}

.crm-topbar-inbox-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #dc2626 !important;
  background-color: #dc2626 !important;
  color: #fff !important;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 0 1.5px #fff;
  letter-spacing: -0.02em;
}

.crm-topbar-inbox-dd,
.crm-topbar-user-dd {
  background: #fff !important;
  background-color: #fff !important;
}

.crm-topbar-inbox-dd {
  min-width: 280px;
  max-width: min(360px, 92vw);
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  margin-top: 8px !important;
}

.crm-topbar-inbox-head {
  padding: 6px 10px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.crm-topbar-inbox-item {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 7px;
  padding: 8px 10px !important;
  font-size: 13px;
  color: #334155 !important;
  white-space: normal;
}

.crm-topbar-inbox-item:hover,
.crm-topbar-inbox-item:focus {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

.crm-topbar-inbox-name {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.crm-topbar-inbox-count {
  flex-shrink: 0;
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e8f0fb;
  color: #1a6fd4;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}

.crm-topbar-inbox-empty {
  color: #8a9ab0 !important;
  font-size: 13px;
  pointer-events: none;
}

.crm-topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  padding: 4px 6px;
  margin: -4px -6px;
  transition: background-color 0.15s ease;
  cursor: pointer;
}

.crm-topbar-user:hover,
.crm-topbar-user:focus-visible,
.crm-topbar-user.show {
  background-color: #f1f5f9;
  text-decoration: none;
  color: inherit;
}

.crm-topbar-user-caret {
  font-size: 12px;
  color: #94a3b8;
  margin-left: 2px;
}

.crm-topbar-user-dd {
  min-width: 200px;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  margin-top: 8px !important;
}

.crm-topbar-user-dd .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
  color: #334155;
}

.crm-topbar-user-dd .dropdown-item i {
  color: #64748b;
  font-size: 14px;
}

.crm-topbar-user-dd .dropdown-item:hover,
.crm-topbar-user-dd .dropdown-item:focus {
  background: #f1f5f9;
  color: #1e293b;
}

.crm-shell .crm-topbar .crm-topbar-user .crm-topbar-user-avatar,
.crm-topbar-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.crm-shell .crm-topbar .crm-topbar-user--admin .crm-topbar-user-avatar {
  background: #e8f0fb !important;
  background-color: #e8f0fb !important;
  color: #1a6fd4 !important;
}

.crm-shell .crm-topbar .crm-topbar-user--manager .crm-topbar-user-avatar {
  background: #fef3dc !important;
  background-color: #fef3dc !important;
  color: #c47d0a !important;
}

.crm-shell .crm-topbar .crm-topbar-user--employee .crm-topbar-user-avatar {
  background: #f1f3f5 !important;
  background-color: #f1f3f5 !important;
  color: #64748b !important;
}

.crm-topbar-user-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1.2;
}

.crm-topbar-user-name {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
}

.crm-topbar-user-role {
  font-size: 12px;
  font-weight: 400;
  color: #94a3b8;
  white-space: nowrap;
  line-height: 1.3;
}

.crm-topbar-icon-btn {
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #64748b !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transform: none !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

.crm-topbar-icon-btn:hover,
.crm-topbar-icon-btn:focus {
  background: #f8fafc !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
  transform: none !important;
  text-decoration: none !important;
}

.crm-topbar-icon-btn .bi {
  font-size: 16px;
  line-height: 1;
}

.crm-topbar-signout {
  color: #64748b !important;
}

/* Search */
.crm-topbar-search {
  display: flex;
  align-items: center;
  gap: 0;
  width: min(240px, 32vw);
  max-width: 240px;
  min-width: 160px;
  flex-shrink: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 10px;
  height: 34px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  z-index: 1040;
}

.crm-topbar-search:focus-within {
  border-color: #b8d4f5;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
  background: #fff;
}

.crm-topbar-search-icon {
  font-size: 14px;
  color: #94a3b8;
  flex-shrink: 0;
  cursor: pointer;
  line-height: 1;
}

.crm-topbar-search-box,
.crm-topbar-search .searchBox {
  min-width: 0 !important;
  width: auto !important;
  flex: 1;
}

.crm-shell .crm-topbar-search .searchBox .RadComboBox,
.crm-shell .crm-topbar .crm-topbar-search .RadComboBox {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  border: none !important;
  background: transparent !important;
}

.crm-topbar-search .RadComboBox .rcbInputCell,
.crm-topbar-search .RadComboBox .rcbInputCell input,
.crm-topbar-search .RadComboBox .rcbInput,
.crm-topbar-search .crm-topbar-search-input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 0 0 6px !important;
  font-size: 13px !important;
  color: #334155 !important;
}

.crm-topbar-search .RadComboBox .rcbInput::placeholder {
  color: #94a3b8 !important;
}

.crm-topbar-search .RadComboBox .rcbInput.rcbEmptyMessage,
.crm-topbar-search .RadComboBox .rcbEmptyMessage {
  color: #94a3b8 !important;
  font-weight: 400 !important;
  font-style: normal !important;
}

.crm-topbar-search .RadComboBox .rcbArrowCell,
.crm-topbar-search .RadComboBox .rcbArrowCell a {
  display: none !important;
}

/* Global search dropdown ? wide panel, long labels */
.crm-topbar-search-dd.RadComboBoxDropDown,
.RadComboBoxDropDown.crm-topbar-search-dd {
  min-width: 440px !important;
  max-width: min(560px, calc(100vw - 24px)) !important;
  width: min(560px, calc(100vw - 24px)) !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
  overflow: hidden;
}

.crm-topbar-search-dd .rcbScroll,
.crm-topbar-search-dd .rcbList {
  max-height: 360px !important;
}

.crm-topbar-search-dd .rcbItem {
  padding: 0.375rem 0.75rem !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  line-height: 1.5 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  align-items: center !important;
  transition: none !important;
  transform: none !important;
  margin: 0 !important;
  border: none !important;
  box-sizing: border-box !important;
}

.crm-topbar-search-dd .rcbItem span,
.crm-topbar-search-dd .rcbItem div {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.5 !important;
  transform: none !important;
}

.crm-topbar-search-dd .rcbHovered,
.crm-topbar-search-dd .rcbItem:hover {
  background: #f1f5f9 !important;
  color: #1e293b !important;
  padding: 0.375rem 0.75rem !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  transform: none !important;
}

.crm-topbar-search-dd .rcbSelected {
  background: #e8f0fb !important;
  color: #1a6fd4 !important;
}

@media (max-width: 991px) {
  .crm-shell .crm-topbar {
    left: 0 !important;
  }

  .crm-topbar-search {
    width: min(260px, 42vw);
    max-width: 260px;
    min-width: 160px;
  }
}

@media (max-width: 576px) {
  .crm-shell .content {
    padding: 16px !important;
  }

  .crm-topbar-search {
    width: min(200px, 48vw);
    max-width: 200px;
    min-width: 140px;
  }

  .crm-topbar-search-dd.RadComboBoxDropDown,
  .RadComboBoxDropDown.crm-topbar-search-dd {
    min-width: calc(100vw - 24px) !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }
}

/* Fixed scroll-to-top (pcenter.Master) */
.crm-scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1040;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #f1f5f9;
  border-radius: 50%;
  background: #ffffff;
  color: #1a6fd4;
  box-shadow:
    0 2px 10px rgba(15, 23, 42, 0.08),
    0 6px 20px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.92);
  transition:
    opacity 0.28s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.28s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.crm-scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.crm-scroll-top-btn:hover,
.crm-scroll-top-btn:focus {
  opacity: 1;
  background: #ffffff;
  border-color: #e2e8f0;
  color: #1559b0;
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.08),
    0 12px 28px rgba(15, 23, 42, 0.12);
  transform: translateY(-2px) scale(1.04);
  outline: none;
}

.crm-scroll-top-btn:focus-visible {
  opacity: 1;
  box-shadow:
    0 0 0 3px rgba(26, 111, 212, 0.22),
    0 4px 12px rgba(15, 23, 42, 0.08),
    0 12px 28px rgba(15, 23, 42, 0.12);
}

.crm-scroll-top-btn .bi {
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
  transition: transform 0.2s ease;
}

.crm-scroll-top-btn:hover .bi,
.crm-scroll-top-btn:focus .bi {
  transform: translateY(-1px);
}

@media (max-width: 576px) {
  .crm-scroll-top-btn {
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }

  .crm-scroll-top-btn .bi {
    font-size: 18px;
  }
}

/* ?? Time Tracker (ps) ? scoped CRM alignment only; never apply bare .crm-page to ps.aspx scheduler ?? */
.crm-ps-body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: #f1f5f9;
  color: #1a1d23;
}

.crm-ps-page {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #1a1d23;
}

.crm-ps-page .month-nav .btn,
.crm-ps-page .month-header .btn,
.crm-ps-page .no-print .btn,
.crm-ps-page .calendar-header > .d-flex .btn,
.crm-ps-page .tasks-sidebar-header .btn,
.crm-ps-page .tasks-sidebar-footer .btn,
.crm-ps-page .modal-footer .btn {
  font-size: 14px;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  line-height: 1.4;
  border-radius: 8px;
}

.crm-ps-page .form-select,
.crm-ps-page .form-control {
  font-size: 14px;
  border-radius: 8px;
  border-color: #e2e8f0;
}

.crm-ps-page .month-header,
.crm-ps-page .calendar-month {
  border: 1px solid #eef2f6;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.crm-ps-page .month-title {
  color: #1a1d23;
  font-size: 22px;
  font-weight: 600;
}

.crm-ps-page .list-view-container {
  background: #f1f5f9;
}

.crm-ps-page .list-view-container > .container {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-ps-page h1 {
  color: #1a1d23;
  font-size: 28px;
  font-weight: 600;
}

.crm-ps-page h2 {
  color: #334155;
}

.crm-ps-page .info-item {
  background: #f8fafc;
  border-left-color: #94a3b8;
}

.crm-ps-page .info-item strong {
  color: #8a9ab0;
}

.crm-ps-page .info-item span {
  color: #1a1d23;
}

.crm-ps-page thead {
  background: #f8fafc;
}

.crm-ps-page th {
  color: #8a9ab0;
  font-size: 12px;
}

.crm-ps-page .list-view-container table th {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: #f8fafc;
  background-clip: padding-box;
  box-shadow:
    0 -2px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
}

.crm-ps-page .list-view-container table {
  overflow: visible;
}

.crm-ps-page .ps-list-tabs {
  border-bottom-color: #e2e8f0;
}

.crm-ps-page .ps-list-tabs .nav-link.active {
  color: #1a6fd4;
  border-bottom-color: #1a6fd4;
}

.crm-ps-page.crm-ps-ai-page {
  font-size: 14px;
}

.crm-ps-page .btn-regen {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 8px;
  border-color: #e2e8f0;
}

.crm-ps-page .tasks-sidebar,
.crm-ps-page .calendar-view {
  border-radius: 12px;
  border: 1px solid #eef2f6;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.crm-ps-page .tasks-sidebar-header,
.crm-ps-page .calendar-header {
  background: #f8fafc;
  border-bottom-color: #eef2f6;
}

.crm-ps-page .week-grid {
  border: 1px solid #eef2f6;
  border-radius: 12px;
}

.crm-ps-page .week-header {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  color: #1a1d23;
}

.crm-ps-page .day-header,
.crm-ps-page .day-cell,
.crm-ps-page .employee-row-header {
  border-color: #f1f5f9;
}

.crm-ps-page .day-header {
  background: #f8fafc;
  color: #8a9ab0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.crm-ps-page .day-header.today {
  background: #f8fafc;
  color: #1a6fd4;
}

/* KPI stat tiles ? week/month hour summaries */
.crm-ps-page .stats-container {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
}

.crm-ps-page .stat-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  min-width: 88px;
  text-align: center;
}

.crm-ps-page .stat-badge .stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a9ab0;
  margin-bottom: 3px;
}

.crm-ps-page .stat-badge .stat-value {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  color: #1a1d23;
}

.crm-ps-page .stat-billable .stat-value { color: #1a9e5f; }
.crm-ps-page .stat-nonbillable .stat-value { color: #475569; }
.crm-ps-page .stat-timeoff .stat-value { color: #1a6fd4; }
.crm-ps-page .stat-total .stat-value { color: #1a1d23; }

/* Add Non-Billable ? slate outline (distinct from overdue red) */
.crm-ps-page .ps-btn-nonbillable {
  color: #475569;
  border-color: rgba(100, 116, 139, 0.5);
  background: transparent;
}
.crm-ps-page .ps-btn-nonbillable:hover,
.crm-ps-page .ps-btn-nonbillable:focus {
  color: #334155;
  background: #f1f5f9;
  border-color: rgba(100, 116, 139, 0.65);
}

.crm-ps-page .day-cell.today,
.crm-ps-page .calendar-day.today {
  background: #fff;
  box-shadow: none;
}

.crm-ps-page .calendar-day.today .day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  background: #1a6fd4;
  color: #fff;
}

/* User initials badge ? same role colors as pcenter top bar */
.crm-ps-page .user-avatar {
  background: #f1f3f5;
  color: #64748b;
  font-weight: 700;
  font-size: 12px;
}

.crm-ps-page .user-avatar.ps-user-avatar--admin {
  background: #e8f0fb;
  color: #1a6fd4;
}

.crm-ps-page .user-avatar.ps-user-avatar--manager {
  background: #fef3dc;
  color: #c47d0a;
}

.crm-ps-page .user-avatar.ps-user-avatar--employee {
  background: #f1f3f5;
  color: #64748b;
}

.crm-ps-page .assigned-resources-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-ps-page .assigned-resource-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 10px 6px 8px;
  background: #fff;
  color: #1a1d23;
  font-size: 13px;
  line-height: 1;
}

.crm-ps-page .assigned-resource-avatar {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

.crm-ps-page .ps-approval-log {
  margin-top: 1.25rem;
}

.crm-ps-page .ps-approval-log .card {
  border: 1px solid #eef2f6;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  overflow: hidden;
}

.crm-ps-page .ps-approval-log .card-header {
  background: #fff;
  border-bottom: 1px solid #eef2f6;
  padding: 0.75rem 1rem;
}

.crm-ps-page .ps-approval-log .card-header h6 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
}

.crm-ps-page .ps-approval-log .crm-approval-table-wrap {
  border: none;
  border-radius: 0;
  overflow: auto;
  max-height: none;
}

.crm-ps-page .ps-approval-log .crm-approval-table {
  width: 100%;
  margin-bottom: 0;
}

.crm-ps-page .ps-approval-log .crm-approval-table thead th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0 !important;
  border-bottom: 1px solid #eef2f6;
  background: #f8fafc !important;
  white-space: nowrap;
  vertical-align: middle;
}

.crm-ps-page .ps-approval-log .crm-approval-table tbody td {
  font-size: 13px;
  vertical-align: top;
  border-bottom-color: #f1f5f9;
  color: #1a1d23;
}

.crm-ps-page .ps-approval-log .crm-approval-table.table-hover tbody tr:hover {
  background: #f8fafc;
}

.crm-ps-page .ps-approval-log h2 {
  font-size: 18px;
  font-weight: 600;
  color: #1a1d23;
  margin: 0 0 12px;
}

/* Summary list ? billable / non-billable type pills (KPI palette) */
.crm-ps-page .type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #1a1d23;
  white-space: nowrap;
}

.crm-ps-page .type-billable {
  border-color: rgba(26, 158, 95, 0.28);
  background: rgba(26, 158, 95, 0.06);
  color: #1a9e5f;
}

.crm-ps-page .type-nonbillable {
  border-color: rgba(100, 116, 139, 0.35);
  background: #f1f5f9;
  color: #475569;
}

.crm-ps-page .type-pto {
  border-color: rgba(26, 111, 212, 0.28);
  background: rgba(26, 111, 212, 0.06);
  color: #1a6fd4;
}

.crm-ps-page .type-holiday {
  border-color: rgba(107, 79, 191, 0.28);
  background: rgba(107, 79, 191, 0.06);
  color: #6b4fbf;
}

/* Day-cell cards ? checkbox left, type pill right on one row */
.crm-ps-page .scheduled-task-top-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.crm-ps-page .scheduled-task-top-row .scheduled-task-type-pill {
  margin-left: auto;
  flex-shrink: 0;
  padding: 2px 6px;
  font-size: 9px;
  letter-spacing: 0.02em;
}

.crm-ps-page .scheduled-task-top-row label {
  font-size: 12px;
  font-weight: 400;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.crm-ps-page .scheduled-task-top-row input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  accent-color: #198754;
}

.crm-ps-page .scheduled-task-project-code {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: inherit;
  margin-bottom: 4px;
}

.crm-ps-page .scheduled-task-title {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
  color: inherit;
  line-height: 1.3;
}

.crm-ps-page .scheduled-task-details {
  font-size: 12px;
  opacity: 0.85;
  line-height: 1.4;
  color: inherit;
}

.crm-ps-page .scheduled-task-hours {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  color: inherit;
}

.crm-ps-page .month-view-container .scheduled-task-top-row .scheduled-task-type-pill {
  padding: 1px 5px;
  font-size: 8px;
}

/* PTO / Holiday cards ? badge + hours on one row */
.crm-ps-page .scheduled-task-pto {
  min-height: auto;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: default;
}

.crm-ps-page .scheduled-task-pto-holiday {
  background: rgba(107, 79, 191, 0.06);
  border: 1px solid rgba(107, 79, 191, 0.28);
  color: #6b4fbf;
}

.crm-ps-page .scheduled-task-pto-timeoff {
  background: rgba(26, 111, 212, 0.06);
  border: 1px dashed rgba(26, 111, 212, 0.28);
  color: #1a6fd4;
}

.crm-ps-page .scheduled-task-pto-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.crm-ps-page .scheduled-task-pto-header .type-badge {
  padding: 2px 7px;
  font-size: 9px;
}

.crm-ps-page .scheduled-task-pto-hours {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
}

.crm-ps-page .month-view-container .scheduled-task-pto {
  padding: 8px 10px;
  margin-bottom: 4px;
}

.crm-ps-page .month-view-container .scheduled-task-pto-header .type-badge {
  padding: 1px 5px;
  font-size: 8px;
}

.crm-ps-page .month-view-container .scheduled-task-pto-hours {
  font-size: 13px;
}

.crm-ps-page .month-view-container .scheduled-task {
  font-size: 14px;
  padding: 12px 14px;
  gap: 5px;
  margin-bottom: 8px;
}

.crm-ps-page .month-view-container .scheduled-task-project-code {
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 4px;
}

.crm-ps-page .month-view-container .scheduled-task-title {
  font-size: 14px;
  margin-bottom: 4px;
  line-height: 1.3;
}

.crm-ps-page .month-view-container .scheduled-task-details {
  font-size: 12px;
  line-height: 1.4;
}

.crm-ps-page .month-view-container .scheduled-task-hours {
  font-size: 13px;
  margin-top: 4px;
  padding-top: 4px;
}

/* Day-cell time entry cards ? lighter borders */
.crm-ps-page .scheduled-task {
  border-width: 1px;
  box-shadow: none;
}

.crm-ps-page .scheduled-task-nonbillable {
  background: #f1f5f9;
  color: #334155;
  border-color: rgba(100, 116, 139, 0.35);
}

/* Available Tasks sidebar ? overdue border/background only; text stays dark */
.crm-ps-page .tasks-sidebar-header,
.crm-ps-page .tasks-sidebar-body {
  color: #1a1d23;
}

.crm-ps-page .tasks-sidebar .task-item,
.crm-ps-page .tasks-sidebar .task-item-project,
.crm-ps-page .tasks-sidebar .task-item-deliverable,
.crm-ps-page .tasks-sidebar .task-item-milestone,
.crm-ps-page .tasks-sidebar .task-item-task-name,
.crm-ps-page .tasks-sidebar .task-item-details,
.crm-ps-page .tasks-sidebar .badge-nonbillable,
.crm-ps-page .tasks-sidebar .empty-state,
.crm-ps-page .tasks-sidebar .empty-state p {
  color: #1a1d23;
}

.crm-ps-page .tasks-sidebar .task-item-project {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 4px;
}

.crm-ps-page .tasks-sidebar .task-item-deliverable {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.crm-ps-page .tasks-sidebar .task-item-milestone,
.crm-ps-page .tasks-sidebar .task-item-task-name {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.85;
}

.crm-ps-page .tasks-sidebar .task-item-task-name {
  margin-top: 0;
  margin-bottom: 4px;
}

.crm-ps-page .task-item.task-item-overdue {
  border: 1px solid rgba(209, 50, 50, 0.35);
  background: rgba(209, 50, 50, 0.06);
  color: #1a1d23;
}

.crm-ps-page .task-item-hover.task-item-overdue:hover {
  background: rgba(209, 50, 50, 0.1);
  border-color: rgba(209, 50, 50, 0.45);
  box-shadow: 0 2px 6px rgba(209, 50, 50, 0.08);
}

.crm-ps-page .month-view-container {
  background: #f1f5f9;
}

.crm-ps-page .calendar-weekdays {
  background: #f8fafc;
  border-bottom-color: #eef2f6;
}

.crm-ps-page .calendar-weekdays .weekday-header {
  color: #8a9ab0;
  border-color: #f1f5f9;
}

.crm-ps-page .calendar-day {
  border-color: #f1f5f9;
}

/* Week nav ? original btn-group layout; CRM font only */
.crm-ps-page .calendar-nav .btn-group .btn {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
}

/* Resources hub pages (Employee Schedule, Project Schedule, Resources Dashboard) */
.crm-ps-page.tracker-page,
.crm-ps-page.calendar-page,
.crm-ps-page.resources-page {
  padding: 8px;
}

.crm-ps-page.tracker-page .form-label,
.crm-ps-page.calendar-page .form-label,
.crm-ps-page.resources-page .form-label {
  color: #8a9ab0;
  font-weight: 600;
  font-size: 12px;
}

.crm-ps-page.tracker-page .btn-primary,
.crm-ps-page.calendar-page .btn-primary,
.crm-ps-page.resources-page .btn-primary {
  background-color: #1a6fd4;
  border-color: #1a6fd4;
}

.crm-ps-page.tracker-page .btn-primary:hover,
.crm-ps-page.tracker-page .btn-primary:focus,
.crm-ps-page.calendar-page .btn-primary:hover,
.crm-ps-page.calendar-page .btn-primary:focus,
.crm-ps-page.resources-page .btn-primary:hover,
.crm-ps-page.resources-page .btn-primary:focus {
  background-color: #1558a8;
  border-color: #1558a8;
}

/* Resources hub tabs ? portal_center.aspx pill style */
.crm-ps-page .ucmenu-wrap.resources-hub-nav {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: flex-start;
}

.crm-ps-page .ucmenu-wrap.resources-hub-nav .ucmenu-tabs-row {
  width: 100% !important;
  max-width: 100%;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  justify-content: flex-start;
}

.crm-ps-page .resources-hub-tabs-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.crm-ps-page .resources-hub-tabs-nav::-webkit-scrollbar {
  height: 4px;
}

.crm-ps-page .resources-hub-tabs-nav::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.crm-ps-page .resources-hub-tab {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 14px !important;
  margin: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.25 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  flex-shrink: 0;
  box-shadow: none !important;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.crm-ps-page .resources-hub-tab:hover {
  color: #334155 !important;
  background: rgba(255, 255, 255, 0.65) !important;
  border-color: rgba(226, 232, 240, 0.9) !important;
}

.crm-ps-page .resources-hub-tab.active {
  color: #1a1d23 !important;
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  font-weight: 600 !important;
}

.crm-ps-page .resources-hub-tab.active:hover {
  color: #1a1d23 !important;
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1) !important;
}

.crm-ps-page.calendar-page .form-select,
.crm-ps-page.calendar-page .form-control,
.crm-ps-page.resources-page .form-select,
.crm-ps-page.resources-page .form-control {
  font-size: 14px;
  border-radius: 8px;
  border-color: #e2e8f0;
}

.crm-ps-page.calendar-page .btn,
.crm-ps-page.resources-page .btn {
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
}

/* Employee Schedule dashboard (dashboard_time_tracker.aspx) */

.crm-ps-page.tracker-page .tracker-filter-card,
.crm-ps-page.tracker-page .report-week-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-ps-page.tracker-page .report-week-header,
.crm-ps-page.tracker-page .day-header-cell {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #1a1d23;
}

.crm-ps-page.tracker-page .day-header-cell {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
}

/* Sticky day/week headers ? time tracker pages */
.crm-ps-page .calendar-header-row {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f8fafc;
  box-shadow:
    0 -2px 0 0 #f8fafc,
    0 2px 0 0 #f1f5f9;
}

.crm-ps-page .calendar-header-row .day-header {
  background: #f8fafc;
}

.crm-ps-page .calendar-header-row .day-header.today {
  background: #f8fafc;
  color: #1a6fd4;
}

.crm-ps-page .calendar-header-row .day-header.weekend,
.crm-ps-page .calendar-header-row .day-header.weekend-column {
  background: #f1f5f9;
}

.crm-ps-page .calendar-weekdays {
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 0 0 #e2e8f0;
}

.crm-ps-page .calendar-weekdays .weekday-header {
  background: #f8fafc;
}

.crm-ps-page.tracker-page .day-header-row {
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  background: #f8fafc;
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
}

.crm-ps-page.tracker-page .report-week-card {
  overflow: visible;
}

.crm-ps-page.tracker-page .employee-view-label,
.crm-ps-page.tracker-page .tt-modal-label {
  color: #8a9ab0;
  font-weight: 600;
  font-size: 12px;
}

.crm-ps-page.tracker-page .employee-title {
  color: #1a1d23;
}

.crm-ps-page.tracker-page .calendar-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.crm-ps-page.tracker-page .calendar-nav .btn-group .btn {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 0.5rem 1.1rem;
  line-height: 1.35;
}

.crm-ps-page.tracker-page .btn-primary {
  background-color: #1a6fd4;
  border-color: #1a6fd4;
}

.crm-ps-page.tracker-page .btn-primary:hover,
.crm-ps-page.tracker-page .btn-primary:focus {
  background-color: #1558a8;
  border-color: #1558a8;
}

.crm-ps-page.tracker-page .nav-pills .nav-link {
  border-color: #e2e8f0;
  color: #4a5568;
  border-radius: 8px;
  font-weight: 500;
}

.crm-ps-page.tracker-page .nav-pills .nav-link.active {
  background-color: #1a6fd4;
  border-color: #1a6fd4;
  color: #fff;
}

.crm-ps-page.tracker-page .nav-pills .nav-link:hover {
  border-color: #1a6fd4;
  background-color: rgba(26, 111, 212, 0.08);
  color: #1a1d23;
}

.crm-ps-page.tracker-page .day-total {
  color: #1a6fd4;
}

.crm-ps-page.tracker-page .employee-week-grid,
.crm-ps-page.tracker-page .day-header-row,
.crm-ps-page.tracker-page .day-cell,
.crm-ps-page.tracker-page .employee-block {
  border-color: #e2e8f0;
}

.crm-ps-page.tracker-page .tt-modal-section {
  border-color: #e2e8f0;
  border-radius: 8px;
}

.crm-ps-page.tracker-page .modal-header {
  border-bottom-color: #e2e8f0;
}

.crm-ps-page.tracker-page .modal-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1d23;
}

/* Project Schedule (resources_dashboard_calendar.aspx) */
.crm-ps-page.calendar-page .gantt-chart {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-ps-page.calendar-page .gantt-body,
.crm-ps-page.calendar-page .gantt-timeline,
.crm-ps-page.calendar-page .gantt-row,
.crm-ps-page.calendar-page .gantt-timeline-header,
.crm-ps-page.calendar-page .gantt-row-header,
.crm-ps-page.calendar-page .gantt-date-header {
  border-color: #e2e8f0;
}

.crm-ps-page.calendar-page .gantt-timeline {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

.crm-ps-page.calendar-page .gantt-timeline-header,
.crm-ps-page.calendar-page .gantt-row-header {
  background: #f8fafc;
  color: #1a1d23;
}

.crm-ps-page.calendar-page .gantt-date-header {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
}

.crm-ps-page.calendar-page .gantt-date-header.today {
  background: rgba(26, 111, 212, 0.08);
  color: #1a6fd4;
}

.crm-ps-page.calendar-page .legend-color.task {
  background: #1a6fd4;
}

.crm-ps-page.calendar-page .gantt-task-bar.task {
  border-color: #1a6fd4;
}

.crm-ps-page.calendar-page .employee-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.crm-ps-page.calendar-page .employee-role-badge {
  font-size: 11px;
  line-height: 1.2;
}

/* Resources workload print (resources_dashboard_calendar_print.aspx) */
.crm-ps-page.crm-resources-print-page {
  min-height: 100vh;
  padding: 1.25rem;
  background: #f1f5f9;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-shell {
  max-width: 1400px;
  margin: 0 auto;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  background: #fff;
  overflow: hidden;
}

.crm-ps-page.crm-resources-print-page .crm-summary-card-hdr {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.crm-ps-page.crm-resources-print-page .crm-summary-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1d23;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-meta {
  font-size: 13px;
  margin-top: 0.35rem;
}

.crm-ps-page.crm-resources-print-page .crm-summary-card-body {
  padding: 1.25rem;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-filters {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-filters-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  margin-bottom: 0.65rem;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-filter-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-filter-badges .crm-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  white-space: normal;
  text-align: left;
  line-height: 1.35;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-filter-key {
  font-weight: 700;
  color: #64748b;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-table-wrap {
  overflow-x: auto;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-table th,
.crm-ps-page.crm-resources-print-page .crm-resources-print-table td {
  padding: 0.45rem 0.6rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee td {
  background: #f8fafc;
  color: #1a1d23;
  border-bottom: 1px solid #e2e8f0;
  border-top: 1px solid #e2e8f0;
  padding: 0.65rem 0.75rem;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee-hdr {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee-hdr .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1d23;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee-hdr .resource-threshold {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
  margin-left: auto;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee-hdr .threshold-indicator {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee-hdr .threshold-hours {
  opacity: 0.85;
  font-weight: 500;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee-hdr .threshold-under {
  background: #e6f7ef;
  color: #1a9e5f;
  border-color: #b8ebd0;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee-hdr .threshold-moderate {
  background: #e8f0fb;
  color: #1a6fd4;
  border-color: #c5daf5;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee-hdr .threshold-near {
  background: #fef3dc;
  color: #c47d0a;
  border-color: #f5dfa8;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee-hdr .threshold-over {
  background: #fdeaea;
  color: #d13232;
  border-color: #f5c2c2;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-employee-hdr .threshold-error {
  background: #f1f3f5;
  color: #6c757d;
  border-color: #e2e8f0;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-subhead th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  border-top: none;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-task td {
  color: #1a1d23;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-task--active td {
  background: #f8fbff;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-task--completed td {
  background: #f6fdf9;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-task--overdue td {
  background: #fff7f7;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-table .crm-chip {
  font-size: 12px;
  padding: 2px 8px;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-table .crm-badge {
  font-size: 12px;
}

.crm-ps-page.crm-resources-print-page .crm-resources-print-spacer td {
  height: 12px;
  padding: 0;
  border: none;
  background: transparent;
}

@media print {
  .crm-ps-page.crm-resources-print-page {
    padding: 0;
    background: #fff !important;
  }

  .crm-ps-page.crm-resources-print-page .no-print {
    display: none !important;
  }

  .crm-ps-page.crm-resources-print-page .crm-resources-print-card {
    border: none;
    box-shadow: none;
    border-radius: 0;
  }

  .crm-ps-page.crm-resources-print-page .crm-resources-print-filters {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .crm-ps-page.crm-resources-print-page .crm-resources-print-employee td {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* Resources Dashboard (dashboard_resources.aspx) */
.crm-ps-page.resources-page .card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-ps-page.resources-page .card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.crm-ps-page.resources-page .card-title,
.crm-ps-page.resources-page h5.card-title,
.crm-ps-page.resources-page h6 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
}

.crm-ps-page.resources-page .table thead th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.crm-ps-page.resources-page .table tbody td {
  border-bottom-color: #f1f5f9;
  color: #1a1d23;
}

.crm-ps-page.resources-page .table-hover tbody tr:hover {
  background: #f8fafc;
}

.crm-ps-page.resources-page .progress-bar.bg-primary {
  background-color: #1a6fd4 !important;
}

.crm-ps-page.resources-page h2 {
  color: #1a1d23;
  font-weight: 600;
}

/* Reporting hub (reporting.aspx, admin_time_logs.aspx, admin_photo_log.aspx) */
.crm-page.crm-reporting-page,
.crm-page.crm-time-logs-page,
.crm-page.crm-photo-bank-page {
  margin-bottom: 1.5rem;
}

.crm-page.crm-reporting-page .card,
.crm-page.crm-time-logs-page .card,
.crm-page.crm-photo-bank-page .card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-page.crm-reporting-page .card-header,
.crm-page.crm-time-logs-page .card-header,
.crm-page.crm-photo-bank-page .card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.875rem 1.25rem;
}

.crm-page.crm-reporting-page .card-title,
.crm-page.crm-time-logs-page .card-title,
.crm-page.crm-photo-bank-page .card-title,
.crm-page.crm-time-logs-page .card-header h5,
.crm-page.crm-photo-bank-page .card-header h5 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
  margin: 0;
}

.crm-page.crm-reporting-page .form-label,
.crm-page.crm-time-logs-page .form-label,
.crm-page.crm-photo-bank-page .form-label {
  color: #8a9ab0;
  font-weight: 600;
  font-size: 12px;
}

.crm-page.crm-reporting-page .btn-primary,
.crm-page.crm-time-logs-page .btn-primary,
.crm-page.crm-photo-bank-page .btn-primary {
  background-color: #1a6fd4;
  border-color: #1a6fd4;
}

.crm-page.crm-reporting-page .btn-primary:hover,
.crm-page.crm-reporting-page .btn-primary:focus,
.crm-page.crm-time-logs-page .btn-primary:hover,
.crm-page.crm-time-logs-page .btn-primary:focus,
.crm-page.crm-photo-bank-page .btn-primary:hover,
.crm-page.crm-photo-bank-page .btn-primary:focus {
  background-color: #1558a8;
  border-color: #1558a8;
}

.crm-page.crm-reporting-page .btn-success,
.crm-page.crm-time-logs-page .btn-success,
.crm-page.crm-photo-bank-page .btn-success {
  background-color: #1a9e5f;
  border-color: #1a9e5f;
}

.crm-page.crm-time-logs-page .table thead th,
.crm-page.crm-time-logs-page .crm-sticky-table-wrap .table thead th,
.crm-page.crm-time-logs-page .crm-sticky-table-wrap .crm-time-log-grid th.crm-time-log-th {
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  padding: 0.4rem 0.6rem;
  vertical-align: middle;
  background-color: #f8fafc !important;
  background-clip: padding-box;
  border-top: none !important;
  border-bottom: 1px solid #e2e8f0;
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
}

.crm-page.crm-time-logs-page .table thead th a,
.crm-page.crm-time-logs-page .table thead th .crm-sort-link,
.crm-page.crm-time-logs-page .crm-sticky-table-wrap .crm-time-log-grid th a,
.crm-page.crm-time-logs-page .crm-sticky-table-wrap .crm-time-log-grid th .crm-sort-link {
  color: #8a9ab0 !important;
  font-size: inherit;
  font-weight: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.crm-page.crm-time-logs-page .table thead th a:hover,
.crm-page.crm-time-logs-page .table thead th .crm-sort-link:hover,
.crm-page.crm-time-logs-page .crm-sticky-table-wrap .crm-time-log-grid th a:hover,
.crm-page.crm-time-logs-page .crm-sticky-table-wrap .crm-time-log-grid th .crm-sort-link:hover {
  color: #1a6fd4 !important;
}

.crm-page.crm-time-logs-page .table thead th .sort-icon {
  opacity: 0.45;
  font-size: 11px;
  text-transform: none;
}

.crm-page.crm-time-logs-page .table thead th .sort-icon.active {
  opacity: 1;
  color: #1a6fd4;
}

.crm-page.crm-time-logs-page .card:has(.crm-sticky-table-wrap) {
  overflow: visible;
}

.crm-page.crm-time-logs-page .table-responsive.crm-sticky-table-wrap {
  overflow: visible;
  max-width: 100%;
}

.crm-page.crm-time-logs-page .crm-sticky-table-wrap .table {
  border-collapse: separate;
  border-spacing: 0;
}

.crm-page.crm-time-logs-page .table tbody td {
  font-size: 12px;
  color: #1a1d23;
  padding: 0.4rem 0.6rem;
  vertical-align: middle;
  border-bottom-color: #f1f5f9;
}

.crm-page.crm-time-logs-page .table.table-hover tbody tr:hover td {
  background: #e8f0fb;
}

.crm-page.crm-time-logs-page .tab-content > .tab-pane > .d-flex .text-muted {
  font-size: 12px;
}

.crm-page.crm-reporting-page .btn-outline-primary,
.crm-page.crm-photo-bank-page .btn-outline-primary {
  color: #1a6fd4;
  border-color: #1a6fd4;
}

.crm-page.crm-reporting-page .btn-outline-primary:hover,
.crm-page.crm-photo-bank-page .btn-outline-primary:hover,
.crm-page.crm-photo-bank-page .btn-outline-primary.active {
  background-color: #1a6fd4;
  border-color: #1a6fd4;
  color: #fff;
}

.crm-page.crm-reporting-page .report-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px;
}

.crm-page.crm-reporting-page .report-icon.bg-primary {
  background-color: #1a6fd4 !important;
}

.crm-page.crm-reporting-page .report-icon.bg-info {
  background-color: #0ea5e9 !important;
}

/* Hub landing tiles ? reporting.aspx + admin_accounting.aspx (shared fonts & card polish) */
.crm-page.crm-reporting-page > .row > .col-12 > .card > .card-header .card-title,
.crm-page.crm-accounting-page > .row > .col-12 > .card > .card-header .card-title {
  font-size: 17px;
  font-weight: 600;
  color: #1a1d23;
}

.crm-page.crm-reporting-page > .row > .col-12 > .card > .card-body > .text-muted,
.crm-page.crm-accounting-page > .row > .col-12 > .card > .card-body > .text-muted {
  font-size: 15px;
  line-height: 1.5;
  color: #8a9ab0 !important;
}

.crm-page.crm-reporting-page .report-card,
.crm-page.crm-accounting-page .report-card {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px;
}

.crm-page.crm-reporting-page .report-card:hover,
.crm-page.crm-accounting-page .report-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.crm-page.crm-reporting-page .report-card > .card-body,
.crm-page.crm-accounting-page .report-card > .card-body {
  padding: 1.5rem;
}

.crm-page.crm-reporting-page .report-card .card-title,
.crm-page.crm-accounting-page .report-card .card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1d23;
}

.crm-page.crm-reporting-page .report-card .card-text,
.crm-page.crm-accounting-page .report-card .card-text {
  font-size: 14px;
  line-height: 1.55;
  color: #8a9ab0 !important;
}

.crm-page.crm-reporting-page .report-card .card-text.small,
.crm-page.crm-accounting-page .report-card .card-text.small {
  font-size: 14px;
}

.crm-page.crm-reporting-page .report-card .btn,
.crm-page.crm-accounting-page .report-card .btn {
  font-size: 14px;
}

.crm-page.crm-accounting-page .report-card .small a {
  font-size: 13px;
}

.crm-page.crm-reporting-page .report-icon,
.crm-page.crm-accounting-page .report-icon {
  transition: transform 0.3s ease;
}

.crm-page.crm-reporting-page .report-card:hover .report-icon,
.crm-page.crm-accounting-page .report-card:hover .report-icon {
  transform: scale(1.1) rotate(5deg);
}

.crm-page.crm-reporting-page .report-card .btn,
.crm-page.crm-accounting-page .report-card .btn {
  transition: transform 0.3s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.crm-page.crm-reporting-page .report-card .btn:hover,
.crm-page.crm-accounting-page .report-card .btn:hover {
  transform: translateX(5px);
}

.crm-page.crm-reporting-page .btn-info,
.crm-page.crm-accounting-page .btn-info {
  background-color: #0ea5e9;
  border-color: #0ea5e9;
}

.crm-page.crm-reporting-page .btn-info:hover,
.crm-page.crm-reporting-page .btn-info:focus,
.crm-page.crm-accounting-page .btn-info:hover,
.crm-page.crm-accounting-page .btn-info:focus {
  background-color: #0284c7;
  border-color: #0284c7;
}

.crm-page.crm-time-logs-page .summary-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-page.crm-time-logs-page .text-primary {
  color: #1a6fd4 !important;
}

.crm-page.crm-time-logs-page .nav-tabs {
  border-bottom-color: #e2e8f0;
}

.crm-page.crm-time-logs-page .nav-tabs .nav-link {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  border-color: transparent;
}

.crm-page.crm-time-logs-page .nav-tabs .nav-link:hover {
  color: #1a1d23;
  border-color: #e2e8f0 #e2e8f0 #e2e8f0;
}

.crm-page.crm-time-logs-page .nav-tabs .nav-link.active {
  color: #1a6fd4;
  font-weight: 600;
  border-color: #e2e8f0 #e2e8f0 #fff;
}

.crm-page.crm-photo-bank-page .table thead th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.crm-page.crm-photo-bank-page .table thead th {
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  background-clip: padding-box;
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
}

.crm-page.crm-time-logs-page .table tbody td,
.crm-page.crm-photo-bank-page .table tbody td {
  border-bottom-color: #f1f5f9;
  color: #1a1d23;
}

.crm-page.crm-time-logs-page .table-hover tbody tr:hover,
.crm-page.crm-photo-bank-page .table-hover tbody tr:hover {
  background: #f8fafc;
}

.crm-page.crm-time-logs-page .pagination-wrapper a {
  color: #1a6fd4;
  border-color: #e2e8f0;
}

.crm-page.crm-time-logs-page .pagination-wrapper a:hover {
  border-color: #1a6fd4;
  color: #1a6fd4;
  background: #f8fafc;
}

.crm-page.crm-time-logs-page .pagination-wrapper span {
  background: #1a6fd4;
  border-color: #1a6fd4;
}

.crm-page.crm-photo-bank-page .tagify {
  border-color: #e2e8f0;
  border-radius: 8px;
}

.crm-page.crm-photo-bank-page .tagify__tag {
  background-color: #1a6fd4;
}

.crm-page.crm-photo-bank-page .photo-bank-modal-nav:hover:not(:disabled) {
  background: rgba(26, 111, 212, 0.85);
}

.crm-page.crm-photo-bank-page .card-header-gray {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

/* Accounting hub (admin_accounting.aspx, invoices, unbilled, PO consumption) */
.crm-page.crm-accounting-page,
.crm-page.crm-invoices-page,
.crm-page.crm-unbilled-page,
.crm-page.crm-project-health-page {
  margin-bottom: 1.5rem;
}

.crm-page.crm-accounting-page .card,
.crm-page.crm-invoices-page .card,
.crm-page.crm-unbilled-page .card,
.crm-page.crm-project-health-page .card,
.portal-center-page .uc-unbilled-card.card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-page.crm-accounting-page .card-header,
.crm-page.crm-invoices-page .card-header,
.crm-page.crm-unbilled-page .card-header,
.crm-page.crm-project-health-page .card-header,
.portal-center-page .uc-unbilled-card .card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.875rem 1.25rem;
}

.crm-page.crm-accounting-page .card-title,
.crm-page.crm-invoices-page .card-title,
.crm-page.crm-unbilled-page .card-title,
.crm-page.crm-project-health-page .card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
  margin: 0;
}

.crm-page.crm-accounting-page .form-label,
.crm-page.crm-invoices-page .form-label,
.crm-page.crm-unbilled-page .form-label,
.crm-page.crm-project-health-page .form-label {
  color: #8a9ab0;
  font-weight: 600;
  font-size: 12px;
}

.crm-page.crm-accounting-page .btn-primary,
.crm-page.crm-invoices-page .btn-primary,
.crm-page.crm-unbilled-page .btn-primary,
.crm-page.crm-project-health-page .btn-primary {
  background-color: #1a6fd4;
  border-color: #1a6fd4;
}

.crm-page.crm-accounting-page .btn-primary:hover,
.crm-page.crm-invoices-page .btn-primary:hover,
.crm-page.crm-unbilled-page .btn-primary:hover,
.crm-page.crm-project-health-page .btn-primary:hover,
.crm-page.crm-accounting-page .btn-primary:focus,
.crm-page.crm-invoices-page .btn-primary:focus,
.crm-page.crm-unbilled-page .btn-primary:focus,
.crm-page.crm-project-health-page .btn-primary:focus {
  background-color: #1558a8;
  border-color: #1558a8;
}

.crm-page.crm-accounting-page .btn-success,
.crm-page.crm-invoices-page .btn-success,
.crm-page.crm-unbilled-page .btn-success {
  background-color: #1a9e5f;
  border-color: #1a9e5f;
}

.crm-page.crm-accounting-page .report-card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px;
}

.crm-page.crm-accounting-page .report-icon.bg-primary {
  background-color: #1a6fd4 !important;
}

.crm-page.crm-accounting-page .report-icon.bg-success {
  background-color: #1a9e5f !important;
}

.crm-page.crm-accounting-page .report-icon.bg-info {
  background-color: #0ea5e9 !important;
}

.crm-page.crm-invoices-page .invoice-menu-wrap .ucmenu-tabs-row,
.crm-page.crm-invoices-page .invoice-menu-wrap .ucmenu-tabs-row-crm {
  margin-bottom: 0;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* CRM table links ? default across CRM pages */
.crm-table-link {
  font-size: 14px;
  font-weight: 600;
  color: #1a6fd4 !important;
  text-decoration: none;
}

.crm-table-link:hover,
.crm-table-link:focus {
  color: #1558a8 !important;
  text-decoration: underline;
}

/* Accounting / billing grids ? shared dense layout (unbilled, invoices, logs) */
.crm-page.crm-invoices-page .table,
.crm-page.crm-unbilled-page .table,
.crm-page.crm-unbilled-page #rptid,
.crm-page.crm-invoice-log-page .table {
  font-size: 13px;
}

.crm-page.crm-invoices-page .table thead th,
.crm-page.crm-unbilled-page .table thead th,
.crm-page.crm-unbilled-page #rptid thead th,
.crm-page.crm-invoice-log-page .table thead th {
  font-size: 12px !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.35rem 0.4rem;
  line-height: 1.25;
  vertical-align: middle;
}

.crm-page.crm-unbilled-page #rptid thead th span.text-muted.small {
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
}

.crm-page.crm-invoices-page .table tbody td,
.crm-page.crm-unbilled-page .table tbody td,
.crm-page.crm-unbilled-page #rptid tbody td,
.crm-page.crm-invoice-log-page .table tbody td {
  border-bottom-color: #f1f5f9;
  color: #1a1d23;
  font-size: 13px;
  padding: 0.35rem 0.45rem;
  line-height: 1.35;
  vertical-align: middle;
}

.crm-page.crm-invoices-page .table tfoot th,
.crm-page.crm-invoices-page .table tfoot td,
.crm-page.crm-unbilled-page .table tfoot th,
.crm-page.crm-unbilled-page .table tfoot td,
.crm-page.crm-unbilled-page #rptid tfoot th,
.crm-page.crm-invoice-log-page .table tfoot th,
.crm-page.crm-invoice-log-page .table tfoot td {
  font-size: 13px;
  padding: 0.35rem 0.45rem;
  line-height: 1.35;
}

.crm-page.crm-invoices-page .table-hover tbody tr:hover,
.crm-page.crm-unbilled-page .table-hover tbody tr:hover,
.crm-page.crm-invoice-log-page .table-hover tbody tr:hover {
  background: #f8fafc;
}

.crm-page.crm-invoices-page .table tbody a:not(.crm-action-btn):not(.btn),
.crm-page.crm-unbilled-page .table tbody a:not(.crm-action-btn):not(.btn),
.crm-page.crm-unbilled-page #rptid tbody a:not(.crm-action-btn):not(.btn),
.crm-page.crm-invoice-log-page .table tbody a:not(.crm-action-btn):not(.btn),
.crm-page.crm-invoices-page .crm-table-link,
.crm-page.crm-unbilled-page .crm-table-link,
.crm-page.crm-invoice-log-page .crm-table-link {
  font-size: 13px;
  font-weight: 500;
  color: #1a6fd4 !important;
  text-decoration: none;
}

.crm-page.crm-invoices-page .table tbody a:not(.crm-action-btn):not(.btn):hover,
.crm-page.crm-invoices-page .table tbody a:not(.crm-action-btn):not(.btn):focus,
.crm-page.crm-unbilled-page .table tbody a:not(.crm-action-btn):not(.btn):hover,
.crm-page.crm-unbilled-page .table tbody a:not(.crm-action-btn):not(.btn):focus,
.crm-page.crm-unbilled-page #rptid tbody a:not(.crm-action-btn):not(.btn):hover,
.crm-page.crm-unbilled-page #rptid tbody a:not(.crm-action-btn):not(.btn):focus,
.crm-page.crm-invoice-log-page .table tbody a:not(.crm-action-btn):not(.btn):hover,
.crm-page.crm-invoice-log-page .table tbody a:not(.crm-action-btn):not(.btn):focus,
.crm-page.crm-invoices-page .crm-table-link:hover,
.crm-page.crm-invoices-page .crm-table-link:focus,
.crm-page.crm-unbilled-page .crm-table-link:hover,
.crm-page.crm-unbilled-page .crm-table-link:focus,
.crm-page.crm-invoice-log-page .crm-table-link:hover,
.crm-page.crm-invoice-log-page .crm-table-link:focus {
  color: #1558a8 !important;
  text-decoration: underline;
}

.crm-page.crm-invoices-page .table thead th a,
.crm-page.crm-unbilled-page .table thead th a,
.crm-page.crm-unbilled-page #rptid thead th a,
.crm-page.crm-invoice-log-page .table thead th a {
  color: #8a9ab0 !important;
  font-weight: 600;
  text-decoration: none !important;
}

.crm-page.crm-invoices-page .table thead th a:hover,
.crm-page.crm-unbilled-page .table thead th a:hover,
.crm-page.crm-unbilled-page #rptid thead th a:hover,
.crm-page.crm-invoice-log-page .table thead th a:hover {
  color: #1a6fd4 !important;
}

/* Sticky thead ? accounting / billing log pages only (opt-in wrapper or dedicated page class) */
.crm-shell .crm-topbar {
  --crm-topbar-height: 52px;
}

.main-panel {
  --crm-accounting-thead-sticky-top: var(--crm-topbar-height, 52px);
}

.table-responsive.crm-sticky-table-wrap,
.crm-sticky-table-wrap,
.crm-page.crm-invoices-page .crm-sticky-table-wrap,
.crm-page.crm-unbilled-page .crm-sticky-table-wrap,
.crm-page.crm-invoice-log-page .crm-sticky-table-wrap,
.crm-page.crm-prop-page .crm-sticky-table-wrap,
.crm-page.crm-prop-billing-page .prop-billing-period-table-wrap,
.crm-page.crm-approval-page .crm-sticky-table-wrap,
.crm-page.crm-approval-page .crm-approval-table-wrap.crm-sticky-table-wrap,
.crm-page.crm-approval-page .table-responsive.crm-sticky-table-wrap,
.crm-page.crm-time-logs-page .crm-sticky-table-wrap,
.crm-page.crm-time-logs-page .table-responsive.crm-sticky-table-wrap,
.crm-page.crm-prop-page .prop-rollout-details-table-wrap,
.crm-page.crm-tasksheet-page .crm-tasksheet-table-wrap,
.crm-page.crm-tasksheet-page .crm-sticky-table-wrap,
.crm-page.crm-commission-report-page .crm-sticky-table-wrap,
.crm-page.crm-service-hub-page .crm-sticky-table-wrap,
.crm-page.crm-admin-page.crm-system-templates-page .crm-sticky-table-wrap {
  overflow: visible;
  max-width: 100%;
}

.crm-sticky-table-wrap .table,
.crm-sticky-table-wrap table,
.crm-page.crm-invoices-page .crm-sticky-table-wrap .table,
.crm-page.crm-unbilled-page .crm-sticky-table-wrap .table,
.crm-page.crm-invoice-log-page .crm-sticky-table-wrap .table,
.crm-page.crm-prop-page .crm-sticky-table-wrap .table,
.crm-page.crm-prop-billing-page .prop-billing-period-table {
  border-collapse: separate;
  border-spacing: 0;
}

.crm-sticky-table-wrap .table thead th,
.crm-sticky-table-wrap thead th,
.crm-page.crm-invoices-page .crm-sticky-table-wrap .table thead th,
.crm-page.crm-unbilled-page .crm-sticky-table-wrap .table thead th,
.crm-page.crm-unbilled-page .crm-sticky-table-wrap #rptid thead th,
.crm-page.crm-invoice-log-page .crm-sticky-table-wrap .table thead th,
.crm-page.crm-invoice-log-page .crm-sticky-table-wrap .inv-log-table thead th,
.crm-page.crm-prop-page .crm-sticky-table-wrap .table thead th,
.crm-page.crm-prop-page .prop-rollout-details-table-wrap #tblMilestoneDetails thead th,
.crm-page.crm-prop-billing-page .prop-billing-period-table thead th,
.crm-page.crm-approval-page .crm-sticky-table-wrap .table thead th,
.crm-page.crm-approval-page .crm-sticky-table-wrap .crm-approval-table thead th,
.crm-page.crm-time-logs-page .crm-sticky-table-wrap .table thead th,
.crm-page.crm-time-logs-page .crm-sticky-table-wrap thead th,
.crm-page.crm-time-logs-page .crm-sticky-table-wrap .crm-time-log-grid th.crm-time-log-th,
.crm-page.crm-tasksheet-page .crm-sticky-table-wrap .crm-tasksheet-table thead th,
.crm-page.crm-commission-report-page .crm-sticky-table-wrap .crm-commission-table thead th,
.crm-page.crm-commission-report-page .crm-sticky-table-wrap .crm-commission-table th.crm-commission-th,
.crm-page.crm-service-hub-page .crm-sticky-table-wrap .crm-service-hub-grid thead th,
.crm-page.crm-service-hub-page .crm-sticky-table-wrap .crm-service-hub-grid th.crm-service-hub-th,
.crm-page.crm-admin-page.crm-system-templates-page .crm-sticky-table-wrap #rptid thead th,
.crm-page.crm-admin-page.crm-system-templates-page .crm-sticky-table-wrap .crm-system-templates-table thead th {
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  border-top: none !important;
  background-color: #f8fafc !important;
  background-clip: padding-box;
  /* upward fill closes sub-pixel gap under topbar; bottom line replaces border-bottom */
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
}

/* Billing / unbilled log iframes ? full-page tables, no top nav offset */
.crm-page.crm-invoice-log-page {
  --crm-accounting-thead-sticky-top: 0;
}

.crm-page.crm-invoice-log-page .table-responsive,
.crm-page.crm-invoice-log-page .table-responsive-lg {
  overflow: visible;
  max-width: 100%;
}

.crm-page.crm-invoice-log-page .table-responsive .table,
.crm-page.crm-invoice-log-page .table-responsive .inv-log-table,
.crm-page.crm-invoice-log-page .table-responsive-lg .table {
  border-collapse: separate;
  border-spacing: 0;
}

.crm-page.crm-invoice-log-page .table-responsive .table thead th,
.crm-page.crm-invoice-log-page .table-responsive .inv-log-table thead th,
.crm-page.crm-invoice-log-page .table-responsive-lg .table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  border-top: none !important;
  background-color: #f8fafc !important;
  background-clip: padding-box;
  box-shadow:
    0 -2px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
}

.crm-page.crm-invoices-page .inv-days-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
}

.crm-page.crm-invoices-page .table .small,
.crm-page.crm-unbilled-page .table .small,
.crm-page.crm-invoice-log-page .table .small {
  font-size: 12px;
  line-height: 1.35;
}

.crm-page.crm-invoices-page .inv-days-cell--ok {
  color: #077a4a;
}

.crm-page.crm-invoices-page .inv-days-cell--warn {
  color: #4a5568;
}

.crm-page.crm-invoices-page .inv-days-cell--late {
  color: #a86200;
}

.crm-page.crm-invoices-page .crm-chip,
.crm-page.crm-unbilled-page .crm-chip,
.crm-page.crm-invoice-log-page .crm-chip {
  font-size: 12px;
}

/* Billed / unbilled log iframe ? consistent money & hours column alignment */
.crm-invoice-log-page .inv-log-table {
  width: 100%;
  margin-bottom: 1.25rem;
}

.crm-invoice-log-page .inv-log-money-col,
.crm-invoice-log-page th.inv-log-money-col,
.crm-invoice-log-page td.inv-log-money-col,
.crm-invoice-log-page .inv-log-sum-row .inv-log-money-col,
.crm-invoice-log-page .tm-sum-amt,
.crm-invoice-log-page .flat-fee-sum-grand,
.crm-invoice-log-page .flat-fee-amt,
.crm-invoice-log-page .prop-subc-log-section .subc-col-num,
.crm-invoice-log-page .prop-zoho-exp-log-section .zexp-col-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.crm-invoice-log-page .inv-log-col-num,
.crm-invoice-log-page th.inv-log-col-num,
.crm-invoice-log-page td.inv-log-col-num,
.crm-invoice-log-page .tm-sum-hrs {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.crm-invoice-log-page th.inv-log-money-col,
.crm-invoice-log-page td.inv-log-money-col {
  min-width: 6.5rem;
}

.crm-invoice-log-page th.inv-log-col-num,
.crm-invoice-log-page td.inv-log-col-num {
  min-width: 3.25rem;
}

.crm-invoice-log-page .inv-log-sum-row th {
  background: #f1f5f9 !important;
  border-top: 2px solid #e2e8f0;
  font-weight: 600;
}

.crm-invoice-log-page .inv-log-sum-row th.text-end {
  color: #1a1d23;
}

.crm-invoice-log-page .crm-summary-card-body > h5 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.crm-invoice-log-page .crm-summary-card-body > h5:first-child {
  margin-top: 0;
}

.crm-invoice-log-page .prop-subc-log-section,
.crm-invoice-log-page .prop-zoho-exp-log-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
}

.crm-invoice-log-page .inv-log-table {
  margin-bottom: 0.5rem;
}

/* PO Consumption ? standard readable table (not dense invoice/unbilled grid) */
.crm-page.crm-project-health-page #phTable {
  font-size: 14px;
}

.crm-page.crm-project-health-page #phTable thead th {
  font-size: 12px !important;
  padding: 0.5rem 0.6rem;
  line-height: 1.35;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  vertical-align: middle;
}

.crm-page.crm-project-health-page #phTable tbody td {
  font-size: 14px;
  padding: 0.5rem 0.65rem;
  line-height: 1.4;
  border-bottom-color: #f1f5f9;
  color: #1a1d23;
  vertical-align: middle;
}

.crm-page.crm-project-health-page #phTable tbody tr:hover {
  background: #f8fafc;
}

.crm-page.crm-project-health-page #phTable tbody a:not(.crm-action-btn):not(.btn),
.crm-page.crm-project-health-page .crm-table-link {
  font-size: 14px;
  font-weight: 600;
  color: #1a6fd4 !important;
  text-decoration: none;
}

.crm-page.crm-project-health-page #phTable tbody a:not(.crm-action-btn):not(.btn):hover,
.crm-page.crm-project-health-page #phTable tbody a:not(.crm-action-btn):not(.btn):focus,
.crm-page.crm-project-health-page .crm-table-link:hover,
.crm-page.crm-project-health-page .crm-table-link:focus {
  color: #1558a8 !important;
  text-decoration: underline;
}

.crm-page.crm-project-health-page #phTable thead th a {
  color: #8a9ab0 !important;
  font-weight: 600;
  text-decoration: none !important;
}

.crm-page.crm-project-health-page #phTable thead th a:hover {
  color: #1a6fd4 !important;
}

/* Filter-only cards ? use .card-body (not .card-header) to avoid master .card-header border !important */
.crm-page .crm-filter-card {
  padding: 0 !important;
}

.crm-page .crm-filter-card > .card-body,
.crm-page .crm-filter-card > .card-header {
  padding: 0.875rem 1.25rem;
  border: none !important;
  border-bottom: none !important;
  background: transparent;
}

.crm-page .crm-filter-card > .card-body .crm-list-toolbar.crm-approval-filters,
.crm-page .crm-filter-card > .card-header .crm-list-toolbar.crm-approval-filters {
  margin-bottom: 0;
}

.crm-summary-stats.uc-unbilled-kpi-strip > .uc-unbilled-kpi-tile,
.crm-summary-stats.ph-totals-strip > .ph-tot-tile {
  flex: 1 1 0;
  min-width: 0;
}

.crm-summary-stats.uc-unbilled-kpi-strip .crm-stat-card,
.crm-summary-stats.ph-totals-strip .crm-stat-card {
  height: 100%;
}

.crm-unbilled-kpi-tab.clickable-card {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.crm-unbilled-kpi-tab.clickable-card:hover,
.crm-unbilled-kpi-tab.clickable-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
  outline: none;
}

.uc-unbilled-kpi-tile.crm-unbilled-kpi-active .crm-unbilled-kpi-tab {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.portal-center-page .uc-unbilled-flat-pending-tile,
.portal-center-page .uc-unbilled-subc-kpi-tile,
.portal-center-page .uc-unbilled-exp-kpi-tile {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
}

/* Resources Assigned (schedular.aspx) */
.crm-page.crm-schedular-page .crm-schedular-kpi-row > .crm-stat-card {
  flex: 1 1 9.5rem;
  min-width: 0;
}

.crm-page.crm-schedular-page .crm-schedular-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crm-page.crm-schedular-page .crm-schedular-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.crm-page.crm-schedular-page .crm-schedular-filters .crm-approval-filter {
  flex: 0 1 auto;
  min-width: 0;
}

.crm-page.crm-schedular-page .crm-schedular-filters .crm-approval-filter .form-select {
  min-width: 160px;
}

.crm-page.crm-schedular-page .crm-schedular-filter--project,
.crm-page.crm-schedular-page .crm-schedular-filter--deliverable {
  flex: 1 1 320px;
  min-width: 280px;
  max-width: 480px;
}

.crm-page.crm-schedular-page .crm-schedular-filter--project .select2-container,
.crm-page.crm-schedular-page .crm-schedular-filter--deliverable .select2-container {
  width: 100% !important;
  min-width: 280px;
  max-width: 100%;
}

.crm-page.crm-schedular-page .crm-schedular-filter--date-range .crm-schedular-date-range {
  flex-wrap: nowrap;
  min-width: 300px;
}

.crm-page.crm-schedular-page .crm-schedular-filter--date-range .form-control {
  min-width: 0;
  font-size: 14px;
}

.crm-page.crm-schedular-page .crm-schedular-toggle {
  display: flex;
  align-items: center;
  min-height: 38px;
}

.crm-page.crm-schedular-page .crm-schedular-toggle-cb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  user-select: none;
  line-height: 1.2;
}

.crm-page.crm-schedular-page .crm-schedular-toggle-cb label {
  margin: 0;
  cursor: pointer;
  color: inherit;
  font-weight: inherit;
}

.crm-page.crm-schedular-page .crm-schedular-toggle-cb input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 24px;
  margin: 0;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.crm-page.crm-schedular-page .crm-schedular-toggle-cb input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.28);
  transition: transform 0.2s ease;
}

.crm-page.crm-schedular-page .crm-schedular-toggle-cb input[type="checkbox"]:checked::before {
  transform: translateX(18px);
}

.crm-page.crm-schedular-page .crm-schedular-toggle-cb input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(26, 111, 212, 0.4);
  outline-offset: 2px;
}

.crm-page.crm-schedular-page .crm-schedular-toggle--overdue .crm-schedular-toggle-cb input[type="checkbox"]:checked {
  background: #d13232;
}

.crm-page.crm-schedular-page .crm-schedular-toggle--overbudget .crm-schedular-toggle-cb input[type="checkbox"]:checked {
  background: #c47d0a;
}

.crm-page.crm-schedular-page .crm-schedular-toggle--overdue .crm-schedular-toggle-cb:has(input:checked),
.crm-page.crm-schedular-page .crm-schedular-toggle--overbudget .crm-schedular-toggle-cb:has(input:checked) {
  color: #1e293b;
}

.crm-page.crm-schedular-page .table thead th {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.crm-page.crm-schedular-page .table tbody td {
  font-size: 13px;
  vertical-align: middle;
}

/* My Tasks (tasksheet.aspx) */
.crm-tasksheet-page {
  margin-bottom: 1.5rem;
}

.crm-tasksheet-toolbar {
  align-items: flex-end;
}

.crm-tasksheet-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.crm-tasksheet-filter--action {
  justify-content: flex-end;
}

.crm-tasksheet-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #8a9ab0;
  margin: 0;
  white-space: nowrap;
}

.crm-tasksheet-date-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
}

.crm-tasksheet-table-wrap {
  overflow: visible;
  max-width: 100%;
  margin-bottom: 1rem;
}

.crm-tasksheet-page .crm-summary-card-body {
  overflow: visible;
}

.crm-tasksheet-page .crm-tasksheet-table {
  margin-bottom: 0;
  font-size: 14px;
  border-collapse: separate;
  border-spacing: 0;
}

.crm-tasksheet-page .crm-tasksheet-table thead th {
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  border-top: none !important;
  border-bottom: 1px solid #e2e8f0;
  background-color: #f8fafc !important;
  background-clip: padding-box;
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
  white-space: nowrap;
  vertical-align: middle;
}

.crm-tasksheet-page .crm-tasksheet-table tbody td {
  border-bottom-color: #f1f5f9;
  color: #1a1d23;
  vertical-align: middle;
}

.crm-tasksheet-page .crm-tasksheet-table tbody tr:hover {
  background: #f8fafc;
}

.crm-tasksheet-sort-link {
  color: #64748b !important;
  font-weight: 600;
  text-decoration: none !important;
}

.crm-tasksheet-sort-link:hover {
  color: #1a6fd4 !important;
}

.crm-tasksheet-deliverable-link {
  color: #1a6fd4 !important;
  text-decoration: none;
  font-weight: 500;
}

.crm-tasksheet-deliverable-link:hover {
  text-decoration: underline !important;
}

.crm-tasksheet-progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
}

.crm-tasksheet-progress-pct {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.crm-tasksheet-progress-cell {
  min-width: 140px;
}

.crm-tasksheet-notes {
  min-width: 160px;
  font-size: 13px;
}

.crm-tasksheet-complete-cell {
  min-width: 180px;
}

.crm-tasksheet-page .crm-form-actions {
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

/* Approval Center pages */
.crm-page.crm-approval-page {
  margin-bottom: 1.5rem;
}

.crm-approval-page .approval-menu-wrap.ucmenu-wrap {
  margin-bottom: 0.5rem;
}

.crm-approval-page .approval-menu-wrap .ucmenu-tabs-row,
.crm-approval-page .approval-menu-wrap .ucmenu-tabs-row-crm {
  margin-bottom: 0;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Proposal folder tabs (ucmenu type 2) ? flat tabs, no chrome pill */
.ucmenu-wrap.ucmenu-proposal-wrap .ucmenu-tabs-row,
.ucmenu-wrap.ucmenu-proposal-wrap .ucmenu-tabs-row-crm,
.ucmenu-wrap.ucmenu-proposal-wrap .ucmenu-subtabs-row,
.ucmenu-wrap.ucmenu-proposal-wrap .ucmenu-subtabs-row-crm {
  margin-bottom: 0;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.ucmenu-wrap.ucmenu-proposal-wrap .crm-tabs-strip {
  margin-bottom: 0;
}

/* Schedule of Fees / Roles ? flat tabs, no chrome pill (admin_schedules, admin_roles, add/edit) */
.crm-admin-page .schedules-roles-menu-wrap .ucmenu-tabs-row,
.crm-admin-page .schedules-roles-menu-wrap .ucmenu-tabs-row-crm {
  margin-bottom: 0;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.crm-admin-page .schedules-roles-menu-wrap .crm-tabs-strip,
.crm-approval-page .approval-menu-wrap .crm-tabs-strip,
.crm-page.crm-invoices-page .invoice-menu-wrap .crm-tabs-strip {
  margin-bottom: 0;
}

.crm-approval-page .approval-menu-wrap + .row,
.crm-approval-page .approval-menu-wrap + [id$="alertCardsRow"] {
  margin-top: 0 !important;
}

.crm-approval-page .crm-table-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.crm-approval-page .crm-action-approve:hover,
.crm-approval-page .crm-action-approve:focus {
  background: #e6f7ef !important;
  border-color: #a8e0c0 !important;
  color: #1a9e5f !important;
}

.crm-approval-page .crm-approval-table-wrap {
  margin-top: 0;
  overflow: visible;
  max-width: 100%;
}

.crm-approval-page .table-responsive {
  overflow: visible;
  max-width: 100%;
}

.crm-approval-page .card:has(.crm-sticky-table-wrap),
.crm-approval-page .card:has(.table-responsive) {
  overflow: visible;
}

.crm-approval-page .crm-approval-table,
.crm-approval-page .crm-approval-table-wrap table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.crm-page .card-header .crm-list-toolbar.crm-approval-filters {
  margin-bottom: 0;
}

.crm-page .crm-list-toolbar.crm-approval-filters {
  align-items: flex-end;
  margin-bottom: 1rem;
  gap: 10px;
}

.crm-page .crm-approval-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.crm-page .crm-approval-filter label {
  font-size: 12px;
  font-weight: 600;
  color: #8a9ab0;
  margin: 0;
}

.crm-page .crm-approval-filter .form-select,
.crm-page .crm-approval-filter .form-control {
  min-width: 140px;
}

.crm-page .crm-approval-filter input[type="date"].form-control {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
  min-width: 140px;
  width: auto;
}

.crm-page .crm-approval-filter--action {
  flex-direction: row;
  align-items: flex-end;
  gap: 8px;
}

.crm-page .crm-list-toolbar .crm-btn,
.crm-page .crm-list-toolbar input.crm-btn,
.crm-page .crm-list-toolbar button.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.crm-page .crm-list-toolbar .crm-btn-primary,
.crm-page .crm-list-toolbar input.crm-btn-primary {
  background: #1a6fd4;
  border-color: #1a6fd4;
  color: #fff;
}

.crm-page .crm-list-toolbar .crm-btn-primary:hover,
.crm-page .crm-list-toolbar .crm-btn-primary:focus,
.crm-page .crm-list-toolbar input.crm-btn-primary:hover,
.crm-page .crm-list-toolbar input.crm-btn-primary:focus {
  background: #1558a8;
  border-color: #1558a8;
  color: #fff;
}

/* Invoice page toolbars ? Sync / Audit / Export (outside grid) */
.crm-page.crm-invoices-page .crm-invoices-toolbar .crm-btn,
.crm-page.crm-invoices-page .crm-invoices-toolbar a.crm-btn,
.crm-page.crm-invoices-page .crm-invoices-toolbar input.crm-btn,
.crm-page.crm-invoices-page .crm-invoices-toolbar button.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.crm-page.crm-invoices-page .crm-invoices-toolbar a.crm-btn:hover,
.crm-page.crm-invoices-page .crm-invoices-toolbar a.crm-btn:focus {
  text-decoration: none;
}

.crm-page.crm-invoices-page .crm-invoices-toolbar .crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-page.crm-invoices-page .crm-invoices-toolbar .crm-btn-primary:hover,
.crm-page.crm-invoices-page .crm-invoices-toolbar .crm-btn-primary:focus {
  background: #1558a8 !important;
  border-color: #1558a8 !important;
  color: #fff !important;
}

.crm-page.crm-invoices-page .crm-invoices-toolbar .crm-btn-secondary:hover,
.crm-page.crm-invoices-page .crm-invoices-toolbar .crm-btn-secondary:focus {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1a1d23;
}

.crm-page.crm-invoices-page .crm-invoices-toolbar .crm-btn-success {
  background: #1a9e5f !important;
  border-color: #1a9e5f !important;
  color: #fff !important;
}

.crm-page.crm-invoices-page .crm-invoices-toolbar .crm-btn-success:hover,
.crm-page.crm-invoices-page .crm-invoices-toolbar .crm-btn-success:focus {
  background: #158a52 !important;
  border-color: #158a52 !important;
  color: #fff !important;
}

.crm-page.crm-invoices-page .crm-invoices-toolbar .crm-btn .bi {
  font-size: 14px;
  line-height: 1;
}

.crm-page .crm-list-toolbar .crm-btn-secondary:hover,
.crm-page .crm-list-toolbar .crm-btn-secondary:focus,
.crm-page .crm-list-toolbar input.crm-btn-secondary:hover,
.crm-page .crm-list-toolbar input.crm-btn-secondary:focus {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.crm-approval-page .card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  background: #fff;
  overflow: visible;
}

.crm-approval-page .card.border-danger,
.crm-approval-page .card.border-warning {
  border-radius: 12px;
}

.crm-approval-page .card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.875rem 1.25rem;
}

.crm-approval-page .card-header.bg-danger,
.crm-approval-page .card-header.bg-warning {
  border-bottom-color: inherit;
}

.crm-approval-page .card-header .card-title,
.crm-approval-page .card-header h4,
.crm-approval-page .card-header h5 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
  margin: 0;
}

.crm-approval-page .card-body {
  padding: 1rem 1.25rem 1.125rem;
}

.crm-approval-page .card-body.p-0 {
  padding: 0 !important;
}

.crm-approval-page label,
.crm-approval-page .form-label {
  font-size: 12px;
  font-weight: 600;
  color: #8a9ab0;
  margin-bottom: 4px;
}

.crm-approval-page .form-control,
.crm-approval-page .form-select {
  font-size: 14px;
  border-radius: 8px;
  border-color: #e2e8f0;
}

.crm-approval-page .btn {
  font-size: 14px;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  line-height: 1.4;
  border-radius: 8px;
}

.crm-approval-page .card-header .btn,
.crm-approval-page .card-header input[type="submit"].btn,
.crm-approval-page .crm-approval-filter--action .crm-btn,
.crm-approval-page .crm-approval-filter--action input.crm-btn {
  width: auto !important;
  flex: 0 0 auto;
}

.crm-approval-page .btn-sm {
  font-size: 13px;
  padding: 0.35rem 0.7rem;
}

.crm-approval-page .btn-primary {
  background-color: #1a6fd4;
  border-color: #1a6fd4;
}

.crm-approval-page .btn-primary:hover,
.crm-approval-page .btn-primary:focus {
  background-color: #1558a8;
  border-color: #1558a8;
}

.crm-approval-page .btn-success {
  background-color: #1a9e5f;
  border-color: #1a9e5f;
}

.crm-approval-page table thead th,
.crm-approval-page .table thead th,
.crm-approval-page .crm-approval-table thead th,
.crm-approval-page .crm-approval-table thead th a {
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0 !important;
  border-top: none !important;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc !important;
  background-clip: padding-box;
  vertical-align: middle;
  white-space: nowrap;
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
}

.crm-approval-page .crm-approval-table thead th a {
  text-decoration: none !important;
}

.crm-approval-page .crm-approval-table thead th a:hover {
  color: #1a6fd4 !important;
}

/* Approval detail sections (log + entries): sticky thead at top:52px hid the first data row under the header when scrolled into view. */
.crm-approval-page .crm-ps-list-section .crm-approval-table thead th,
.crm-approval-page .crm-ps-list-section .crm-ps-list-table thead th {
  position: static;
  top: auto;
  z-index: auto;
  box-shadow: none;
}

.crm-approval-page table tbody td,
.crm-approval-page .table tbody td {
  border-bottom-color: #f1f5f9;
  color: #1a1d23;
  font-size: 14px;
  vertical-align: middle;
}

.crm-approval-page .table-hover tbody tr:hover {
  background: #f8fafc;
}

/* ps_list-style tables on timesheet approval detail */
.crm-approval-page .crm-ps-list-section {
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  overflow: hidden;
}

.crm-approval-page .crm-ps-list-section-title {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 18px;
  font-weight: 600;
  color: #1a1d23;
  border-bottom: 2px solid #eef2f6;
}

.crm-approval-page .crm-ps-list-section-title .bi {
  color: #8a9ab0;
}

.crm-approval-page .crm-ps-list-section-body {
  padding: 0;
}

.crm-approval-page .crm-ps-list-table-wrap {
  overflow: auto;
}

.crm-approval-page .crm-ps-list-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.crm-approval-page .crm-ps-list-table thead th {
  padding: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0 !important;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc !important;
  white-space: nowrap;
  vertical-align: middle;
}

.crm-approval-page .crm-ps-list-table tbody td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #1a1d23;
  font-size: 14px;
  vertical-align: top;
}

.crm-approval-page .crm-ps-list-table tbody tr:last-child td {
  border-bottom: none;
}

.crm-approval-page .crm-ps-list-table.table-hover tbody tr:hover {
  background: #f8fafc;
}

.crm-approval-page .crm-ps-list-date {
  font-weight: 600;
  white-space: nowrap;
}

.crm-approval-page .crm-ps-list-hours-col {
  text-align: right;
}

.crm-approval-page .crm-ps-list-hours {
  text-align: right;
  font-weight: 600;
  color: #1a9e5f;
  font-size: 15px;
  white-space: nowrap;
}

.crm-approval-page .crm-ps-list-notes {
  max-width: 320px;
  word-wrap: break-word;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.crm-approval-page .type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #1a1d23;
  white-space: nowrap;
}

.crm-approval-page .type-billable {
  border-color: rgba(26, 158, 95, 0.28);
  background: rgba(26, 158, 95, 0.06);
  color: #1a9e5f;
}

.crm-approval-page .type-nonbillable {
  border-color: rgba(100, 116, 139, 0.35);
  background: #f1f5f9;
  color: #475569;
}

.crm-approval-page .type-pto {
  border-color: rgba(26, 111, 212, 0.28);
  background: rgba(26, 111, 212, 0.06);
  color: #1a6fd4;
}

.crm-approval-page .type-holiday {
  border-color: rgba(107, 79, 191, 0.28);
  background: rgba(107, 79, 191, 0.06);
  color: #6b4fbf;
}

.crm-approval-page .crm-ts-deliverables-section .crm-ps-list-table {
  border-radius: 0;
}

.crm-approval-page .table th a,
.crm-approval-page thead .text-dark {
  color: #64748b !important;
  font-weight: 600;
  text-decoration: none !important;
}

.crm-approval-page .table th a:hover {
  color: #1a6fd4 !important;
}

.crm-approval-page a.text-primary {
  color: #1a6fd4 !important;
  font-weight: 500;
}

.crm-approval-page .form-control-plaintext {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #1a1d23;
  font-size: 14px;
  min-height: 38px;
}

.crm-approval-page .alert {
  border-radius: 8px;
  font-size: 14px;
}

.crm-approval-detail-body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: transparent;
  padding: 15px;
  color: #1a1d23;
}

.crm-approval-detail-page .card {
  margin-bottom: 0;
}

.crm-approval-detail-page .crm-status-display {
  padding-top: 2px;
}

.crm-approval-detail-page .crm-status-display .crm-chip {
  vertical-align: middle;
}

/* PTO / approval request detail ? label/value grid */
.crm-approval-page .crm-approval-request-card .card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.875rem 1.25rem;
}

.crm-approval-page .crm-approval-request-card .card-header h5 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
  margin: 0;
}

.crm-approval-page .crm-approval-detail-hero {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eef2f6;
}

/* PTO request detail ? KPI hero (matches timesheet approval header) */
.crm-pto-detail-page .crm-approval-request-card .card-body {
  overflow: hidden;
}

.crm-pto-detail-page .crm-pto-detail-hero {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid #eef2f6;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.crm-pto-detail-page .crm-pto-detail-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.crm-pto-detail-page .crm-pto-detail-identity {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  min-width: 0;
  flex: 1 1 12rem;
}

.crm-pto-detail-page .crm-pto-detail-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e8f1fb;
  color: #1a6fd4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.crm-pto-detail-page .crm-pto-detail-titles {
  min-width: 0;
}

.crm-pto-detail-page .crm-pto-detail-hero-actions {
  flex-shrink: 0;
  margin-left: auto;
  align-self: flex-start;
}

.crm-pto-detail-page .crm-pto-detail-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.crm-pto-detail-page .crm-pto-detail-body .crm-ts-approval-notice {
  margin-bottom: 1rem;
}

.crm-pto-detail-page .crm-approval-detail-id {
  margin-top: 0;
}

@media (max-width: 576px) {
  .crm-pto-detail-page .crm-pto-detail-hero-top {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-pto-detail-page .crm-pto-detail-hero-actions {
    margin-left: 0;
    align-self: flex-end;
  }
}

.crm-approval-page .crm-approval-detail-id-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.crm-approval-page .crm-status-display {
  padding-top: 0;
}

.crm-approval-page .crm-approval-detail-employee {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1d23;
  line-height: 1.25;
}

.crm-approval-page .crm-approval-detail-employee-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.crm-approval-page .crm-approval-employee-kpi-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.crm-approval-page .crm-approval-employee-kpi-link:hover,
.crm-approval-page .crm-approval-employee-kpi-link:focus {
  color: #1a6fd4;
  background: #f1f5f9;
  text-decoration: none;
}

.crm-approval-page .crm-approval-employee-kpi-link .bi {
  font-size: 1rem;
  line-height: 1;
}

.crm-approval-page .crm-approval-detail-id {
  font-size: 0.8125rem;
  color: #8a9ab0;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.crm-approval-page .crm-approval-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .crm-approval-page .crm-approval-detail-grid {
    grid-template-columns: 1fr;
  }
}

.crm-approval-page .crm-approval-detail-field--full {
  grid-column: 1 / -1;
}

.crm-approval-page .crm-approval-detail-lbl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a9ab0;
  margin-bottom: 0.25rem;
}

.crm-approval-page .crm-approval-detail-val {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a1d23;
  line-height: 1.45;
  word-break: break-word;
}

.crm-approval-page .crm-approval-detail-val--muted {
  color: #64748b;
  font-weight: 400;
}

.crm-approval-page .crm-approval-detail-section {
  margin-bottom: 1.25rem;
}

.crm-approval-page .crm-approval-detail-section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a9ab0;
  margin-bottom: 0.5rem;
}

.crm-approval-page .crm-approval-detail-dates-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.crm-approval-page .crm-approval-detail-dates-table thead th {
  position: static;
  box-shadow: none;
  background: #f8fafc !important;
}

.crm-approval-page .crm-approval-detail-dates-table tbody td {
  font-size: 0.875rem;
  vertical-align: middle;
}

.crm-approval-page .crm-approval-detail-dates-table .crm-ps-list-hours {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #1a9e5f;
}

.crm-approval-page .crm-approval-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.875rem 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2f6;
}

@media (max-width: 576px) {
  .crm-approval-page .crm-approval-detail-meta {
    grid-template-columns: 1fr;
  }
}

.crm-approval-page .crm-approval-detail-meta .crm-approval-detail-val {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  font-weight: 500;
}

/* PTO AI badge help (? modal) */
.crm-pto-ai-help-btn {
  color: #8a9ab0;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
}

.crm-pto-ai-help-btn:hover,
.crm-pto-ai-help-btn:focus {
  color: #1a6fd4;
  text-decoration: none;
}

.crm-pto-ai-help-btn .bi {
  font-size: 1rem;
}

.crm-pto-ai-help-table thead th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  border-bottom-color: #eef2f6;
  white-space: nowrap;
}

.crm-pto-ai-help-table tbody td {
  font-size: 0.875rem;
  vertical-align: top;
  color: #1a1d23;
}

.crm-pto-ai-help-table .crm-badge {
  white-space: nowrap;
}

.crm-pto-ai-help-notes {
  padding: 0.875rem 1rem;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  border-radius: 8px;
}

.crm-pto-ai-help-notes-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a9ab0;
  margin: 0;
}

.crm-pto-ai-help-notes-list {
  padding-left: 1.15rem;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.5;
}

.crm-pto-ai-help-notes-list li + li {
  margin-top: 0.35rem;
}

.crm-pto-ai-help-footer {
  background: #fff;
  border-top: 1px solid #eef2f6;
  justify-content: flex-start;
  line-height: 1.45;
}

/* Administration hub + child pages */
.crm-page.crm-admin-page {
  margin-bottom: 1.5rem;
}

.crm-page.crm-admin-page .card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-page.crm-admin-page .card-header,
.crm-page.crm-admin-page .card-header.bg-primary,
.crm-page.crm-admin-page .card-header.bg-warning {
  background: #fff !important;
  color: #1a1d23 !important;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.875rem 1.25rem;
}

.crm-page.crm-admin-page .card-title,
.crm-page.crm-admin-page .card-header h5 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
  margin: 0;
}

.crm-page.crm-admin-page .card-body > a,
.crm-page.crm-admin-page .card-body a.text-primary {
  color: #1a6fd4 !important;
  font-weight: 500;
  text-decoration: none;
}

.crm-page.crm-admin-page .card-body > a:hover,
.crm-page.crm-admin-page .card-body a.text-primary:hover {
  color: #1558a8 !important;
  text-decoration: underline;
}

.crm-page.crm-admin-page .form-label {
  color: #8a9ab0;
  font-weight: 600;
  font-size: 12px;
}

.crm-page.crm-admin-page .table thead th {
  font-size: 12px !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.35rem 0.45rem;
  vertical-align: middle;
}

.crm-page.crm-admin-page .table tbody td {
  font-size: 13px;
  padding: 0.35rem 0.45rem;
  border-bottom-color: #f1f5f9;
  color: #1a1d23;
  vertical-align: middle;
}

.crm-page.crm-admin-page .table-hover tbody tr:hover {
  background: #f8fafc;
}

.crm-page.crm-admin-page .btn-primary {
  background-color: #1a6fd4;
  border-color: #1a6fd4;
}

.crm-page.crm-admin-page .btn-primary:hover,
.crm-page.crm-admin-page .btn-primary:focus {
  background-color: #1558a8;
  border-color: #1558a8;
}

.crm-page.crm-admin-page .btn-success {
  background-color: #1a9e5f;
  border-color: #1a9e5f;
}

.crm-page.crm-admin-page .crm-form-actions .crm-btn,
.crm-page.crm-admin-page .crm-add-form-actions .crm-btn,
.crm-page.crm-admin-page .crm-list-toolbar .crm-btn,
.crm-page.crm-admin-page input.crm-btn,
.crm-page.crm-admin-page button.crm-btn,
.crm-page.crm-admin-page a.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  box-shadow: none !important;
}

.crm-page.crm-admin-page .crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-page.crm-admin-page .crm-btn-primary:hover,
.crm-page.crm-admin-page .crm-btn-primary:focus {
  background: #1558a8 !important;
  border-color: #1558a8 !important;
  color: #fff !important;
}

.crm-page.crm-admin-page .crm-btn-outline-primary {
  background: #fff !important;
  border-color: #1a6fd4 !important;
  color: #1a6fd4 !important;
}

.crm-page.crm-admin-page .crm-btn-outline-primary:hover,
.crm-page.crm-admin-page .crm-btn-outline-primary:focus {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-page.crm-admin-page .crm-btn-secondary:hover,
.crm-page.crm-admin-page .crm-btn-secondary:focus {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1a1d23;
}

.crm-page.crm-admin-page .table .crm-badge,
.crm-page.crm-admin-page .table .crm-chip {
  font-size: 12px;
  padding: 2px 8px;
  white-space: nowrap;
  vertical-align: middle;
}

.crm-page.crm-admin-page .dataTables_info .crm-badge {
  font-size: 12px;
  padding: 3px 9px;
}

.crm-page.crm-admin-page.crm-pto-log-page .crm-pto-log-table-wrap {
  overflow-x: auto;
}

.crm-page.crm-admin-page.crm-pto-log-page .crm-pto-log-table thead th,
.crm-page.crm-admin-page.crm-pto-log-page .crm-pto-log-table thead th a {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a9ab0 !important;
  border-top: 1px solid #e2e8f0;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
  vertical-align: middle;
  white-space: nowrap;
  padding: 0.65rem 0.75rem;
}

.crm-page.crm-admin-page.crm-pto-log-page .crm-pto-log-table thead th a {
  text-decoration: none !important;
}

.crm-page.crm-admin-page.crm-pto-log-page .crm-pto-log-table thead th a:hover,
.crm-page.crm-admin-page.crm-pto-log-page .crm-pto-log-table thead th a:focus {
  color: #1a6fd4 !important;
}

.crm-page.crm-admin-page.crm-pto-log-page .crm-pto-log-table tbody td {
  font-size: 14px;
  color: #1a1d23;
  border-bottom-color: #f1f5f9;
  padding: 0.55rem 0.75rem;
  vertical-align: middle;
}

.crm-page.crm-admin-page.crm-pto-log-page .crm-pto-log-table.table-hover tbody tr:hover td {
  background: #e8f0fb;
}

.crm-page.crm-admin-page.crm-pto-log-page .crm-pto-log-table .crm-table-link {
  font-weight: 500;
}

.crm-page.crm-admin-page.crm-pto-log-page .crm-pto-log-table .crm-badge {
  font-size: 12px;
  padding: 3px 9px;
}

.crm-page.crm-users-page .crm-users-filters {
  align-items: flex-end;
}

.crm-page.crm-users-page .crm-users-search-filter .crm-filter-input {
  min-width: 260px;
  width: 100%;
}

.crm-page.crm-users-page .crm-users-filters .crm-list-count {
  margin-left: auto;
}

.crm-page.crm-admin-page.crm-system-templates-page .crm-system-templates-table-wrap,
.crm-page.crm-admin-page.crm-system-templates-page .crm-sticky-table-wrap {
  overflow: visible;
  max-width: 100%;
}

.crm-page.crm-admin-page.crm-system-templates-page .card:has(.crm-sticky-table-wrap) {
  overflow: visible;
}

.crm-page.crm-admin-page.crm-system-templates-page .crm-system-templates-table-wrap .dataTables_wrapper,
.crm-page.crm-admin-page.crm-system-templates-page .crm-sticky-table-wrap .dataTables_wrapper {
  overflow: visible !important;
  width: 100% !important;
  max-width: 100%;
}

.crm-page.crm-admin-page.crm-system-templates-page .crm-system-templates-table-wrap .dataTables_scroll,
.crm-page.crm-admin-page.crm-system-templates-page .crm-system-templates-table-wrap .dataTables_scrollHead,
.crm-page.crm-admin-page.crm-system-templates-page .crm-system-templates-table-wrap .dataTables_scrollBody {
  overflow: visible !important;
  width: 100% !important;
  max-width: 100%;
}

.crm-page.crm-admin-page.crm-system-templates-page .crm-system-templates-table-wrap .dataTables_scrollHeadInner,
.crm-page.crm-admin-page.crm-system-templates-page .crm-system-templates-table-wrap .dataTables_scrollHeadInner table,
.crm-page.crm-admin-page.crm-system-templates-page .crm-system-templates-table-wrap table.dataTable {
  width: 100% !important;
  margin: 0 !important;
}

.crm-page.crm-admin-page.crm-system-templates-page #rptid,
.crm-page.crm-admin-page.crm-system-templates-page .crm-system-templates-table {
  table-layout: fixed;
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
}

.crm-page.crm-admin-page.crm-system-templates-page #rptid .crm-cell-wrap {
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}

.crm-page.crm-admin-page.crm-system-templates-page #rptid thead th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  padding: 0.4rem 0.6rem;
  vertical-align: bottom;
  border-top: none !important;
  border-bottom: none;
  background-color: #f8fafc !important;
  background-clip: padding-box;
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
  white-space: normal;
  line-height: 1.25;
  hyphens: auto;
}

/* Prefer description width; let long headers wrap instead of stealing space */
.crm-page.crm-admin-page.crm-system-templates-page #rptid .crm-st-col-name {
  width: 16%;
}

.crm-page.crm-admin-page.crm-system-templates-page #rptid .crm-st-col-id {
  width: 4.5rem;
}

.crm-page.crm-admin-page.crm-system-templates-page #rptid .crm-st-col-pm {
  width: 10%;
}

.crm-page.crm-admin-page.crm-system-templates-page #rptid .crm-st-col-type {
  width: 7%;
}

.crm-page.crm-admin-page.crm-system-templates-page #rptid .crm-st-col-category {
  width: 12%;
}

.crm-page.crm-admin-page.crm-system-templates-page #rptid .crm-st-col-desc {
  width: 36%;
  min-width: 16rem;
}

.crm-page.crm-admin-page.crm-system-templates-page #rptid .crm-st-col-hours {
  width: 6.5rem;
}

.crm-page.crm-admin-page.crm-system-templates-page #rptid .crm-st-col-actions {
  width: 4.5rem;
}

.crm-page.crm-admin-page.crm-system-templates-page #rptid tbody td {
  font-size: 14px;
  border-bottom-color: #f1f5f9;
  vertical-align: middle;
}

.crm-page.crm-admin-page.crm-system-templates-page #rptid.table-hover tbody tr:hover td {
  background: #e8f0fb;
}

.crm-page.crm-admin-page.crm-system-templates-page .crm-dt-toolbar {
  align-items: center;
}

.crm-page.crm-admin-page.crm-system-templates-page .dataTables_filter {
  margin: 0;
}

.crm-page.crm-admin-page.crm-system-templates-page .dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #8a9ab0;
}

.crm-page.crm-admin-page.crm-system-templates-page .dataTables_filter input {
  margin-left: 0 !important;
  width: 240px;
  max-width: 100%;
  min-width: 0;
}

.crm-page.crm-system-template-summary-page .crm-deliverable-header {
  margin-bottom: 0.75rem;
}

.crm-page.crm-system-template-summary-page > .ucmenu-wrap.crm-deliverable-nav {
  margin-bottom: 0.75rem;
}

.crm-page.crm-system-template-summary-page .deliverable-summary-root > #deliverable-info {
  margin-top: 0;
}

.crm-page.crm-system-template-summary-page .crm-summary-card .deliverable-edit-root {
  margin-top: 0;
}

.crm-page.crm-system-template-milestones-page .crm-deliverable-header {
  margin-bottom: 0.75rem;
}

.crm-page.crm-system-template-milestones-page > .ucmenu-wrap.crm-deliverable-nav {
  margin-bottom: 0.75rem;
}

.crm-page.crm-system-template-milestones-page .milestones-toolbar {
  margin-bottom: 1rem;
}

.crm-page.crm-deliverable-photos-add-page .crm-deliverable-header {
  margin-bottom: 0.75rem;
}

.crm-page.crm-deliverable-photos-add-page > .ucmenu-wrap.crm-deliverable-nav {
  margin-bottom: 0.75rem;
}

.crm-page.crm-deliverable-photos-add-page .photo-add-root .form-control,
.crm-page.crm-deliverable-photos-add-page .photo-add-root .form-select,
.crm-page.crm-deliverable-photos-add-page .photo-add-root .tagify {
  max-width: 100%;
}

.crm-deliverable-add-form {
  margin-top: 0.25rem;
}

.crm-deliverable-add-form > .card,
.crm-deliverable-add-form.card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.crm-deliverable-add-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.crm-deliverable-add-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f2fc;
  color: #1a6fd4;
  font-size: 20px;
  flex-shrink: 0;
}

.crm-deliverable-add-header h5 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1d23;
}

.crm-deliverable-add-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}

.crm-deliverable-add-form .card-body {
  padding: 20px 24px;
}

.crm-page.crm-deliverable-page.crm-add-form .crm-deliverable-add-form .crm-form-section {
  margin-top: 1.5rem;
}

.crm-page.crm-deliverable-page.crm-add-form .crm-deliverable-add-form .crm-form-section:first-of-type {
  margin-top: 0;
}

.crm-deliverable-add-upload-hint {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
}

.crm-deliverable-add-form .crm-deliverable-export-card {
  margin-top: 1rem;
}

.crm-deliverable-add-form .crm-deliverable-export-card-hdr {
  background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 100%) !important;
  color: #37474f !important;
  border-bottom: 1px solid #dbeafe;
}

.crm-deliverable-add-form .crm-deliverable-export-card-hdr i {
  color: #1a6fd4 !important;
}

.crm-deliverable-add-form .crm-deliverable-export-card-hdr h5 {
  color: #37474f !important;
  font-size: 15px;
  font-weight: 600;
}

.crm-deliverable-add-form .form-label {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 0.35rem;
}

.crm-deliverable-add-form .form-control,
.crm-deliverable-add-form .form-select,
.crm-deliverable-add-form .tagify {
  border-color: #dbe3ee;
  border-radius: 8px;
}

.crm-deliverable-add-form .form-control:focus,
.crm-deliverable-add-form .form-select:focus,
.crm-deliverable-add-form .tagify:focus-within {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 0.2rem rgba(26, 111, 212, 0.12);
}

.crm-deliverable-add-form .tagify__tag {
  background: #1a6fd4;
}

.crm-deliverable-add-form .tagify__dropdown__item--active {
  background: #1a6fd4;
}

.crm-page.crm-deliverable-files-add-page .crm-deliverable-header,
.crm-page.crm-deliverable-photos-add-page .crm-deliverable-header {
  margin-bottom: 0.75rem;
}

.crm-page.crm-deliverable-files-add-page > .ucmenu-wrap.crm-deliverable-nav,
.crm-page.crm-deliverable-photos-add-page > .ucmenu-wrap.crm-deliverable-nav {
  margin-bottom: 0.75rem;
}

.crm-page.crm-deliverable-photos-add-page .photo-add-root .card-body:first-child,
.crm-page.crm-deliverable-photos-add-page .photo-add-root > .card > .card-body {
  padding-top: 20px;
}

.crm-deliverable-add-form .crm-form-actions,
.crm-page.crm-approval-page .crm-employee-form-actions {
  justify-content: flex-start;
}

.crm-page.crm-deliverable-page .crm-deliverable-add-form .crm-form-actions.milestones-sticky-actions {
  margin-top: 0;
  border-top: 1px solid #e2e8f0;
}

.crm-page.crm-deliverable-page .crm-deliverable-add-form .milestones-sticky-actions .crm-btn {
  /* keep crm-btn look inside sticky bar */
  min-height: 31px;
}

/* Timesheet approval ? unified summary shell (above entry grid) */
.crm-approval-page .crm-ts-approval-shell {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.crm-approval-page .crm-ts-approval-hero {
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid #eef2f6;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.crm-approval-page .crm-ts-approval-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.crm-approval-page .crm-ts-approval-identity {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  min-width: 0;
  flex: 1 1 18rem;
}

.crm-approval-page .crm-ts-approval-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e8f1fb;
  color: #1a6fd4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.crm-approval-page .crm-ts-approval-employee {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1d23;
  margin: 0;
  line-height: 1.25;
}

.crm-approval-page .crm-ts-approval-period {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.125rem;
}

.crm-approval-page .crm-ts-approval-meta {
  font-size: 0.8125rem;
  color: #8a9ab0;
  margin-top: 0.375rem;
}

.crm-approval-page .crm-ts-approval-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.625rem;
}

.crm-approval-page .crm-ts-approval-meta-row .crm-status-display {
  padding-top: 0;
}

.crm-approval-page .crm-ts-approval-next {
  display: block;
  margin-top: 0.25rem;
}

.crm-approval-page .crm-ts-approval-next strong {
  color: #334155;
  font-weight: 600;
}

.crm-approval-page .crm-ts-approval-hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0.625rem;
  flex-shrink: 0;
}

.crm-approval-page .crm-ts-approval-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.crm-approval-page .crm-ts-approval-nav-count {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a9ab0;
  min-width: 6.5rem;
  text-align: center;
}

.crm-approval-page .crm-ts-approval-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.875rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.875rem;
}

.crm-approval-page .crm-approval-detail-hero + .crm-ts-approval-notice {
  margin-top: 0;
  margin-bottom: 1rem;
}

.crm-approval-page .crm-ts-approval-blocked {
  margin-top: 0.875rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.crm-approval-page .crm-ts-approval-blocked-hdr {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #b91c1c;
  margin-bottom: 0.375rem;
}

.crm-approval-page .crm-ts-approval-blocked-item {
  font-size: 0.8125rem;
  color: #7f1d1d;
  padding: 0.25rem 0;
}

.crm-approval-page .crm-ts-status-cell {
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.25;
}

.crm-approval-page .crm-ts-aa-col {
  width: auto;
  min-width: 4.5rem;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  padding-left: 0.4rem !important;
  padding-right: 0.4rem !important;
}

.crm-approval-page .crm-ts-aa-col .bi {
  font-size: 0.95rem;
  vertical-align: -0.05em;
}

.crm-approval-page th.crm-ts-aa-col {
  color: #b91c1c;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.crm-approval-page th.crm-ts-aa-col .bi {
  margin-right: 0.2rem;
}

.crm-approval-page .crm-ts-aa-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  line-height: 1;
  cursor: help;
}

.crm-approval-page .crm-ts-aa-flag .bi {
  font-size: 0.95rem;
  line-height: 1;
}

.crm-approval-page .crm-ts-approval-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.625rem;
  margin-top: 1rem;
}

.crm-approval-page .crm-ts-metric {
  background: #f4f6f9;
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
}

.crm-approval-page .crm-ts-metric-lbl {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a9ab0;
  margin-bottom: 0.125rem;
}

.crm-approval-page .crm-ts-metric-val {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
  color: #1a1d23;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.crm-approval-page .crm-ts-metric-val--green { color: #1a9e5f; }
.crm-approval-page .crm-ts-metric-val--accent { color: #1a6fd4; }

.crm-approval-page .crm-ts-approval-util-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid #eef2f6;
}

.crm-approval-page .crm-ts-approval-ytd {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.crm-approval-page .crm-ts-ytd-heading {
  font-weight: 600;
  color: #475569;
  margin-right: 0.25rem;
}

.crm-approval-page .crm-ts-ytd-stat strong {
  color: #1a1d23;
  font-weight: 700;
}

.crm-approval-page .crm-ts-ytd-link {
  font-size: 0.8125rem !important;
  text-decoration: none !important;
  font-weight: 500;
  color: #1a6fd4 !important;
}

.crm-approval-page .crm-ts-ytd-link:hover,
.crm-approval-page .crm-ts-ytd-link:focus {
  color: #1558a8 !important;
  text-decoration: none !important;
}

.crm-approval-page .crm-ts-deliverables-section {
  padding: 0.875rem 1.25rem 1rem;
  border-bottom: 1px solid #eef2f6;
}

.crm-approval-page .crm-ts-deliverable-wrap {
  border: 1px solid #eef2f6;
  border-radius: 8px;
  overflow: visible;
}

.crm-approval-page .crm-ts-deliverable-wrap[data-collapsed="true"] tr.crm-ts-deliverable-row--extra {
  display: none !important;
}

.crm-approval-page .crm-ts-deliverable-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
}

.crm-approval-page .crm-ts-deliverable-table thead th {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0 !important;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc !important;
  white-space: nowrap;
  vertical-align: middle;
}

.crm-approval-page .crm-ts-deliverable-table tbody td {
  font-size: 0.8125rem;
  vertical-align: middle;
  border-bottom-color: #f1f5f9;
  color: #1a1d23;
}

.crm-approval-page .crm-ts-deliverable-table.table-hover tbody tr:hover {
  background: #f8fafc;
}

.crm-approval-page .crm-ts-deliverable-toggle-wrap {
  margin-top: 0.375rem;
  text-align: center;
}

.crm-approval-page .crm-ts-deliverable-toggle {
  font-size: 0.8125rem !important;
  text-decoration: none !important;
  font-weight: 500;
  color: #1a6fd4 !important;
}

.crm-approval-page .crm-ts-deliverable-toggle:hover,
.crm-approval-page .crm-ts-deliverable-toggle:focus {
  color: #1558a8 !important;
  text-decoration: none !important;
}

/* CRM toast notifications (ps.aspx alert-style) ? body-mounted, not nested under .crm-page */
.crm-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 11050;
  min-width: 300px;
  max-width: 500px;
  pointer-events: none;
}

.crm-toast-alert {
  position: relative !important;
  margin: 0 0 10px;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  border-width: 1px;
  border-style: solid;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  pointer-events: auto;
  animation: crmToastBounceInRight 0.6s ease-out;
}

.crm-toast-alert.fade-out {
  animation: crmToastFadeOutRight 0.5s ease-out forwards;
}

.crm-toast-alert.alert-success {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.crm-toast-alert.alert-danger {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.crm-toast-alert.alert-warning {
  background-color: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.crm-toast-alert .bi {
  font-size: 1.125rem;
  flex-shrink: 0;
}

.crm-toast-alert.crm-confirm-toast {
  padding: 0;
  overflow: hidden;
}

.crm-toast-alert.crm-confirm-toast > .d-flex {
  padding: 0.875rem 1rem;
}

.crm-confirm-toast-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0.75rem 1rem;
  background: #fff;
  border-top: 1px solid #fecaca;
}

@keyframes crmToastBounceInRight {
  0% {
    opacity: 0;
    transform: translateX(400px);
  }
  60% {
    opacity: 1;
    transform: translateX(-12px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes crmToastFadeOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

/* Timesheet approval ? Detailed Time Off / Remote Work history modal */
.crm-ts-stats-modal .modal-dialog {
  max-width: 1200px;
  width: 98vw;
  margin: 1.75rem auto;
}

.crm-ts-stats-modal .modal-content {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

.crm-ts-stats-modal .modal-header {
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 1rem 1.25rem;
}

.crm-ts-stats-modal .modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1d23;
}

.crm-ts-stats-modal .modal-body {
  padding: 1rem 1.25rem 1.25rem;
  background: #fff;
}

.crm-ts-stats-modal .modal-footer {
  border-top: 1px solid #e2e8f0;
  background: #fafbfc;
  padding: 0.75rem 1.25rem;
}

.crm-ts-stats-modal .crm-ts-stats-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0;
}

.crm-ts-stats-modal .crm-ts-stats-tabs .nav-item {
  margin: 0;
}

.crm-ts-stats-modal .crm-ts-stats-tabs .nav-link {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #64748b;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: #fff;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.crm-ts-stats-modal .crm-ts-stats-tabs .nav-link:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.crm-ts-stats-modal .crm-ts-stats-tabs .nav-link.active {
  color: #fff !important;
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  box-shadow: 0 2px 4px rgba(26, 111, 212, 0.2);
}

.crm-ts-stats-modal .crm-ts-stats-tab-content {
  padding: 0;
}

.crm-ts-stats-modal .crm-ts-stats-tab-content .tab-pane {
  display: none;
}

.crm-ts-stats-modal .crm-ts-stats-tab-content .tab-pane.active,
.crm-ts-stats-modal .crm-ts-stats-tab-content .tab-pane.active.show {
  display: block;
}

.crm-ts-stats-modal .crm-approval-table-wrap {
  border: 1px solid #eef2f6;
  border-radius: 8px;
  overflow: auto;
  max-height: min(60vh, 520px);
}

.crm-ts-stats-modal .crm-approval-table {
  width: 100%;
  margin-bottom: 0;
}

.crm-ts-stats-modal .crm-approval-table thead th {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  box-shadow: none !important;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0 !important;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc !important;
  white-space: nowrap;
  vertical-align: middle;
}

.crm-ts-stats-modal .crm-approval-table tbody td {
  font-size: 0.8125rem;
  vertical-align: middle;
  border-bottom-color: #f1f5f9;
  color: #1a1d23;
}

.crm-ts-stats-modal .crm-approval-table.table-hover tbody tr:hover {
  background: #f8fafc;
}

.crm-approval-page .crm-ts-approval-body {
  display: block;
}

.crm-approval-page .crm-ts-approval-body--solo {
  display: none;
}

.crm-approval-page .crm-ts-approval-col {
  padding: 1rem 1.25rem 1.125rem;
}

.crm-approval-page .crm-ts-approval-col--actions {
  border-right: 0;
  background: #fafbfc;
}

.crm-approval-page .crm-ts-section-hdr {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8a9ab0;
  margin-bottom: 0.75rem;
}

.crm-approval-page .crm-ts-approval-wfo {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.875rem;
}

.crm-approval-page .crm-ts-approval-wfo .bi {
  font-size: 1.125rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

@media (max-width: 992px) {
  .crm-approval-page .crm-ts-approval-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .crm-approval-page .crm-ts-approval-hero {
    padding: 1rem;
  }

  .crm-approval-page .crm-ts-approval-hero-side {
    align-items: flex-start;
    width: 100%;
  }

  .crm-approval-page .crm-ts-approval-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

.crm-page.crm-admin-page.crm-user-oauth-page .table tbody tr,
.crm-page.crm-admin-page.crm-user-oauth-page .table tbody tr:nth-child(even),
.crm-page.crm-admin-page.crm-user-oauth-page .table-striped > tbody > tr:nth-of-type(odd),
.crm-page.crm-admin-page.crm-user-oauth-page .table-striped > tbody > tr:nth-of-type(even) {
  background-color: #fff !important;
}

.crm-page.crm-admin-page.crm-user-oauth-page .table .crm-badge {
  font-size: 12px;
  padding: 2px 8px;
  white-space: nowrap;
}

.crm-page.crm-user-activity-page .crm-summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.crm-page.crm-user-activity-page .crm-summary-stats > .crm-stat-card {
  flex: 1 1 9rem;
  min-width: 0;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.crm-page.crm-user-activity-page .crm-activity-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.crm-page.crm-user-activity-page .crm-activity-tabs {
  border-bottom-color: #e2e8f0;
}

.crm-page.crm-user-activity-page .crm-activity-tabs .nav-link {
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  border-color: transparent;
  padding: 0.5rem 0.85rem;
}

.crm-page.crm-user-activity-page .crm-activity-tabs .nav-link:hover {
  color: #1a1d23;
  border-color: #e2e8f0 #e2e8f0 #e2e8f0;
}

.crm-page.crm-user-activity-page .crm-activity-tabs .nav-link.active {
  color: #1a6fd4;
  font-weight: 600;
  border-color: #e2e8f0 #e2e8f0 #fff;
}

.crm-page.crm-user-activity-page .crm-tab-toolbar-summary {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
}

.crm-page.crm-user-activity-page .table thead th {
  font-size: 12px !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.35rem 0.45rem;
  vertical-align: middle;
}

.crm-page.crm-user-activity-page .table tbody td {
  font-size: 13px;
  padding: 0.35rem 0.45rem;
  border-bottom-color: #f1f5f9;
  color: #1a1d23;
  vertical-align: middle;
}

.crm-page.crm-user-activity-page .table tbody tr,
.crm-page.crm-user-activity-page .table tbody tr:nth-child(even),
.crm-page.crm-user-activity-page .table-striped > tbody > tr:nth-of-type(odd),
.crm-page.crm-user-activity-page .table-striped > tbody > tr:nth-of-type(even) {
  background-color: #fff !important;
}

.crm-page.crm-user-activity-page .table-hover tbody tr:hover {
  background: #f8fafc !important;
}

.crm-page.crm-user-activity-page .pagination-wrapper {
  margin: 1rem 0 0.5rem;
}

.crm-page.crm-user-activity-page .pagination-wrapper table {
  margin: 0 auto;
}

.crm-page.crm-user-activity-page .pagination-wrapper td {
  padding: 0 2px;
}

.crm-page.crm-user-activity-page .pagination-wrapper a {
  display: inline-block;
  color: #1a6fd4;
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.65rem;
  background: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  min-width: 34px;
  text-align: center;
}

.crm-page.crm-user-activity-page .pagination-wrapper a:hover {
  background: #f8fafc;
  border-color: #1a6fd4;
  color: #1a6fd4;
  text-decoration: none;
}

.crm-page.crm-user-activity-page .pagination-wrapper span {
  display: inline-block;
  color: #fff;
  border: 1px solid #1a6fd4;
  padding: 0.35rem 0.65rem;
  background: #1a6fd4;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  min-width: 34px;
  text-align: center;
}

.crm-page.crm-user-activity-page .crm-btn.btn-sm {
  min-height: 30px;
  padding: 6px 12px !important;
  font-size: 13px !important;
}

/* Service Hub */
.crm-page.crm-service-hub-page {
  margin-bottom: 1.5rem;
}

.crm-page.crm-service-hub-page .card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-page.crm-service-hub-page .card-header,
.crm-page.crm-service-hub-page .card-header.bg-primary {
  background: #fff !important;
  color: #1a1d23 !important;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.875rem 1.25rem;
}

.crm-page.crm-service-hub-page .summary-cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.125rem;
}

.crm-page.crm-service-hub-page .summary-card {
  flex: 1 1 10rem;
  min-width: 0;
  background: #fff;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.crm-page.crm-service-hub-page .summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.crm-page.crm-service-hub-page .summary-card .card-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
}

.crm-page.crm-service-hub-page .summary-card h3 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.crm-page.crm-service-hub-page .form-card,
.crm-page.crm-service-hub-page .routing-card,
.crm-page.crm-service-hub-page .ticket-header,
.crm-page.crm-service-hub-page .ticket-info-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 1.25rem;
  margin-bottom: 1.125rem;
}

.crm-page.crm-service-hub-page .form-label {
  color: #8a9ab0;
  font-weight: 600;
  font-size: 12px;
}

.crm-page.crm-service-hub-page .crm-service-hub-tickets-card,
.crm-page.crm-service-hub-page .crm-service-hub-tickets-card .card-body,
.crm-page.crm-service-hub-page .crm-service-hub-tickets-card .tab-content,
.crm-page.crm-service-hub-page .crm-service-hub-tickets-card .tab-pane,
.crm-page.crm-service-hub-page .crm-sticky-table-wrap {
  overflow: visible;
  max-width: 100%;
}

.crm-page.crm-service-hub-page .crm-service-hub-grid {
  border-collapse: separate;
  border-spacing: 0;
}

.crm-page.crm-service-hub-page .crm-service-hub-grid th,
.crm-page.crm-service-hub-page .crm-service-hub-grid td {
  border-left: none !important;
  border-right: none !important;
}

.crm-page.crm-service-hub-page .crm-service-hub-grid thead th,
.crm-page.crm-service-hub-page .GridView th,
.crm-page.crm-service-hub-page .crm-service-hub-grid th.crm-service-hub-th {
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  font-size: 12px !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  background-color: #f8fafc !important;
  background-clip: padding-box;
  border-top: none !important;
  border-bottom: 1px solid #e2e8f0;
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
  white-space: nowrap;
  vertical-align: middle;
}

.crm-page.crm-service-hub-page .crm-service-hub-grid thead th a,
.crm-page.crm-service-hub-page .crm-service-hub-grid thead th .crm-sort-link {
  color: #8a9ab0 !important;
  text-decoration: none !important;
  font-weight: inherit;
}

.crm-page.crm-service-hub-page .crm-service-hub-grid thead th a:hover,
.crm-page.crm-service-hub-page .crm-service-hub-grid thead th .crm-sort-link:hover {
  color: #1a6fd4 !important;
}

.crm-page.crm-service-hub-page .table tbody td,
.crm-page.crm-service-hub-page .GridView td,
.crm-page.crm-service-hub-page .crm-service-hub-grid tbody td {
  font-size: 13px;
  border-top: none;
  border-bottom: 1px solid #f1f5f9;
}

/* Service Hub ? compact btn-sm sizing on all action buttons */
.crm-page.crm-service-hub-page .btn:not(.btn-link):not(.dropdown-item),
.crm-page.crm-service-hub-page input.btn:not(.btn-link),
.crm-page.crm-service-hub-page a.btn:not(.btn-link):not(.dropdown-item),
.crm-page.crm-service-hub-page .crm-btn,
.crm-page.crm-service-hub-page a.crm-btn,
.crm-page.crm-service-hub-page button.crm-btn,
.crm-page.crm-service-hub-page input.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: unset;
  font-size: 0.875rem !important;
  font-weight: 500;
  padding: 0.25rem 0.5rem !important;
  line-height: 1.5;
  border-radius: 0.25rem;
  text-decoration: none;
  box-shadow: none !important;
}

.crm-page.crm-service-hub-page .crm-btn,
.crm-page.crm-service-hub-page a.crm-btn,
.crm-page.crm-service-hub-page button.crm-btn,
.crm-page.crm-service-hub-page input.crm-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
}

.crm-page.crm-service-hub-page .action-buttons .btn-primary,
.crm-page.crm-service-hub-page .crm-add-form-actions .crm-btn-primary,
.crm-page.crm-service-hub-page .btn-primary:not(.btn-link):not(.dropdown-item) {
  background-color: #1a6fd4;
  border-color: #1a6fd4;
  color: #fff;
}

.crm-page.crm-service-hub-page .table .crm-chip,
.crm-page.crm-service-hub-page .GridView .crm-chip,
.crm-page.crm-service-hub-page .ticket-header .crm-chip {
  white-space: nowrap;
}

.crm-page.crm-service-hub-page .crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-page.crm-service-hub-page .crm-btn-secondary:hover,
.crm-page.crm-service-hub-page .crm-btn-secondary:focus {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1a1d23;
}

/* Zoho project export */
.crm-page.crm-zoho-project-page {
  margin-bottom: 1.5rem;
}

.crm-page.crm-zoho-project-page .card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.crm-page.crm-zoho-project-page .card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.875rem 1.25rem;
}

.crm-page.crm-zoho-project-page .card-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1d23;
}

.crm-page.crm-zoho-project-page .table {
  font-size: 13px;
}

.crm-page.crm-zoho-project-page .table thead th {
  font-size: 12px !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.35rem 0.45rem;
}

.crm-page.crm-zoho-project-page .table tbody td {
  font-size: 13px;
  padding: 0.35rem 0.45rem;
  border-bottom-color: #f1f5f9;
}

.crm-page.crm-zoho-project-page .crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 12px !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.3;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  box-shadow: none !important;
}

.crm-page.crm-zoho-project-page .crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-page.crm-zoho-project-page .crm-btn-secondary:hover,
.crm-page.crm-zoho-project-page .crm-btn-secondary:focus {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1a1d23;
}

/* Sidebar isolation ? keep nav spacing fixed when pages inject table/nav padding rules */
body.crm-shell .wrapper > .sidebar.crm-sidebar-shell:not(.sidebar-mini) .crm-sidebar-nav .crm-sidebar-menu > .nav-item > .nav-link.crm-sidebar-link,
body.crm-shell .wrapper > .sidebar.crm-sidebar-shell:not(.sidebar-mini) .crm-sidebar-nav .crm-sidebar-menu > .nav-item > a.nav-link.crm-sidebar-link {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  padding: var(--crm-sidebar-link-pad-y, 8px) var(--crm-sidebar-inset, 16px) !important;
  line-height: 1.4 !important;
  min-height: 0 !important;
  gap: 10px !important;
}

body.crm-shell .wrapper > .sidebar.crm-sidebar-shell:not(.sidebar-mini) .crm-sidebar-nav .crm-sidebar-group-label {
  padding: 14px var(--crm-sidebar-inset, 16px) 6px !important;
}

body.crm-shell .wrapper > .sidebar.crm-sidebar-shell .crm-sidebar-nav .crm-sidebar-menu > .nav-item {
  margin: 0 0 1px !important;
  border-bottom: none !important;
}

/* CRM Pipeline Dashboard (Enhancement 6) */
.crm-page.crm-dashboard-page {
  padding-bottom: 24px;
}

.crm-page.crm-dashboard-page .crm-dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.crm-page.crm-dashboard-page .crm-dash-scope-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: #eef2ff;
  color: #4338ca;
  white-space: nowrap;
}

.crm-page.crm-dashboard-page .crm-dash-scope-badge--all {
  background: #ecfdf5;
  color: #047857;
}

.crm-page.crm-dashboard-page .crm-dash-kpi-row > .crm-stat-card {
  flex: 1 1 calc(20% - 8px);
  min-width: 140px;
}

.crm-page.crm-dashboard-page .crm-dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.crm-page.crm-dashboard-page .crm-dash-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.crm-page.crm-dashboard-page .crm-dash-card {
  margin-bottom: 0;
}

.crm-page.crm-dashboard-page .crm-dash-empty {
  display: block;
  padding: 20px 16px;
  color: #8a9ab0;
  font-size: 13px;
  text-align: center;
}

.crm-page.crm-dashboard-page .crm-dash-table thead th {
  font-size: 12px !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a9ab0;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.45rem 0.65rem;
  white-space: nowrap;
}

.crm-page.crm-dashboard-page .crm-dash-table tbody td {
  font-size: 13px;
  padding: 0.45rem 0.65rem;
  border-bottom-color: #f1f5f9;
  vertical-align: middle;
}

.crm-page.crm-dashboard-page .crm-dash-funnel-row,
.crm-page.crm-dashboard-page .crm-dash-sector-row {
  display: grid;
  grid-template-columns: 110px 1fr 72px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.crm-page.crm-dashboard-page .crm-dash-funnel-label,
.crm-page.crm-dashboard-page .crm-dash-sector-name {
  font-size: 13px;
  font-weight: 500;
  color: #1a1d23;
}

.crm-page.crm-dashboard-page .crm-dash-funnel-bar-wrap,
.crm-page.crm-dashboard-page .crm-dash-sector-bar-wrap {
  height: 10px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
}

.crm-page.crm-dashboard-page .crm-dash-funnel-bar {
  height: 100%;
  background: linear-gradient(90deg, #1a6fd4, #3b82f6);
  border-radius: 999px;
  min-width: 4px;
}

.crm-page.crm-dashboard-page .crm-dash-sector-bar {
  height: 100%;
  background: linear-gradient(90deg, #059669, #34d399);
  border-radius: 999px;
  min-width: 4px;
}

.crm-page.crm-dashboard-page .crm-dash-funnel-count,
.crm-page.crm-dashboard-page .crm-dash-sector-val {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  text-align: right;
}

.crm-page.crm-dashboard-page .crm-dash-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.crm-page.crm-dashboard-page .crm-dash-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.crm-page.crm-dashboard-page .crm-dash-activity-item:last-child {
  border-bottom: none;
}

.crm-page.crm-dashboard-page .crm-dash-activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eef2ff;
  color: #1a6fd4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.crm-page.crm-dashboard-page .crm-dash-activity-body {
  flex: 1;
  min-width: 0;
}

.crm-page.crm-dashboard-page .crm-dash-activity-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1d23;
  margin-bottom: 2px;
}

.crm-page.crm-dashboard-page .crm-dash-activity-meta {
  font-size: 12px;
  color: #8a9ab0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crm-page.crm-dashboard-page .crm-dash-won-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crm-page.crm-dashboard-page .crm-dash-won-tabs {
  display: inline-flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
}

.crm-page.crm-dashboard-page .crm-dash-won-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  border: none;
  background: transparent;
}

.crm-page.crm-dashboard-page .crm-dash-won-tab--active,
.crm-page.crm-dashboard-page .crm-dash-won-tab:hover {
  background: #fff;
  color: #1a6fd4;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

@media (max-width: 1199px) {
  .crm-page.crm-dashboard-page .crm-dash-kpi-row > .crm-stat-card {
    flex: 1 1 calc(33.333% - 8px);
  }
}

@media (max-width: 991px) {
  .crm-page.crm-dashboard-page .crm-dash-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .crm-page.crm-dashboard-page .crm-dash-header {
    flex-direction: column;
  }

  .crm-page.crm-dashboard-page .crm-dash-kpi-row > .crm-stat-card {
    flex: 1 1 calc(50% - 6px);
  }

  .crm-page.crm-dashboard-page .crm-dash-funnel-row,
  .crm-page.crm-dashboard-page .crm-dash-sector-row {
    grid-template-columns: 90px 1fr 56px;
    gap: 8px;
  }
}

/* Contact edit form ? matches company_summary_edit + contact_add CRM shell */
.crm-page.crm-contact-edit-page .crm-summary-card-body > .crm-form-section:first-of-type {
  margin-top: 0;
}

.crm-page.crm-contact-edit-page .crm-form-section-inset {
  margin-top: 0;
}

.crm-page.crm-contact-edit-page .form-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.35rem;
}

.crm-page.crm-contact-edit-page .form-control,
.crm-page.crm-contact-edit-page .form-select {
  font-size: 14px;
  border-color: #e2e8f0;
  border-radius: 8px;
}

.crm-page.crm-contact-edit-page .form-control:focus,
.crm-page.crm-contact-edit-page .form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(26, 111, 212, 0.15);
}

.crm-page.crm-contact-edit-page .crm-radio-inline {
  border: 0;
  border-collapse: collapse;
  padding-top: 0.35rem;
  margin: 0;
}

.crm-page.crm-contact-edit-page .crm-radio-inline tr {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.crm-page.crm-contact-edit-page .crm-radio-inline td {
  padding: 0;
  border: none;
  white-space: nowrap;
}

.crm-page.crm-contact-edit-page .crm-radio-inline input[type="radio"],
.crm-page.crm-contact-edit-page .list-unstyled.d-flex input[type="radio"] {
  margin-right: 0.35rem;
}

.crm-page.crm-contact-edit-page .crm-radio-inline label,
.crm-page.crm-contact-edit-page .list-unstyled.d-flex label {
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  color: #374151;
}

/* Zoho Books link on contact edit */
.crm-page.crm-contact-edit-page .crm-zoho-section {
  margin-top: 1.75rem;
  padding-top: 0.25rem;
}

.crm-page .crm-zoho-section .crm-zoho-status {
  margin: 0.75rem 0 1.25rem;
  padding: 0;
  line-height: 1.45;
}

.crm-page.crm-contact-edit-page .crm-zoho-linked-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0;
  line-height: 1.4;
}

.crm-page.crm-contact-edit-page .crm-zoho-link-panel {
  margin-top: 0;
}

.crm-page.crm-contact-edit-page .crm-zoho-link-panel .form-select {
  max-width: 100%;
}

.crm-page.crm-contact-edit-page .crm-zoho-link-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.crm-page.crm-contact-edit-page .crm-zoho-link-actions .crm-btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
}

.crm-page.crm-contact-edit-page .alert.alert-success {
  position: fixed !important;
  top: 20px;
  right: 20px;
  z-index: 9999;
  min-width: 300px;
  max-width: 500px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: crmToastBounceInRight 0.6s ease-out;
}

.crm-page.crm-contact-edit-page .alert.alert-success.fade-out {
  animation: crmToastFadeOutRight 0.5s ease-out forwards;
}

/* Deliverable summary ? Zoho project badge reveals full name on click */
.crm-zoho-project-pop {
  display: inline-block;
}

.crm-zoho-project-pop-summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
}

.crm-zoho-project-pop-summary::-webkit-details-marker {
  display: none;
}

.crm-zoho-project-pop-summary::marker {
  content: '';
}

.crm-zoho-project-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #e8ecf1;
  background: #fafbfc;
  color: #b8c0cc;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.crm-zoho-project-pop-summary:hover .crm-zoho-project-badge {
  color: #94a3b8;
  border-color: #dde3ea;
}

.crm-zoho-project-pop-name {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.45;
  max-width: 28rem;
}

.crm-zoho-project-linked-btn {
  cursor: pointer;
}

.crm-zoho-project-linked-btn:hover,
.crm-zoho-project-linked-btn:focus {
  color: #94a3b8;
  border-color: #dde3ea;
}

.crm-zoho-entity-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 0.375rem;
  border: 1px solid #e8ecf1;
  background: #fafbfc;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

a.crm-zoho-entity-badge:hover,
a.crm-zoho-entity-badge:focus {
  color: #475569;
  border-color: #dde3ea;
  background: #f4f6f8;
  text-decoration: none;
}

button.crm-zoho-entity-badge.crm-zoho-project-linked-btn {
  cursor: pointer;
  font-family: inherit;
}

button.crm-zoho-entity-badge.crm-zoho-project-linked-btn:hover,
button.crm-zoho-entity-badge.crm-zoho-project-linked-btn:focus {
  color: #475569;
  border-color: #dde3ea;
  background: #f4f6f8;
}

.crm-zoho-entity-badge.is-static {
  cursor: default;
}

.crm-form-saving-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(255, 255, 255, 0.72);
  align-items: center;
  justify-content: center;
}

.crm-form-saving-overlay.show {
  display: flex;
}

.crm-form-saving-panel {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

.crm-zoho-project-modal-list .list-group-item {
  font-size: 0.875rem;
  line-height: 1.45;
  padding: 0.65rem 1rem;
}

.crm-page.crm-contact-edit-page .crm-add-form-actions {
  margin-top: 1.5rem;
  justify-content: flex-start;
}

.crm-page.crm-contact-edit-page .alert {
  border-radius: 10px;
  font-size: 14px;
}

/* PTO employee home */
.crm-pto-home-page .crm-pto-home-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.crm-pto-home-page .crm-pto-home-hero-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1d23;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.crm-pto-home-page .crm-pto-home-hero-sub {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.crm-pto-home-page .crm-pto-home-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.crm-pto-home-page .crm-pto-home-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.crm-pto-home-page .crm-pto-home-stats {
  margin-bottom: 1.25rem !important;
}

.crm-pto-home-page .crm-pto-home-desc {
  display: block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-pto-home-page .crm-pto-modal-detail .crm-approval-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
}

#requestDetailsModal .modal-body.crm-approval-page {
  background: #f8fafc;
}

#requestDetailsModal .crm-pto-modal-detail {
  padding: 1.25rem 1.5rem;
}

#requestDetailsModal .crm-pto-modal-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

#requestDetailsModal .modal-header .modal-title {
  font-size: 1rem;
  font-weight: 600;
}

.crm-pto-home-page .crm-pto-add-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 576px) {
  .crm-pto-home-page .crm-pto-home-hero {
    padding: 1rem;
  }
  .crm-pto-home-page .crm-pto-home-desc {
    max-width: 160px;
  }
  #requestDetailsModal .crm-pto-modal-detail {
    padding: 1rem;
  }
}

/* ===== Project Usage report ===== */
.crm-project-usage-page .crm-usage-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  transition: grid-template-columns 0.2s ease;
}
.crm-project-usage-page .crm-usage-layout.is-filters-collapsed {
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.5rem;
}
.crm-project-usage-page .crm-usage-sidebar {
  position: sticky;
  top: 0.75rem;
  min-width: 0;
  overflow: hidden;
}
.crm-project-usage-page .crm-usage-layout.is-filters-collapsed .crm-usage-sidebar {
  width: 2.25rem;
  max-width: 2.25rem;
}
.crm-project-usage-page .crm-usage-layout.is-filters-collapsed .crm-usage-filter-body,
.crm-project-usage-page .crm-usage-layout.is-filters-collapsed .crm-usage-filter-title {
  display: none !important;
}
.crm-project-usage-page .crm-usage-layout.is-filters-collapsed .crm-usage-sidebar .crm-summary-card-hdr {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.4rem 0.15rem;
  gap: 0;
  border-bottom: 0;
}
.crm-project-usage-page .crm-usage-filter-toggle {
  flex: 0 0 auto;
  line-height: 1;
  padding: 0.2rem 0.25rem;
  min-width: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.crm-project-usage-page .crm-usage-main {
  min-width: 0;
}
.crm-project-usage-page .crm-usage-main > .crm-summary-card > .crm-summary-card-hdr {
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  text-align: left;
}
.crm-project-usage-page .crm-usage-user-list {
  max-height: 340px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.35rem 0.5rem;
  background: #f8fafc;
}
.crm-project-usage-page .crm-usage-cbl label,
.crm-project-usage-page .crm-usage-cbl > span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.4rem;
  margin: 0;
  border-radius: 8px;
  font-size: 13px;
  color: #1a1d23;
  cursor: pointer;
}
.crm-project-usage-page .crm-usage-user-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 auto;
}
.crm-project-usage-page .crm-usage-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-project-usage-page .crm-usage-role-badge {
  flex: 0 0 auto;
  font-size: 9px !important;
  letter-spacing: 0.03em;
  padding: 0.12rem 0.4rem !important;
  line-height: 1.2;
  text-transform: uppercase;
  font-weight: 700;
}
.crm-project-usage-page .crm-usage-cbl label:hover,
.crm-project-usage-page .crm-usage-cbl > span:hover {
  background: #eef2f7;
}
.crm-project-usage-page .crm-usage-cbl input[type=checkbox] {
  margin: 0;
  flex: 0 0 auto;
}
.crm-project-usage-page .crm-usage-cbl .is-active,
.crm-project-usage-page .crm-usage-cbl span.is-active,
.crm-project-usage-page .crm-usage-cbl label.is-active {
  background: #e8f0fb;
}
.crm-project-usage-page .crm-usage-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.crm-project-usage-page .crm-usage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.crm-project-usage-page .crm-usage-dot--active {
  background: #1a6fd4;
}
/* Usage highlight KPI header ? full width above sidebar/table */
.crm-project-usage-page .crm-usage-kpi-strip {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 3px;
  margin-bottom: 1rem !important;
  scrollbar-width: thin;
}
.crm-project-usage-page .crm-usage-kpi-strip .crm-kpi-tile {
  flex: 1 0 108px;
  min-width: 108px;
  padding: 12px 10px !important;
}
.crm-project-usage-page .crm-usage-kpi-strip .crm-kpi-lbl {
  white-space: nowrap;
  font-size: 11px !important;
  letter-spacing: .045em !important;
}
.crm-project-usage-page .crm-usage-kpi-strip .crm-kpi-val {
  font-size: 20px !important;
}
.crm-project-usage-page .crm-usage-kpi-strip .crm-kpi-val-warn {
  color: #b91c1c !important;
}
.crm-project-usage-page .crm-usage-kpi-strip .crm-usage-kpi-danger {
  background: #fef2f2;
  border-color: #fecaca;
}
.crm-project-usage-page .crm-usage-kpi-strip .crm-usage-kpi-danger .crm-kpi-lbl {
  color: #b91c1c;
}
.crm-project-usage-page .crm-usage-col-help-btn {
  color: #2563eb;
  line-height: 1;
  vertical-align: baseline;
}
.crm-project-usage-page .crm-usage-col-help-btn i {
  font-size: 1.25rem;
}
.crm-project-usage-page .crm-usage-col-help-btn:hover,
.crm-project-usage-page .crm-usage-col-help-btn:focus {
  color: #1d4ed8;
}
.crm-usage-col-help dt {
  font-weight: 700;
  font-size: 0.9rem;
  color: #1a1d23;
  margin-top: 0.75rem;
}
.crm-usage-col-help dt:first-child {
  margin-top: 0;
}
.crm-usage-col-help dd {
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.4;
}
.crm-usage-col-help dt.crm-usage-col-help-danger {
  color: #b91c1c;
  background: #fef2f2;
  border-left: 3px solid #dc2626;
  padding: 0.35rem 0.5rem;
  margin-top: 0.85rem;
  border-radius: 0 4px 0 0;
}
.crm-usage-col-help dd.crm-usage-col-help-danger {
  color: #991b1b;
  background: #fef2f2;
  border-left: 3px solid #dc2626;
  padding: 0.25rem 0.5rem 0.45rem;
  margin-top: 0;
  border-radius: 0 0 4px 0;
}
.crm-project-usage-page .crm-usage-table-wrap.table-responsive,
.crm-project-usage-page .crm-usage-table-wrap {
  max-width: 100%;
  max-height: min(70vh, 780px);
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}
.crm-project-usage-page .crm-usage-table {
  font-size: 12.5px;
  margin: 0;
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.crm-project-usage-page .crm-usage-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a9ab0;
  background-color: #f8fafc !important;
  background-clip: padding-box;
  border-top: none !important;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 0 0 #e2e8f0;
  white-space: nowrap;
  padding: 0.45rem 0.5rem;
  cursor: help;
}
.crm-project-usage-page .crm-usage-table thead th.crm-usage-th-danger {
  color: #b91c1c;
  background-color: #fef2f2 !important;
  border-bottom-color: #fecaca;
  box-shadow: 0 1px 0 0 #fecaca;
  font-weight: 700;
}
.crm-project-usage-page .crm-usage-table tbody td {
  padding: 0.45rem 0.5rem;
  border-bottom-color: #f1f5f9;
  vertical-align: middle;
}
.crm-project-usage-page .crm-usage-detail-link {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.crm-project-usage-page .crm-usage-detail-link:hover,
.crm-project-usage-page .crm-usage-detail-link:focus {
  color: #1a6fd4;
  border-bottom-style: solid;
  outline: none;
}
.crm-project-usage-page .crm-usage-warn,
.crm-project-usage-page .crm-usage-warn .crm-usage-detail-link {
  color: #b45309;
  font-weight: 600;
}
.crm-project-usage-page .crm-usage-warn .crm-usage-detail-link:hover,
.crm-project-usage-page .crm-usage-warn .crm-usage-detail-link:focus {
  color: #92400e;
}
.crm-usage-detail-table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a9ab0;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}
.crm-usage-detail-table tbody td {
  font-size: 13px;
  max-width: 28rem;
  word-break: break-word;
}
.crm-usage-detail-table a.crm-usage-detail-deliv-link {
  color: #1a6fd4;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.crm-usage-detail-table a.crm-usage-detail-deliv-link:hover {
  color: #0d4f9e;
  border-bottom-style: solid;
}
.crm-project-usage-page .crm-usage-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  background: #eef2f7;
  color: #475569;
}
.crm-project-usage-page .crm-usage-rank--gold {
  background: #fef3c7;
  color: #92400e;
}
.crm-project-usage-page .crm-usage-rank--silver {
  background: #e2e8f0;
  color: #334155;
}
.crm-project-usage-page .crm-usage-rank--bronze {
  background: #ffedd5;
  color: #9a3412;
}
.crm-project-usage-page .crm-usage-row-top td:first-child {
  box-shadow: inset 3px 0 0 #1a6fd4;
}
.crm-project-usage-page .crm-usage-top-task {
  max-width: 14rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crm-project-usage-page .crm-usage-ai-card .crm-usage-ai-h {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin: 0.85rem 0 0.35rem;
}
.crm-project-usage-page .crm-usage-ai-card .crm-usage-ai-h:first-child {
  margin-top: 0;
}
.crm-project-usage-page .crm-usage-ai-p {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  color: #1a1d23;
  line-height: 1.45;
}
.crm-project-usage-page .crm-usage-ai-li {
  display: flex;
  gap: 0.15rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: #1a1d23;
  margin: 0.15rem 0;
  line-height: 1.4;
}
.crm-project-usage-page .crm-usage-ai-li .bi-dot {
  color: #1a6fd4;
  font-size: 1.1rem;
  line-height: 1;
  margin-top: 0.05rem;
}
.crm-project-usage-page .crm-usage-ai-gap {
  height: 0.35rem;
}
@media (max-width: 992px) {
  .crm-project-usage-page .crm-usage-layout,
  .crm-project-usage-page .crm-usage-layout.is-filters-collapsed {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .crm-project-usage-page .crm-usage-sidebar,
  .crm-project-usage-page .crm-usage-layout.is-filters-collapsed .crm-usage-sidebar {
    position: static;
    width: auto;
    max-width: none;
  }
  .crm-project-usage-page .crm-usage-layout.is-filters-collapsed .crm-usage-sidebar .crm-summary-card-hdr {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: inherit;
    border-bottom: inherit;
  }
  .crm-project-usage-page .crm-usage-layout.is-filters-collapsed .crm-usage-filter-title {
    display: block !important;
  }
  .crm-project-usage-page .crm-usage-layout.is-filters-collapsed .crm-usage-filter-title-text {
    display: inline !important;
  }
  .crm-project-usage-page .crm-usage-filter-toggle {
    width: auto;
    height: auto;
    padding: 0.25rem 0.4rem;
  }
}

/* -- Incomplete work warnings dashboard --------------------------- */
.crm-iww-page .crm-iww-intro {
  position: relative;
  z-index: 25;
  overflow: visible;
}
.crm-iww-page .crm-iww-kpi-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  margin-bottom: 1rem !important;
}
@media (max-width: 1100px) {
  .crm-iww-page .crm-iww-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 640px) {
  .crm-iww-page .crm-iww-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
.crm-iww-page .crm-iww-baseline {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.65rem 0.85rem;
}
.crm-iww-page .crm-iww-standard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.crm-iww-page .crm-iww-baseline--ideal {
  color: #1e3a5f;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.crm-iww-page .crm-iww-user-picker {
  position: relative;
  min-width: 15rem;
}
.crm-iww-page .crm-iww-user-trigger {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  padding: 4px 10px 4px 4px;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  text-align: left;
}
.crm-iww-page .crm-iww-user-trigger:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.crm-iww-page .crm-iww-user-trigger[aria-expanded="true"] {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
}
.crm-iww-page .crm-iww-user-avatar {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.crm-iww-page .crm-iww-user-avatar.hot-role-admin {
  color: #1a6fd4;
  background: #e8f0fb;
}
.crm-iww-page .crm-iww-user-avatar.hot-role-manager {
  color: #c47d0a;
  background: #fef3dc;
}
.crm-iww-page .crm-iww-user-avatar.hot-role-employee {
  color: #64748b;
  background: #f1f3f5;
}
.crm-iww-page .crm-iww-user-avatar.crm-iww-role-all {
  color: #6f42c1;
  background: #f3e8ff;
}
.crm-iww-page .crm-iww-user-trigger-text,
.crm-iww-page .crm-iww-user-option-text {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  line-height: 1.2;
}
.crm-iww-page .crm-iww-user-name,
.crm-iww-page .crm-iww-user-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-iww-page .crm-iww-user-name {
  color: #334155;
  font-size: 13px;
  font-weight: 500;
}
.crm-iww-page .crm-iww-user-role {
  color: #94a3b8;
  font-size: 12px;
}
.crm-iww-page .crm-iww-user-chevron {
  margin-left: 6px;
  color: #8a9ab0;
  font-size: 12px;
  transition: transform 0.15s ease;
}
.crm-iww-page .crm-iww-user-trigger[aria-expanded="true"] .crm-iww-user-chevron {
  transform: rotate(180deg);
}
.crm-iww-page .crm-iww-user-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  width: 310px;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
}
.crm-iww-page .crm-iww-user-menu.is-open {
  display: block;
}
.crm-iww-page .crm-iww-user-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: #8a9ab0;
  background: #fafbfc;
  border-bottom: 1px solid #f1f5f9;
}
.crm-iww-page .crm-iww-user-search {
  width: 100%;
  min-width: 0;
  padding: 5px 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}
.crm-iww-page .crm-iww-user-menu-scroll {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}
.crm-iww-page .crm-iww-user-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  color: #1a1d23;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.crm-iww-page .crm-iww-user-option:hover,
.crm-iww-page .crm-iww-user-option:focus {
  background: #f1f5f9;
  outline: 0;
}
.crm-iww-page .crm-iww-user-option.is-selected {
  background: #eff6ff;
}
.crm-iww-page .crm-iww-user-check {
  color: #1a6fd4;
  opacity: 0;
}
.crm-iww-page .crm-iww-user-option.is-selected .crm-iww-user-check {
  opacity: 1;
}
.crm-iww-page .crm-iww-user-empty {
  padding: 14px 12px;
  color: #8a9ab0;
  font-size: 12px;
  text-align: center;
}
.crm-iww-page .crm-iww-active-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.crm-iww-page .crm-iww-active-filter input {
  margin-right: 0.25rem;
}
@media (max-width: 768px) {
  .crm-iww-page .crm-iww-standard-grid {
    grid-template-columns: 1fr;
  }
}
.crm-iww-page .crm-iww-table-wrap {
  overflow: visible;
  max-height: none;
}
.crm-iww-page .crm-iww-table-card {
  overflow: visible;
}
.crm-iww-page .crm-iww-table {
  font-size: 0.82rem;
}
.crm-iww-page .crm-iww-table thead th {
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.crm-iww-page .crm-iww-proj {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}
.crm-iww-page .crm-iww-deliv {
  font-weight: 600;
  color: #1a1d23;
}
.crm-iww-page .crm-iww-deliv a {
  color: inherit;
  text-decoration: none;
}
.crm-iww-page .crm-iww-deliv a:hover {
  color: #1a6fd4;
  text-decoration: underline;
}
.crm-iww-page .crm-iww-meta {
  font-size: 0.72rem;
}
.crm-iww-page .crm-iww-detail {
  font-size: 0.7rem;
  margin-top: 0.15rem;
  max-width: 28rem;
}
.crm-iww-page .crm-iww-target {
  font-size: 0.75rem;
  white-space: nowrap;
}
.crm-iww-page .crm-iww-help-btn {
  color: #64748b;
  font-weight: 600;
  text-decoration: none;
}
.crm-iww-page .crm-iww-help-btn:hover {
  color: #1a6fd4;
}
.crm-iww-page .crm-iww-metric-link {
  color: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.crm-iww-page .crm-iww-metric-link:hover {
  color: #1a6fd4;
}
.crm-iww-col-help dt {
  margin-top: 0.65rem;
  color: #334155;
  font-weight: 700;
}
.crm-iww-col-help dt:first-child {
  margin-top: 0;
}
.crm-iww-col-help dd {
  margin-bottom: 0;
  color: #64748b;
}
.crm-iww-page .crm-iww-ai-card .crm-usage-ai-h {
  margin: 0.85rem 0 0.35rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.crm-iww-page .crm-iww-ai-card .crm-usage-ai-h:first-child {
  margin-top: 0;
}
.crm-iww-page .crm-iww-ai-card .crm-usage-ai-p {
  margin: 0 0 0.35rem;
  color: #1a1d23;
  font-size: 0.92rem;
  line-height: 1.45;
}
.crm-iww-page .crm-iww-ai-card .crm-usage-ai-li {
  display: flex;
  gap: 0.15rem;
  align-items: flex-start;
  margin: 0.15rem 0;
  color: #1a1d23;
  font-size: 0.9rem;
  line-height: 1.4;
}
.crm-iww-page .crm-iww-ai-card .crm-usage-ai-li .bi-dot {
  color: #1a6fd4;
}
.crm-iww-page .crm-iww-ai-loading {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.15rem;
  color: #1e3a5f;
  background: linear-gradient(110deg, #eff6ff, #f5f3ff, #eff6ff);
  background-size: 200% 100%;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
  animation: crm-iww-ai-shimmer 2.4s ease-in-out infinite;
}
.crm-iww-page .crm-iww-ai-spinner {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 3px solid rgba(37, 99, 235, 0.18);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: crm-iww-ai-spin 0.75s linear infinite;
}
.crm-iww-page .crm-iww-ai-loading-msg {
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.82rem;
}
.crm-iww-page .is-busy {
  pointer-events: none;
  opacity: 0.65;
}
@keyframes crm-iww-ai-spin {
  to { transform: rotate(360deg); }
}
@keyframes crm-iww-ai-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.crm-iww-page .crm-iww-gap-bad {
  color: #b91c1c !important;
  font-weight: 700;
}
.crm-iww-page .crm-iww-gap-warn {
  color: #b45309 !important;
  font-weight: 600;
}
.crm-iww-page .crm-iww-gap-ok {
  color: #166534 !important;
}
.crm-iww-page tr.crm-iww-row--critical td {
  background: #fef2f2;
}
.crm-iww-page tr.crm-iww-row--high td {
  background: #fff7ed;
}
.crm-iww-page tr.crm-iww-row--medium td {
  background: #faf5ff;
}
.crm-iww-page tr.crm-iww-row--watch td {
  background: #f8fafc;
}

/* AI Before & After (aiba.aspx) */
.crm-aiba-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
}

.crm-aiba-page .crm-aiba-region-menu {
  min-width: 240px;
  max-height: 320px;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.crm-aiba-page .crm-aiba-region-all {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f6;
  font-size: 13px;
  font-weight: 600;
  color: #1a1d23;
}

.crm-aiba-page .crm-aiba-region-list,
.crm-aiba-page .crm-aiba-region-list label,
.crm-aiba-page .crm-aiba-region-menu label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px !important;
  padding: 0 !important;
  float: none !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #1a1d23 !important;
  line-height: 1.4;
}

.crm-aiba-page .crm-aiba-region-menu input[type="checkbox"] {
  float: none !important;
  margin: 0 !important;
  width: 16px;
  height: 16px;
  accent-color: #1a6fd4;
}

.crm-aiba-page .crm-aiba-msg {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 14px;
  font-weight: 500;
}

.crm-aiba-page .crm-aiba-msg:empty {
  display: none;
}

.crm-aiba-page .crm-aiba-msg-error {
  color: #9b1c1c;
}

.crm-aiba-page .crm-aiba-msg-success {
  color: #166534;
}

.crm-aiba-page .crm-aiba-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #1a6fd4 !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none !important;
}

.crm-aiba-page .crm-aiba-pdf-link:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1559b0 !important;
}

.crm-aiba-page .crm-aiba-pdf-link .bi {
  color: #dc2626;
}

.crm-aiba-page .crm-aiba-delete,
.crm-aiba-page a.crm-aiba-delete,
.crm-aiba-page .crm-aiba-grid td a.crm-aiba-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid #f0d4d4;
  background: #fffafa;
  color: #d13232 !important;
  text-decoration: none !important;
  cursor: pointer;
  box-sizing: border-box;
  vertical-align: middle;
}

.crm-aiba-page .crm-aiba-delete .bi,
.crm-aiba-page a.crm-aiba-delete .bi,
.crm-aiba-page .crm-aiba-grid td a.crm-aiba-delete .bi {
  color: #d13232 !important;
  font-size: 12px;
  line-height: 1;
}

.crm-aiba-page .crm-aiba-delete:hover,
.crm-aiba-page a.crm-aiba-delete:hover,
.crm-aiba-page .crm-aiba-grid td a.crm-aiba-delete:hover {
  background: #fdeaea !important;
  border-color: #f5c4c4 !important;
  color: #d13232 !important;
  text-decoration: none !important;
}

.crm-aiba-page .crm-aiba-grid,
.crm-aiba-page .crm-aiba-grid .rgMasterTable {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
}

.crm-aiba-page .crm-aiba-grid-wrap {
  overflow: visible;
}

.crm-aiba-page .crm-aiba-grid .rgHeader,
.crm-aiba-page .crm-aiba-grid th,
.crm-aiba-page .crm-aiba-grid-wrap .rgHeader,
.crm-aiba-page .crm-aiba-grid-wrap thead th {
  position: sticky;
  top: var(--crm-topbar-height, 52px);
  z-index: 30;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 10px 12px !important;
  box-shadow: 0 1px 0 #e2e8f0;
}

.crm-aiba-page .crm-aiba-grid .rgHeader a,
.crm-aiba-page .crm-aiba-grid th a {
  color: #64748b !important;
  text-decoration: none !important;
  font-weight: 700;
}

.crm-aiba-page .crm-aiba-grid td {
  font-size: 13px;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 12px !important;
  vertical-align: middle;
}

/* Dealership searchable dropdown (crm-search-select) */
.crm-aiba-page .form-group {
  overflow: visible;
}

.crm-aiba-page .crm-search-select-wrap {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
}

/* Reporting hub (crystal/report2.aspx) + Admin hub (admin_tool.aspx) */
.crm-reporting-hub-page .crm-card-sub,
.crm-admin-hub-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
  color: #8a9ab0;
}

.crm-reporting-hub-page .crm-reporting-hub-delete,
.crm-reporting-hub-page a.crm-reporting-hub-delete,
.crm-reporting-hub-page .crm-reporting-hub-grid td a.crm-reporting-hub-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid #f0d4d4;
  background: #fffafa;
  color: #d13232 !important;
  text-decoration: none !important;
  cursor: pointer;
  box-sizing: border-box;
  vertical-align: middle;
}

.crm-reporting-hub-page .crm-reporting-hub-delete .bi,
.crm-reporting-hub-page a.crm-reporting-hub-delete .bi,
.crm-reporting-hub-page .crm-reporting-hub-grid td a.crm-reporting-hub-delete .bi {
  color: #d13232 !important;
  font-size: 12px;
  line-height: 1;
}

.crm-reporting-hub-page .crm-reporting-hub-delete:hover,
.crm-reporting-hub-page a.crm-reporting-hub-delete:hover,
.crm-reporting-hub-page .crm-reporting-hub-grid td a.crm-reporting-hub-delete:hover {
  background: #fdeaea !important;
  border-color: #f5c4c4 !important;
  color: #d13232 !important;
  text-decoration: none !important;
}

.crm-reporting-hub-page .crm-reporting-hub-grid,
.crm-reporting-hub-page .crm-reporting-hub-grid .rgMasterTable {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
}

.crm-reporting-hub-page .crm-reporting-hub-grid-wrap {
  overflow: visible;
}

.crm-reporting-hub-page .crm-reporting-hub-grid .rgHeader,
.crm-reporting-hub-page .crm-reporting-hub-grid th,
.crm-reporting-hub-page .crm-reporting-hub-grid-wrap .rgHeader,
.crm-reporting-hub-page .crm-reporting-hub-grid-wrap thead th {
  position: sticky;
  top: var(--crm-topbar-height, 52px);
  z-index: 30;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 10px 12px !important;
  box-shadow: 0 1px 0 #e2e8f0;
}

.crm-reporting-hub-page .crm-reporting-hub-grid .rgHeader a,
.crm-reporting-hub-page .crm-reporting-hub-grid th a {
  color: #64748b !important;
  text-decoration: none !important;
  font-weight: 700;
}

.crm-reporting-hub-page .crm-reporting-hub-grid td {
  font-size: 13px;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 12px !important;
  vertical-align: middle;
}

.crm-reporting-hub-page .crm-reporting-hub-grid td a:not(.crm-reporting-hub-delete) {
  color: #1a6fd4 !important;
  font-weight: 500;
  text-decoration: none !important;
}

.crm-reporting-hub-page .crm-reporting-hub-grid td a:not(.crm-reporting-hub-delete):hover {
  color: #1559b0 !important;
  text-decoration: underline !important;
}

.crm-reporting-hub-page .crm-reporting-hub-links li,
.crm-admin-hub-page .crm-admin-hub-links li {
  margin: 0;
  border-bottom: 1px solid #f1f5f9;
}

.crm-reporting-hub-page .crm-reporting-hub-links li:last-child,
.crm-admin-hub-page .crm-admin-hub-links li:last-child {
  border-bottom: none;
}

.crm-reporting-hub-page .crm-reporting-hub-links a,
.crm-admin-hub-page .crm-admin-hub-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  color: #1a6fd4 !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
}

.crm-reporting-hub-page .crm-reporting-hub-links a:hover,
.crm-admin-hub-page .crm-admin-hub-links a:hover {
  color: #1558a8 !important;
  text-decoration: underline !important;
}

.crm-reporting-hub-page .crm-reporting-hub-links .bi,
.crm-admin-hub-page .crm-admin-hub-links .bi {
  color: #1a6fd4;
  font-size: 1.05rem;
}

.crm-reporting-hub-page .crm-reporting-hub-links a:hover .bi,
.crm-admin-hub-page .crm-admin-hub-links a:hover .bi {
  color: #1558a8;
}

/* Admin consoles (users, groups, metrics, etc.) */
.crm-admin-console-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
  color: #8a9ab0;
}

.crm-admin-console-page .form-group {
  margin-bottom: 1rem;
}

.crm-admin-console-page .form-group > label,
.crm-admin-console-page .crm-dual-list label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.crm-admin-console-page .form-control,
.crm-admin-console-page .form-select {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  color: #1e293b;
  box-shadow: none;
}

.crm-admin-console-page .form-control:focus,
.crm-admin-console-page .form-select:focus {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
}

.crm-admin-console-page .crm-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}

.crm-admin-console-page .crm-list-toolbar .crm-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}

.crm-admin-console-page .crm-list-toolbar .crm-filter-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.crm-admin-console-page .crm-list-toolbar .form-control,
.crm-admin-console-page .crm-list-toolbar .form-select,
.crm-admin-console-page .crm-list-toolbar select.form-control {
  min-height: 36px;
  font-size: 13px;
}

.crm-admin-console-page .crm-page-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Report-style live search on admin grids */
.crm-admin-console-page .crm-admin-users-grid-toolbar,
.crm-admin-console-page .crm-call-grid-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.crm-admin-console-page .crm-report-output-search {
  flex: 1 1 240px;
  max-width: 360px;
}

.crm-admin-console-page .crm-report-output-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.crm-admin-console-page .crm-report-output-search-field > .bi-search {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

.crm-admin-console-page .crm-report-output-search-input.form-control {
  height: 34px;
  font-size: 13px;
  padding: 6px 36px 6px 34px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  box-shadow: none;
}

.crm-admin-console-page .crm-report-output-search-input.form-control:focus {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
}

.crm-admin-console-page .crm-report-output-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.crm-admin-console-page .crm-report-output-search-clear:hover,
.crm-admin-console-page .crm-report-output-search-clear:focus {
  background: #f1f5f9;
  color: #0f172a;
  outline: none;
}

.crm-admin-console-page .crm-report-output-search-clear[hidden] {
  display: none !important;
}

.crm-admin-console-page .crm-call-filter-count {
  font-size: 12px;
  white-space: nowrap;
}

.crm-admin-console-page .crm-admin-user-link,
.crm-admin-console-page .crm-admin-user-link:hover {
  color: #1a6fd4 !important;
  font-weight: 500;
  text-decoration: none !important;
}

.crm-admin-console-page .crm-admin-user-link:hover {
  text-decoration: underline !important;
}

/* Buttons anywhere on admin consoles (inputs + links) */
.crm-admin-console-page .crm-btn,
.crm-admin-console-page a.crm-btn,
.crm-admin-console-page input.crm-btn,
.crm-admin-console-page button.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none !important;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.crm-admin-console-page .crm-btn-primary,
.crm-admin-console-page a.crm-btn-primary,
.crm-admin-console-page input.crm-btn-primary,
.crm-admin-console-page button.crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-admin-console-page .crm-btn-primary:hover,
.crm-admin-console-page .crm-btn-primary:focus,
.crm-admin-console-page a.crm-btn-primary:hover,
.crm-admin-console-page a.crm-btn-primary:focus,
.crm-admin-console-page input.crm-btn-primary:hover,
.crm-admin-console-page input.crm-btn-primary:focus {
  background: #1559b0 !important;
  border-color: #1559b0 !important;
  color: #fff !important;
}

.crm-admin-console-page .crm-btn-secondary:hover,
.crm-admin-console-page .crm-btn-secondary:focus,
.crm-admin-console-page a.crm-btn-secondary:hover,
.crm-admin-console-page a.crm-btn-secondary:focus,
.crm-admin-console-page input.crm-btn-secondary:hover,
.crm-admin-console-page input.crm-btn-secondary:focus {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1a1d23;
}

.crm-admin-console-page .crm-btn-ghost,
.crm-admin-console-page a.crm-btn-ghost {
  border-color: transparent !important;
  background: transparent !important;
  color: #475569 !important;
}

.crm-admin-console-page .crm-btn-ghost:hover,
.crm-admin-console-page a.crm-btn-ghost:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.crm-admin-console-page .text-danger.crm-btn,
.crm-admin-console-page .crm-btn.text-danger,
.crm-admin-console-page input.crm-btn.text-danger {
  color: #b42318 !important;
  border-color: #f1c2c2 !important;
}

.crm-admin-console-page .crm-btn-outline-primary,
.crm-admin-console-page a.crm-btn-outline-primary {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1a6fd4 !important;
}

.crm-admin-console-page .crm-btn-outline-primary:hover,
.crm-admin-console-page .crm-btn-outline-primary:focus,
.crm-admin-console-page a.crm-btn-outline-primary:hover,
.crm-admin-console-page a.crm-btn-outline-primary:focus {
  background: #dbeafe !important;
  border-color: #1a6fd4 !important;
  color: #1559b0 !important;
}

.crm-admin-console-page .crm-dual-list {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.crm-admin-console-page .crm-dual-list-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-admin-console-page .crm-dual-list select,
.crm-admin-console-page .crm-dual-list .crm-groups-userlist {
  min-height: 220px;
  width: 100%;
}

.crm-admin-console-page .crm-dual-list .crm-report-output-search,
.crm-admin-console-page .crm-dual-list .crm-report-output-search-field {
  width: 100%;
  max-width: none;
  flex: none;
}

.crm-admin-console-page .crm-dual-list .crm-report-output-search-input.form-control {
  min-height: 0;
  height: 34px !important;
  max-height: 34px;
  width: 100%;
  padding: 6px 12px 6px 34px !important;
  line-height: 1.2;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .crm-admin-console-page .crm-dual-list {
    grid-template-columns: 1fr;
  }

  .crm-admin-console-page .crm-dual-list-actions {
    flex-direction: row;
    justify-content: center;
  }
}

.crm-admin-console-page .crm-sticky-table-wrap table,
.crm-admin-console-page table.usertable,
.crm-admin-console-page .crm-admin-grid {
  width: 100%;
}

.crm-admin-console-page table.usertable thead th,
.crm-admin-console-page .crm-admin-grid thead th,
.crm-admin-console-page .crm-sticky-table-wrap thead th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 10px 12px !important;
  white-space: nowrap;
}

.crm-admin-console-page table.usertable td,
.crm-admin-console-page .crm-admin-grid td,
.crm-admin-console-page .crm-sticky-table-wrap td {
  font-size: 13px;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 12px !important;
  vertical-align: middle;
}

.crm-admin-console-page .crm-filter-navbar-legacy,
.crm-admin-console-page .navbar.filter-nav {
  display: none !important;
}

.crm-admin-console-page .crm-admin-console-tree {
  overflow-x: auto;
  max-height: 70vh;
  padding-right: 8px;
}

/* Group Admin ? searchable selects + member filters */
.crm-groups-page .card,
.crm-groups-page .card-body {
  overflow: visible;
}

.crm-groups-page .crm-groups-select-field .crm-search-select-wrap {
  max-width: 480px;
}

.crm-groups-page .crm-groups-userlist {
  min-height: 280px;
}

.crm-group-system-access-page .card,
.crm-group-system-access-page .card-body,
.crm-grouptool-page .card,
.crm-grouptool-page .card-body {
  overflow: visible;
}

.crm-group-system-access-page .crm-groups-select-field .crm-search-select-wrap,
.crm-grouptool-page .crm-groups-select-field .crm-search-select-wrap {
  max-width: 480px;
}

/* Project Admin console */
.crm-projects-admin-page .card,
.crm-projects-admin-page .card-body {
  overflow: visible;
}

.crm-projects-admin-page .crm-projects-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.crm-projects-admin-page .crm-projects-tree-panel {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}

.crm-projects-admin-page .crm-projects-tree-title {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.crm-projects-admin-page .crm-projects-tree-scroll {
  max-height: 70vh;
  overflow: auto;
  padding: 8px 10px 12px;
  background: #fff;
}

.crm-projects-admin-page .crm-projects-main {
  min-width: 0;
}

.crm-projects-admin-page .crm-projects-tabs .nav-link {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  border-radius: 999px;
  padding: 7px 14px;
}

.crm-projects-admin-page .crm-projects-tabs .nav-link.active,
.crm-projects-admin-page .crm-projects-tabs .nav-link.active:hover {
  background: #eff6ff !important;
  color: #1a6fd4 !important;
}

.crm-projects-admin-page .crm-readonly-field {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 13px;
  color: #475569;
  display: flex;
  align-items: center;
}

.crm-projects-admin-page .crm-readonly-field a {
  color: #1a6fd4 !important;
  font-weight: 500;
  text-decoration: none !important;
}

.crm-projects-admin-page .crm-readonly-field a:hover {
  text-decoration: underline !important;
}

.crm-projects-admin-page .crm-projects-subcard {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 14px 16px;
}

.crm-projects-admin-page .crm-projects-access-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.crm-projects-admin-page .crm-projects-access-grid .crm-report-output-search {
  max-width: none;
  width: 100%;
  flex: none;
}

.crm-projects-admin-page .crm-projects-access-grid .crm-report-output-search-input.form-control {
  min-height: 0;
  height: 34px !important;
  max-height: 34px;
  padding: 6px 12px 6px 34px !important;
  line-height: 1.2;
}

@media (max-width: 992px) {
  .crm-projects-admin-page .crm-projects-layout,
  .crm-projects-admin-page .crm-projects-access-grid {
    grid-template-columns: 1fr;
  }

  .crm-projects-admin-page .crm-projects-tree-scroll {
    max-height: 280px;
  }
}

.crm-admin-console-page .crm-form-actions .crm-btn,
.crm-admin-console-page .crm-form-actions input.crm-btn,
.crm-admin-console-page .crm-form-actions button.crm-btn,
.crm-admin-console-page .crm-form-actions a.crm-btn,
.crm-admin-console-page a.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.crm-admin-console-page .crm-form-actions .crm-btn-primary,
.crm-admin-console-page .crm-form-actions input.crm-btn-primary,
.crm-admin-console-page .crm-form-actions button.crm-btn-primary,
.crm-admin-console-page a.crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-admin-console-page .crm-form-actions .crm-btn-primary:hover,
.crm-admin-console-page .crm-form-actions .crm-btn-primary:focus,
.crm-admin-console-page .crm-form-actions input.crm-btn-primary:hover,
.crm-admin-console-page .crm-form-actions input.crm-btn-primary:focus,
.crm-admin-console-page a.crm-btn-primary:hover,
.crm-admin-console-page a.crm-btn-primary:focus {
  background: #1559b0 !important;
  border-color: #1559b0 !important;
  color: #fff !important;
}

.crm-admin-console-page .crm-form-actions .crm-btn-secondary:hover,
.crm-admin-console-page .crm-form-actions .crm-btn-secondary:focus,
.crm-admin-console-page .crm-form-actions input.crm-btn-secondary:hover,
.crm-admin-console-page .crm-form-actions input.crm-btn-secondary:focus,
.crm-admin-console-page a.crm-btn-secondary:hover,
.crm-admin-console-page a.crm-btn-secondary:focus {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1a1d23;
}

.crm-admin-console-page .crm-form-actions .crm-btn-danger,
.crm-admin-console-page .crm-form-actions input.crm-btn-danger,
.crm-admin-console-page .crm-form-actions button.crm-btn-danger {
  background: #fff !important;
  border-color: #f1c2c2 !important;
  color: #b42318 !important;
}

.crm-admin-console-page .crm-form-actions .crm-btn-danger:hover,
.crm-admin-console-page .crm-form-actions .crm-btn-danger:focus,
.crm-admin-console-page .crm-form-actions input.crm-btn-danger:hover,
.crm-admin-console-page .crm-form-actions input.crm-btn-danger:focus {
  background: #fef2f2 !important;
  border-color: #e8a0a0 !important;
  color: #912018 !important;
}

.crm-admin-console-page .crm-btn-sm,
.crm-admin-console-page a.crm-btn-sm,
.crm-admin-console-page input.crm-btn-sm {
  min-height: 30px;
  padding: 6px 12px !important;
  font-size: 12px !important;
}

.crm-admin-console-page .nav-pills .nav-link {
  font-size: 13px;
  font-weight: 500;
}

/* Ad Hoc Report builder (crystal/prospectreport.aspx) */
.crm-prospect-report-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
  color: #8a9ab0;
}

.crm-prospect-report-page {
  padding-bottom: 0;
}

.crm-prospect-report-page .crm-prospect-sticky-top {
  position: sticky;
  top: var(--crm-topbar-height, 52px);
  z-index: 45;
  margin: 0 0 1rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.crm-prospect-report-page .crm-prospect-sticky-top-inner {
  padding: 0.85rem 1.15rem 0.55rem;
}

.crm-prospect-report-page .crm-prospect-sticky-title {
  margin-bottom: 0.55rem;
}

.crm-prospect-report-page .crm-prospect-sticky-title .card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1d23;
}

.crm-prospect-report-page .crm-prospect-steps-body {
  padding-top: 0.65rem !important;
  padding-bottom: 0.65rem !important;
}

.crm-prospect-report-page .crm-add-form-actions {
  justify-content: flex-start !important;
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 0.75rem !important;
}

/* Match portal crm-tabs-strip: left-aligned soft tabs */
.crm-prospect-report-page .crm-prospect-steps-strip {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  border-top: 1px solid #eef2f6;
  margin: 0 -0.15rem;
  padding-top: 0.45rem;
}

.crm-prospect-report-page .crm-prospect-steps-strip .crm-tabs-list {
  gap: 2px;
  padding: 0;
  width: auto;
  max-width: 100%;
}

.crm-prospect-report-page .crm-prospect-steps-strip .crm-tabs-item {
  flex: 0 0 auto;
  min-width: 0;
}

.crm-prospect-report-page .crm-prospect-steps-strip .crm-tabs-link {
  width: auto;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #64748b !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em;
  box-shadow: none !important;
  text-decoration: none !important;
}

.crm-prospect-report-page .crm-prospect-steps-strip .crm-tabs-link:hover {
  color: #334155 !important;
  background: #f8fafc !important;
  border-color: transparent !important;
}

.crm-prospect-report-page .crm-prospect-steps-strip .crm-tabs-link.is-selected,
.crm-prospect-report-page .crm-prospect-steps-strip .crm-tabs-link.active {
  color: #1a1d23 !important;
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  font-weight: 600 !important;
}

.crm-prospect-report-page .crm-prospect-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.crm-prospect-report-page .crm-prospect-steps-strip .crm-tabs-link.is-selected .crm-prospect-step-num,
.crm-prospect-report-page .crm-prospect-steps-strip .crm-tabs-link.active .crm-prospect-step-num {
  background: #1a6fd4;
  color: #fff;
}

.crm-prospect-report-page .crm-prospect-step-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .crm-prospect-report-page .crm-prospect-steps-strip .crm-tabs-list {
    width: 100%;
  }
}

.crm-prospect-report-page .crm-prospect-col-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
  padding-left: 40px;
}

.crm-prospect-report-page .crm-prospect-fields-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-prospect-report-page .crm-prospect-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #f1f5f9;
}

.crm-prospect-report-page .crm-prospect-drag {
  flex: 0 0 28px;
  color: #94a3b8;
  cursor: move;
  text-align: center;
}

.crm-prospect-report-page .crm-prospect-drag .icon-move {
  font-size: 1.1rem;
}

.crm-prospect-report-page .crm-prospect-field-control {
  flex: 1 1 auto;
  min-width: 0;
}

.crm-prospect-report-page .crm-prospect-field-control .bootstrap-select,
.crm-prospect-report-page .crm-prospect-field-control .form-control {
  width: 100% !important;
  max-width: 100%;
}

/* Custom searchable select ? shared (prospect report, aiba, etc.) */
.crm-search-select-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.crm-prospect-report-page .crm-prospect-table .crm-search-select-wrap {
  max-width: 420px;
}

select.crm-search-select.crm-search-select-native {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.crm-search-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #1a1d23;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.crm-search-select-toggle:hover {
  border-color: #cbd5e1;
}

.crm-search-select-wrap.is-open .crm-search-select-toggle {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
}

.crm-search-select-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-search-select-label.is-placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.crm-search-select-caret {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 4px 0 4px;
  border-color: #64748b transparent transparent transparent;
}

.crm-search-select-wrap.is-open .crm-search-select-caret {
  border-width: 0 4px 5px 4px;
  border-color: transparent transparent #64748b transparent;
}

.crm-prospect-report-page .table-responsive {
  overflow: visible !important;
}

.crm-prospect-report-page .card,
.crm-prospect-report-page .card-body {
  overflow: visible;
}

/* Panel is portaled to <body> ? keep styles unscoped so background isn't transparent */
.crm-search-select-panel {
  background: #fff !important;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}

.crm-search-select-filter {
  display: block;
  width: 100%;
  border: none !important;
  border-bottom: 1px solid #eef2f6 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 13px;
  color: #1a1d23;
}

.crm-search-select-options {
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
}

.crm-search-select-option {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #1e293b;
  background: #fff;
  cursor: pointer;
}

.crm-search-select-option:hover {
  background: #f1f5f9;
}

.crm-search-select-option.is-selected {
  background: #eff6ff;
  color: #1a6fd4;
  font-weight: 600;
}

.crm-search-select-option.is-disabled {
  opacity: 0.5;
  cursor: default;
}

.crm-search-select-empty {
  padding: 10px;
  color: #94a3b8;
  font-size: 13px;
  background: #fff;
}

.crm-prospect-report-page .crm-prospect-row-actions {
  flex: 0 0 auto;
  white-space: nowrap;
}

.crm-prospect-report-page .crm-prospect-delete,
.crm-prospect-report-page a.crm-prospect-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid #f0d4d4;
  background: #fffafa;
  color: #d13232 !important;
  text-decoration: none !important;
  cursor: pointer;
  box-sizing: border-box;
  vertical-align: middle;
}

.crm-prospect-report-page .crm-prospect-delete .bi,
.crm-prospect-report-page a.crm-prospect-delete .bi {
  color: #d13232 !important;
  font-size: 12px;
  line-height: 1;
}

.crm-prospect-report-page .crm-prospect-delete:hover,
.crm-prospect-report-page a.crm-prospect-delete:hover {
  background: #fdeaea !important;
  border-color: #f5c4c4 !important;
  color: #d13232 !important;
  text-decoration: none !important;
}

.crm-prospect-report-page .crm-prospect-table {
  width: 100%;
  margin-bottom: 0;
}

.crm-prospect-report-page .crm-prospect-table thead th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 12px;
  vertical-align: middle;
}

.crm-prospect-report-page .crm-prospect-table td {
  font-size: 13px;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  padding: 12px;
  vertical-align: middle;
}

.crm-prospect-report-page .crm-prospect-err {
  color: #b42318;
  font-size: 13px;
}

.crm-prospect-report-page .crm-prospect-save-panel {
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.crm-prospect-report-page .crm-prospect-access {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.crm-prospect-report-page .crm-prospect-access label {
  margin: 0 !important;
  font-weight: 500;
  color: #1e293b;
}

.crm-prospect-report-page .crm-add-form-actions .crm-btn-danger,
.crm-prospect-report-page .crm-add-form-actions input.crm-btn-danger {
  background: #fff !important;
  border-color: #f1c2c2 !important;
  color: #b42318 !important;
}

.crm-prospect-report-page .crm-add-form-actions .crm-btn-danger:hover,
.crm-prospect-report-page .crm-add-form-actions input.crm-btn-danger:hover {
  background: #fef2f2 !important;
  border-color: #e8a0a0 !important;
  color: #912018 !important;
}

body.dragging,
body.dragging * {
  cursor: move !important;
}

.crm-prospect-report-page .dragged {
  position: absolute;
  opacity: 0.5;
  z-index: 2000;
}

.crm-prospect-report-page .placeholder {
  height: 56px;
  padding-top: 12px;
  padding-bottom: 12px;
  line-height: 1.2em;
  border-top: 1px dashed #cbd5e1;
}

/* Report preview popup (crystal/ReportPreview.aspx) */
.crm-report-preview-page {
  background: #f5f7fa;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}

.crm-report-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 40;
}

.crm-report-preview-toolbar .crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  cursor: pointer;
  box-sizing: border-box;
}

.crm-report-preview-toolbar .crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-report-preview-toolbar .crm-btn-primary:hover {
  background: #1559b0 !important;
  border-color: #1559b0 !important;
}

.crm-report-preview-toolbar .crm-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1a1d23;
}

.crm-report-preview-shell {
  padding: 16px 20px 28px;
  max-width: 100%;
}

.crm-report-preview-page .card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  background: #fff;
}

.crm-report-preview-page .card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.875rem 1.25rem;
}

.crm-report-preview-page .card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1d23;
  margin: 0;
}

.crm-report-preview-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
  color: #8a9ab0;
}

.crm-report-preview-count {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.crm-report-preview-page .crm-report-preview-grid,
.crm-report-preview-page .crm-report-preview-grid .rgMasterTable {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
}

.crm-report-preview-page .crm-report-preview-grid .rgHeader,
.crm-report-preview-page .crm-report-preview-grid th {
  position: sticky;
  top: 0;
  z-index: 20;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 10px 12px !important;
}

.crm-report-preview-page .crm-report-preview-grid .rgHeader a,
.crm-report-preview-page .crm-report-preview-grid th a {
  color: #64748b !important;
  text-decoration: none !important;
  font-weight: 700;
}

.crm-report-preview-page .crm-report-preview-grid td {
  font-size: 13px;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 10px 12px !important;
  vertical-align: middle;
}

@media print {
  .crm-report-preview-page .no-print,
  .crm-report-preview-toolbar {
    display: none !important;
  }

  .crm-report-preview-shell {
    padding: 0;
  }

  .crm-report-preview-page .card {
    border: none;
    box-shadow: none;
  }
}

/* Report output (crystal/reportoutput.aspx) */
.crm-report-output-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
  color: #8a9ab0;
}

.crm-report-output-page .crm-report-output-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.crm-report-output-page .crm-report-output-search {
  flex: 1 1 280px;
  max-width: 360px;
}

.crm-report-output-page .crm-report-output-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.crm-report-output-page .crm-report-output-search-field > .bi-search {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

.crm-report-output-page .crm-report-output-search-input.form-control {
  height: 38px;
  font-size: 13px;
  padding: 8px 36px 8px 34px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  box-shadow: none;
}

.crm-report-output-page .crm-report-output-search-input.form-control:focus {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
}

.crm-report-output-page .crm-report-output-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.crm-report-output-page .crm-report-output-search-clear:hover,
.crm-report-output-page .crm-report-output-search-clear:focus {
  background: #f1f5f9;
  color: #0f172a;
  outline: none;
}

.crm-report-output-page .crm-report-output-search-clear[hidden] {
  display: none !important;
}

.crm-report-output-page .crm-report-output-hint {
  font-size: 12px;
}

/* overflow:visible so sticky headers work against the page (not a nested scroller) */
.crm-report-output-page .crm-report-output-grid-wrap {
  overflow: visible;
  width: 100%;
}

.crm-report-output-page .crm-report-output-grid,
.crm-report-output-page .crm-report-output-grid .rgMasterTable {
  width: 100% !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  table-layout: auto;
}

.crm-report-output-page .crm-report-output-grid .rgMasterTable > tbody > tr > td,
.crm-report-output-page .crm-report-output-grid .rgMasterTable > thead > tr > th,
.crm-report-output-page .crm-report-output-grid .rgHeader {
  box-sizing: border-box;
  padding: 10px 12px !important;
  vertical-align: middle;
  border-left: none !important;
  border-right: none !important;
}

.crm-report-output-page .crm-report-output-grid .rgHeader,
.crm-report-output-page .crm-report-output-grid th.rgHeader {
  position: sticky;
  top: var(--crm-topbar-height, 52px);
  z-index: 30;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b !important;
  background: #f8fafc !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 0 #e2e8f0;
}

.crm-report-output-page .crm-report-output-grid .rgHeader a,
.crm-report-output-page .crm-report-output-grid th.rgHeader a {
  color: #64748b !important;
  text-decoration: none !important;
  font-weight: 700;
}

.crm-report-output-page .crm-report-output-grid td {
  font-size: 13px;
  color: #1e293b;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.crm-report-output-page .crm-report-output-grid .rgRow td,
.crm-report-output-page .crm-report-output-grid .rgAltRow td,
.crm-report-output-page .crm-report-output-grid .rgRow,
.crm-report-output-page .crm-report-output-grid .rgAltRow {
  background: #fff !important;
}


/* ===== Project Request Manager (ProjectRequestMGR.aspx) ===== */
.crm-project-request-mgr-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
  color: #8a9ab0;
}

.crm-project-request-mgr-page .crm-project-request-mgr-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin-bottom: 1rem;
}

.crm-project-request-mgr-page .crm-project-request-mgr-field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  margin: 0;
  min-width: 160px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a9ab0;
}

.crm-project-request-mgr-page .crm-project-request-mgr-field .crm-filter-select,
.crm-project-request-mgr-page .crm-project-request-mgr-field .crm-filter-input,
.crm-project-request-mgr-page .crm-project-request-mgr-field .crm-search-select-wrap {
  width: 100%;
  min-width: 160px;
  max-width: 240px;
  text-transform: none;
  font-weight: 400;
  letter-spacing: normal;
  color: #1e293b;
}

.crm-project-request-mgr-page .crm-project-request-mgr-field .crm-search-select-wrap {
  min-width: 200px;
  max-width: 280px;
}

.crm-project-request-mgr-page .crm-project-request-mgr-msg {
  display: block;
  margin: 0 0 12px;
  font-size: 14px;
  color: #64748b;
}

.crm-project-request-mgr-page .crm-project-request-mgr-msg:empty {
  display: none;
}

.crm-project-request-mgr-page .crm-project-request-mgr-grid-wrap {
  overflow: visible;
  width: 100%;
}

.crm-project-request-mgr-page .crm-project-request-mgr-grid,
.crm-project-request-mgr-page .crm-project-request-mgr-grid table {
  width: 100% !important;
  border-collapse: collapse !important;
}

.crm-project-request-mgr-page .crm-project-request-mgr-grid th,
.crm-project-request-mgr-page .crm-project-request-mgr-grid .crm-project-request-mgr-head th,
.crm-project-request-mgr-page .crm-project-request-mgr-grid td {
  box-sizing: border-box;
  padding: 10px 12px !important;
  vertical-align: middle;
  border-left: none !important;
  border-right: none !important;
}

.crm-project-request-mgr-page .crm-project-request-mgr-grid th,
.crm-project-request-mgr-page .crm-project-request-mgr-grid .crm-project-request-mgr-head th,
.crm-project-request-mgr-page .crm-project-request-mgr-grid .crm-project-request-mgr-head td {
  position: sticky;
  top: var(--crm-topbar-height, 52px);
  z-index: 20;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 0 #e2e8f0;
}

.crm-project-request-mgr-page .crm-project-request-mgr-grid td {
  font-size: 13px;
  color: #1e293b;
  border-top: none !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: #fff !important;
}

.crm-project-request-mgr-page .crm-project-request-mgr-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

/* ===== Project Request (ProjectRequest.aspx) ===== */
.crm-project-request-page .form-group {
  overflow: visible;
}

.crm-project-request-page .form-group > label,
.crm-project-request-page .form-group > label.sumboxheader,
.crm-project-request-page .crm-project-request-table .form-group > label,
.crm-project-request-page label.sumboxheader {
  display: block !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  letter-spacing: 0.02em !important;
  line-height: 1.3 !important;
  margin-bottom: 0.35rem !important;
  text-transform: none !important;
}

.crm-project-request-page .form-group > label .validator,
.crm-project-request-page .form-group > label span.validator {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.crm-project-request-page .card {
  overflow: visible;
}

.crm-project-request-page .crm-project-request-table {
  width: 100%;
}

.crm-project-request-page .crm-project-request-table td {
  padding: 0.35rem 0.5rem 0.75rem 0;
  vertical-align: top;
}

.crm-project-request-page .crm-project-request-search-link {
  display: inline-flex;
  margin-top: 0.5rem;
}

.crm-project-request-page .crm-project-request-rbl-group {
  margin-bottom: 0.5rem;
}

.crm-project-request-page .crm-project-request-rbl-label {
  display: block;
  margin: 0 0 0.65rem;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.crm-project-request-page table.crm-project-request-rbl {
  width: 100%;
  max-width: 100%;
  border: 0 !important;
  border-collapse: separate;
  border-spacing: 0 6px;
  margin: 0;
}

.crm-project-request-page table.crm-project-request-rbl tr,
.crm-project-request-page table.crm-project-request-rbl td {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  vertical-align: middle;
}

.crm-project-request-page table.crm-project-request-rbl td {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 10px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px;
  background: #fff !important;
  cursor: pointer;
}

.crm-project-request-page table.crm-project-request-rbl td:hover {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
}

.crm-project-request-page table.crm-project-request-rbl input[type="radio"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0 !important;
  accent-color: #1a6fd4;
  cursor: pointer;
}

.crm-project-request-page table.crm-project-request-rbl label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.3;
  cursor: pointer;
}

/* Project status color squares */
.crm-project-request-page table.crm-project-status-rbl label::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  border-radius: 2px;
  flex: 0 0 auto;
  background: #94a3b8;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.crm-project-request-page table.crm-project-status-rbl input[value="1"] + label::before { background: #ffcc00; }
.crm-project-request-page table.crm-project-status-rbl input[value="2"] + label::before { background: #4caf50; }
.crm-project-request-page table.crm-project-status-rbl input[value="3"] + label::before { background: #0678BC; }
.crm-project-request-page table.crm-project-status-rbl input[value="4"] + label::before { background: #ff0000; }
.crm-project-request-page table.crm-project-status-rbl input[value="5"] + label::before { background: #8c1aff; }
.crm-project-request-page table.crm-project-status-rbl input[value="6"] + label::before { background: #1c7710; }
.crm-project-request-page table.crm-project-status-rbl input[value="7"] + label::before { background: #000000; }
.crm-project-request-page table.crm-project-status-rbl input[value="8"] + label::before { background: #808080; }

.crm-project-request-page .modal-full {
  min-width: 90vw;
  height: 75vh;
  margin: 30px auto !important;
}

.crm-project-request-page .modal-full .modal-content {
  min-height: 75vh;
}

.crm-project-request-page .modal-frame {
  width: 100%;
  height: 75vh !important;
}

.crm-project-request-page .crm-tabs-strip {
  margin-top: 0;
}

.crm-project-request-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
  color: #8a9ab0;
}

.crm-project-request-page .crm-project-request-table small,
.crm-project-request-page .crm-project-request-table .text-muted {
  color: #8a9ab0;
  font-size: 12px;
}

.crm-project-request-page input[type="file"] {
  max-width: 100%;
  font-size: 13px;
}

.crm-project-request-page .crm-add-form-actions input.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.crm-project-request-page .crm-add-form-actions input.crm-btn-primary {
  background: #1a6fd4 !important;
  border: 1px solid #1a6fd4 !important;
  color: #fff !important;
}

.crm-project-request-page .crm-add-form-actions input.crm-btn-secondary {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

/* Guest file download (file_download2.aspx) */
.crm-download-page {
  background: #f5f7fa;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}

.crm-download-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 16px 48px;
}

.crm-download-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  background: #fff;
  overflow: hidden;
}

.crm-download-page .card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.25rem 1.5rem;
}

.crm-download-brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a6fd4;
  margin-bottom: 6px;
}

.crm-download-page .card-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1d23;
  line-height: 1.25;
}

.crm-download-page .crm-card-sub {
  font-size: 13px;
  margin-top: 4px;
  color: #8a9ab0;
}

.crm-download-page .card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.crm-download-meta {
  display: grid;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.crm-download-meta-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: start;
}

.crm-download-meta-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  padding-top: 2px;
}

.crm-download-meta-value {
  font-size: 14px;
  color: #1e293b;
  word-break: break-word;
}

.crm-download-files-hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 8px;
  border-top: 1px solid #eef2f7;
  padding-top: 16px;
}

.crm-download-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.crm-download-file-list li + li {
  border-top: 1px solid #eef2f7;
}

.crm-download-file-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  text-decoration: none !important;
  color: #1a1d23;
  transition: background 0.12s ease;
}

.crm-download-file-link:hover {
  background: #f8fafc;
  color: #1a6fd4;
}

.crm-download-file-link .bi-download {
  color: #1a6fd4;
  font-size: 15px;
  flex: 0 0 auto;
}

.crm-download-file-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  word-break: break-word;
}

.crm-download-file-size {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
}

.crm-download-expired {
  text-align: center;
  padding: 1.5rem 0.5rem 0.75rem;
}

.crm-download-expired-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.crm-download-expired-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1d23;
  margin: 0 0 8px;
}

.crm-download-expired-hint {
  font-size: 14px;
  color: #8a9ab0;
  margin: 0;
  line-height: 1.45;
}

@media (max-width: 575.98px) {
  .crm-download-shell {
    padding: 20px 12px 32px;
  }

  .crm-download-meta-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Facility Call Report (homepage_call.aspx) */
.crm-call-report-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
}

.crm-call-report-page .card-header {
  overflow: visible;
}

.crm-call-report-page .crm-call-kpi-strip {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  gap: 12px !important;
  grid-template-columns: none !important;
}

.crm-call-report-page .crm-call-kpi-strip .crm-kpi-tile {
  flex: 1 1 0;
  min-width: 0;
}

.crm-call-report-page .crm-call-kpi-strip .crm-kpi-val-total {
  color: #1a1d23 !important;
}

.crm-call-report-page .crm-page-header-actions {
  flex: 0 0 auto;
  width: auto;
}

.crm-call-report-page .crm-call-filter-dd {
  position: relative;
  display: inline-block;
  width: auto;
  flex: 0 0 auto;
}

.crm-call-report-page .crm-call-filter-dd .dropdown-menu.crm-call-filter-menu {
  position: absolute;
  inset: auto auto auto 0;
  width: max-content;
  min-width: 220px;
  max-width: 300px;
  max-height: 320px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  z-index: 1050;
}

.crm-call-report-page .crm-call-filter-all {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 0 8px !important;
  padding: 4px 6px 8px !important;
  border-bottom: 1px solid #eef2f6;
  font-size: 13px;
  font-weight: 600;
  color: #1a1d23;
  border-radius: 6px;
  cursor: pointer;
}

.crm-call-report-page .crm-call-filter-all:hover {
  background: #f1f5f9;
}

.crm-call-report-page .crm-call-filter-all > span:not(.crm-call-select-all-txt) {
  display: contents !important;
}

.crm-call-report-page .crm-call-filter-all input[type="checkbox"],
.crm-call-report-page .crm-call-filter-menu .crm-call-filter-all input[type="checkbox"] {
  flex: 0 0 auto !important;
  margin: 0 !important;
  margin-right: 0 !important;
  width: 16px !important;
  height: 16px !important;
}

.crm-call-report-page .crm-call-filter-all .crm-call-select-all-txt {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #1a1d23 !important;
  line-height: 1.3;
  white-space: nowrap;
}

.crm-call-report-page .crm-call-filter-all label {
  display: none !important;
}

.crm-call-report-page .crm-call-filter-list {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  border-collapse: collapse !important;
}

.crm-call-report-page .crm-call-filter-list tbody,
.crm-call-report-page .crm-call-filter-list tr {
  display: block !important;
  width: 100% !important;
  border: 0 !important;
}

.crm-call-report-page .crm-call-filter-list tr {
  margin: 0 !important;
}

.crm-call-report-page .crm-call-filter-list tr:last-child {
  margin-bottom: 0 !important;
}

.crm-call-report-page .crm-call-filter-list td {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: auto !important;
  padding: 4px 6px !important;
  border: 0 !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  transition: background 0.12s ease;
}

.crm-call-report-page .crm-call-filter-list tr:hover td,
.crm-call-report-page .crm-call-filter-list td:hover {
  background: #f1f5f9 !important;
}

.crm-call-report-page .crm-call-filter-list label,
.crm-call-report-page .crm-call-filter-menu .crm-call-filter-list label {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #1a1d23 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
}

.crm-call-report-page .crm-call-filter-menu input[type="checkbox"] {
  flex: 0 0 auto;
  display: inline-block !important;
  float: none !important;
  margin: 0 !important;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  accent-color: #1a6fd4;
}

.crm-call-report-page .crm-call-tools,
.crm-call-report-page .crm-call-hidden-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.crm-call-report-page .card:has(.crm-call-grid-wrap) {
  overflow: visible;
}

.crm-call-report-page .crm-call-grid-wrap {
  overflow: visible;
  max-width: 100%;
}

.crm-call-report-page .crm-call-grid {
  margin: 0;
  width: 100%;
  font-size: 12px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.crm-call-report-page .crm-call-grid th,
.crm-call-report-page .crm-call-grid td {
  padding: 8px 8px;
  vertical-align: top;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  line-height: 1.35;
}

.crm-call-report-page .crm-call-grid th {
  position: sticky;
  top: var(--crm-accounting-thead-sticky-top, 52px);
  z-index: 20;
  background: #f8fafc !important;
  background-clip: padding-box;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border-top: none !important;
  border-bottom: none;
  vertical-align: bottom;
  box-shadow:
    0 -3px 0 0 #f8fafc,
    0 1px 0 0 #e2e8f0;
}

.crm-call-report-page .crm-call-grid th a {
  color: inherit !important;
  text-decoration: none !important;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.crm-call-report-page .crm-call-grid td {
  border-bottom: 1px solid #f1f5f9;
  color: #1a1d23;
}

.crm-call-report-page .crm-call-grid th.crm-call-col-xs,
.crm-call-report-page .crm-call-grid td.crm-call-col-xs {
  text-align: center;
}

.crm-call-report-page .crm-call-remarks {
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1.35;
  font-size: 12px;
  color: #1a1d23;
}

.crm-call-report-page .crm-call-grid tr:hover td {
  background: #f8fbff;
}

.crm-call-report-page .crm-call-facility-link {
  color: #1a6fd4 !important;
  font-weight: 600;
  text-decoration: none !important;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

.crm-call-report-page .crm-call-facility-link:hover {
  text-decoration: underline !important;
}

.crm-call-report-page .crm-call-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.crm-call-report-page .crm-call-grid .crm-chip {
  white-space: nowrap;
  max-width: 100%;
}

.crm-call-report-page .crm-call-grid .crm-chip::before {
  content: none;
}

.crm-call-report-page .crm-chip.crm-call-status-1 { background: #fef3dc; color: #c48d30; }
.crm-call-report-page .crm-chip.crm-call-status-2 { background: #e6f7ef; color: #1a9e5f; }
.crm-call-report-page .crm-chip.crm-call-status-3 { background: #e8f0fb; color: #1a6fd4; }
.crm-call-report-page .crm-chip.crm-call-status-4 { background: #fdeaea; color: #d13232; }
.crm-call-report-page .crm-chip.crm-call-status-5 { background: #f0ecfb; color: #6348e0; }
.crm-call-report-page .crm-chip.crm-call-status-6 { background: #e3f5f7; color: #348f6a; }

.crm-dealer-history-page .crm-dealer-history-kpi {
  display: flex !important;
  flex-wrap: nowrap !important;
  grid-template-columns: none !important;
}

.crm-dealer-history-page .crm-dealer-history-kpi .crm-kpi-tile {
  flex: 1 1 0;
  min-width: 0;
}

.crm-call-report-page .crm-call-grid-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.crm-call-report-page .crm-call-grid-toolbar-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-call-report-page .crm-call-grid-toolbar-actions .crm-btn,
.crm-call-report-page .crm-call-grid-toolbar-actions a.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px !important;
  border-radius: 6px;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none !important;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  box-shadow: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.crm-call-report-page .crm-call-grid-toolbar-actions .crm-btn-secondary:hover,
.crm-call-report-page .crm-call-grid-toolbar-actions .crm-btn-secondary:focus {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #1a1d23;
}

.crm-call-report-page .crm-call-grid-toolbar-actions .crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-call-report-page .crm-call-grid-toolbar-actions .crm-btn-primary:hover,
.crm-call-report-page .crm-call-grid-toolbar-actions .crm-btn-primary:focus {
  background: #1559b0 !important;
  border-color: #1559b0 !important;
  color: #fff !important;
}

.crm-call-report-page .crm-call-grid-toolbar-actions .crm-btn .bi {
  font-size: 14px;
  line-height: 1;
}

.crm-call-report-page .crm-call-grid-search {
  flex: 0 1 320px;
  min-width: 220px;
  max-width: 360px;
}

.crm-call-report-page .crm-report-output-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.crm-call-report-page .crm-report-output-search-field > .bi-search {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

.crm-call-report-page .crm-report-output-search-input.form-control {
  height: 34px;
  font-size: 13px;
  padding: 6px 36px 6px 34px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #1e293b;
  box-shadow: none;
}

.crm-call-report-page .crm-report-output-search-input.form-control:focus {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
}

.crm-call-report-page .crm-report-output-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.crm-call-report-page .crm-report-output-search-clear:hover,
.crm-call-report-page .crm-report-output-search-clear:focus {
  background: #f1f5f9;
  color: #0f172a;
  outline: none;
}

.crm-call-report-page .crm-report-output-search-clear[hidden] {
  display: none !important;
}

.crm-call-report-page .crm-call-filter-count {
  font-size: 12px;
  white-space: nowrap;
}


/* As Builts report date range */
.crm-asbuilts-page .crm-asbuilts-date-range {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-asbuilts-page .crm-asbuilts-date-lbl {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.crm-asbuilts-page .crm-asbuilts-date-sep {
  color: #94a3b8;
  font-size: 13px;
}

.crm-asbuilts-page .crm-asbuilts-date {
  width: 150px;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #1a1d23;
}

/* ===== Project Requests (rq_projna / requests + requestUC) ===== */
.crm-requests-page .crm-card-sub,
.crm-requests-uc .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
  color: #8a9ab0;
}

.crm-requests-error {
  display: block;
  margin: 0 0 12px;
  color: #b91c1c;
  font-size: 14px;
  font-weight: 600;
}

.crm-requests-error:empty { display: none; }

.crm-requests-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  margin-bottom: 1rem;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.crm-requests-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  min-width: 140px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a9ab0;
}

.crm-requests-filter-field .crm-filter-select,
.crm-requests-filter-field .crm-filter-input {
  min-width: 150px;
  max-width: 220px;
  text-transform: none;
  font-weight: 400;
  letter-spacing: normal;
  color: #1e293b;
}

.crm-requests-filter-actions {
  display: flex;
  align-items: flex-end;
  padding-bottom: 1px;
}

.crm-requests-table-wrap {
  overflow: visible !important;
  width: 100%;
}

.crm-requests-page {
  /* Sit below fixed topbar + sticky project tab row */
  --crm-requests-thead-sticky-top: calc(var(--crm-topbar-height, 52px) + var(--crm-project-toolbar-sticky-h, 64px));
}

.crm-requests-page .card,
.crm-requests-page .card-body,
.crm-requests-page .dataTables_wrapper,
.crm-requests-uc .card,
.crm-requests-uc .card-body,
.crm-requests-uc .dataTables_wrapper {
  overflow: visible !important;
}

.crm-requests-page .crm-requests-table,
.crm-requests-uc .crm-requests-table {
  width: 100% !important;
  margin: 0;
  border-collapse: separate !important;
  border-spacing: 0;
}

.crm-requests-page .crm-requests-table thead th,
.crm-requests-uc .crm-requests-table thead th {
  position: sticky !important;
  top: var(--crm-requests-thead-sticky-top, calc(var(--crm-topbar-height, 52px) + 64px)) !important;
  z-index: 30;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 0 #e2e8f0;
  padding: 10px 12px !important;
  white-space: nowrap;
  vertical-align: middle;
}

.crm-requests-page .crm-requests-table tbody td,
.crm-requests-uc .crm-requests-table tbody td {
  font-size: 13px;
  color: #1e293b;
  padding: 10px 12px !important;
  vertical-align: middle;
  border-top: none !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: #fff !important;
}

.crm-requests-page .crm-requests-table tbody tr:hover td,
.crm-requests-uc .crm-requests-table tbody tr:hover td {
  background: #f8fafc !important;
}

.crm-requests-subtype {
  margin-top: 2px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.crm-requests-subtype:empty { display: none; }

.crm-requests-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f0fb;
  color: #1a6fd4;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.crm-action-btn.crm-action-btn-danger,
a.crm-action-btn.crm-action-btn-danger,
.crm-row-actions .crm-action-btn-danger {
  color: #dc2626 !important;
  border-color: #fecaca !important;
}

.crm-action-btn.crm-action-btn-danger:hover,
a.crm-action-btn.crm-action-btn-danger:hover,
.crm-row-actions .crm-action-btn-danger:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
}

.crm-requests-dt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.crm-requests-page .dataTables_filter label,
.crm-requests-uc .dataTables_filter label {
  margin: 0;
  font-size: 0;
}

.crm-requests-page .dataTables_filter input,
.crm-requests-uc .dataTables_filter input {
  min-width: 220px;
  height: 34px;
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  background: #fff;
}

.crm-requests-page .dataTables_info,
.crm-requests-uc .dataTables_info {
  font-size: 13px;
  color: #64748b;
  padding: 0 !important;
}


/* Shared CRM tables (activity logs on SDR / travel / task detail views) */
.crm-sdr-log .card-body,
.crm-travel-log .card-body,
.crm-task-log .card-body {
  padding: 0;
}

.crm-sdr-log .table-responsive,
.crm-travel-log .table-responsive,
.crm-task-log .table-responsive,
.crm-files-travel .table-responsive {
  margin: 0;
}

.crm-page table.crm-table,
.crm-files-sdr table.crm-table,
.crm-files-travel table.crm-table,
.crm-files-task table.crm-table,
.crm-sdr-log table.crm-table,
.crm-travel-log table.crm-table,
.crm-task-log table.crm-table {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0;
  background: #fff;
}

.crm-page table.crm-table thead th,
.crm-files-sdr table.crm-table thead th,
.crm-files-travel table.crm-table thead th,
.crm-files-task table.crm-table thead th,
.crm-sdr-log table.crm-table thead th,
.crm-travel-log table.crm-table thead th,
.crm-task-log table.crm-table thead th {
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b !important;
  background: #f8fafc !important;
  border-top: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 10px 16px !important;
  white-space: nowrap;
  vertical-align: middle;
}

.crm-page table.crm-table tbody td,
.crm-files-sdr table.crm-table tbody td,
.crm-files-travel table.crm-table tbody td,
.crm-files-task table.crm-table tbody td,
.crm-sdr-log table.crm-table tbody td,
.crm-travel-log table.crm-table tbody td,
.crm-task-log table.crm-table tbody td {
  font-size: 14px !important;
  color: #0f172a !important;
  padding: 12px 16px !important;
  vertical-align: top;
  border-top: none !important;
  border-bottom: 1px solid #eef2f7 !important;
  background: #fff !important;
}

.crm-page table.crm-table tbody tr:last-child td,
.crm-files-sdr table.crm-table tbody tr:last-child td,
.crm-files-travel table.crm-table tbody tr:last-child td,
.crm-files-task table.crm-table tbody tr:last-child td,
.crm-sdr-log table.crm-table tbody tr:last-child td,
.crm-travel-log table.crm-table tbody tr:last-child td,
.crm-task-log table.crm-table tbody tr:last-child td {
  border-bottom: none !important;
}

.crm-page table.crm-table tbody tr:hover td,
.crm-files-sdr table.crm-table tbody tr:hover td,
.crm-files-travel table.crm-table tbody tr:hover td,
.crm-files-task table.crm-table tbody tr:hover td,
.crm-sdr-log table.crm-table tbody tr:hover td,
.crm-travel-log table.crm-table tbody tr:hover td,
.crm-task-log table.crm-table tbody tr:hover td {
  background: #f8fafc !important;
}

.crm-page table.crm-table .crm-log-status,
.crm-sdr-log .crm-log-status,
.crm-travel-log .crm-log-status,
.crm-task-log .crm-log-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f0fb;
  color: #1a6fd4;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.crm-page table.crm-table a.crm-table-link,
.crm-task-log a.crm-table-link {
  color: #1a6fd4;
  font-weight: 600;
  text-decoration: none;
}

.crm-page table.crm-table a.crm-table-link:hover,
.crm-task-log a.crm-table-link:hover {
  color: #1557a8;
  text-decoration: underline;
}

/* ===== DFD request pages (req_view / req_list / req_add / req_edit) ===== */
.crm-page.crm-dfd-page {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}

.crm-page.crm-dfd-page .crm-dfd-heading {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.crm-page.crm-dfd-page .crm-card-sub {
  font-size: 13px;
  color: #64748b;
}

.crm-page.crm-dfd-page .crm-dfd-empty {
  display: block;
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
}

.crm-dfd-read-card {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  margin-bottom: 16px;
  overflow: hidden;
}

.crm-dfd-read-header {
  background: #fff !important;
  border-bottom: 1px solid #eef2f7 !important;
  padding: 14px 18px;
}

.crm-dfd-read-title {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 650 !important;
  color: #0f172a !important;
  line-height: 1.35;
}

.crm-dfd-read-body {
  padding: 18px;
}

.crm-dfd-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
}

@media (max-width: 768px) {
  .crm-dfd-grid {
    grid-template-columns: 1fr;
  }
}

.crm-dfd-field {
  min-width: 0;
}

.crm-dfd-field-wide {
  grid-column: 1 / -1;
}

.crm-dfd-label {
  display: block;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.crm-dfd-label span {
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
  text-transform: inherit;
  letter-spacing: inherit;
}

.crm-dfd-val {
  display: block;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  line-height: 1.45;
}

.crm-dfd-val span,
.crm-dfd-val label {
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}

.crm-dfd-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
}

.crm-dfd-section-title {
  margin: 0 0 12px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

.crm-dfd-section-title span {
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}

.crm-dfd-comment {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}

.crm-dfd-comment-meta {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
}

.crm-dfd-comment-body {
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  line-height: 1.45;
}

.crm-dfd-comment-form {
  margin-top: 8px;
}

.crm-dfd-comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.crm-dfd-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-dfd-file-list li {
  padding: 4px 0;
}

.crm-page.crm-dfd-page .crm-dfd-attach-list,
.crm-dfd-read-card .crm-dfd-attach-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.crm-page.crm-dfd-page .crm-dfd-attach-item,
.crm-dfd-read-card .crm-dfd-attach-item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #eef2f7;
}

.crm-page.crm-dfd-page .crm-dfd-attach-item:last-child,
.crm-dfd-read-card .crm-dfd-attach-item:last-child {
  border-bottom: 0;
}

.crm-page.crm-dfd-page .crm-dfd-attach-link,
.crm-dfd-read-card .crm-dfd-attach-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none !important;
  color: #0f172a !important;
  min-width: 0;
}

.crm-page.crm-dfd-page .crm-dfd-attach-link:hover,
.crm-page.crm-dfd-page .crm-dfd-attach-link:focus-visible,
.crm-dfd-read-card .crm-dfd-attach-link:hover,
.crm-dfd-read-card .crm-dfd-attach-link:focus-visible {
  background: #f8fafc;
}

.crm-page.crm-dfd-page .crm-dfd-attach-icon,
.crm-dfd-read-card .crm-dfd-attach-icon {
  flex: 0 0 auto;
  font-size: 16px;
  color: #1a6fd4;
  line-height: 1;
}

.crm-page.crm-dfd-page .crm-dfd-attach-name,
.crm-dfd-read-card .crm-dfd-attach-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-page.crm-dfd-page .crm-dfd-attach-size,
.crm-dfd-read-card .crm-dfd-attach-size {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 650;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 3px 8px;
  line-height: 1.2;
  white-space: nowrap;
}

.crm-page.crm-dfd-page .crm-btn,
.crm-dfd-read-card .crm-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  text-decoration: none !important;
  border: 1px solid transparent !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
}

.crm-page.crm-dfd-page .crm-btn-primary,
.crm-dfd-read-card .crm-btn-primary,
.crm-page.crm-dfd-page .btn-primary,
.crm-page.crm-dfd-page .btn.btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-page.crm-dfd-page .crm-btn-secondary,
.crm-dfd-read-card .crm-btn-secondary,
.crm-page.crm-dfd-page .btn-default,
.crm-page.crm-dfd-page .btn-secondary,
.crm-page.crm-dfd-page .btn-grey {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

.crm-page.crm-dfd-page .crm-btn-danger {
  background: #fff !important;
  border: 1px solid #fecaca !important;
  color: #b91c1c !important;
}

.crm-page.crm-dfd-page .crm-btn-sm {
  min-height: 30px;
  padding: 4px 10px !important;
  font-size: 12px !important;
}

.crm-page.crm-dfd-page .card {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  margin-bottom: 16px;
}

.crm-page.crm-dfd-page .card > .card-header,
.crm-page.crm-dfd-page .card > .navbar {
  background: #fff !important;
  border-bottom: 1px solid #eef2f7 !important;
  padding: 14px 18px !important;
  margin: 0 !important;
  border-radius: 12px 12px 0 0 !important;
}

.crm-page.crm-dfd-page .card > .card-header .card-title,
.crm-page.crm-dfd-page .card > .navbar h4,
.crm-page.crm-dfd-page .card > .navbar .navbar-text {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 650 !important;
  color: #0f172a !important;
}

.crm-page.crm-dfd-page .form-control,
.crm-page.crm-dfd-page .form-select,
.crm-page.crm-dfd-page input[type="date"].form-control,
.crm-dfd-read-card .form-control {
  border-radius: 8px !important;
  border-color: #cbd5e1 !important;
  font-size: 14px !important;
}

.crm-page.crm-dfd-page .crm-dfd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.crm-dfd-read-card .crm-log-status,
.crm-page.crm-dfd-page .crm-log-status {
  display: inline !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

.crm-dfd-read-card table.crm-table,
.crm-page.crm-dfd-page table.crm-table {
  width: 100%;
  margin-bottom: 0;
}

.crm-dfd-read-card table.crm-table thead th,
.crm-page.crm-dfd-page table.crm-table thead th {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  white-space: nowrap;
  padding: 10px 12px !important;
  vertical-align: middle !important;
}

.crm-dfd-read-card table.crm-table tbody td,
.crm-page.crm-dfd-page table.crm-table tbody td {
  font-size: 13px !important;
  color: #0f172a !important;
  vertical-align: top !important;
  border-bottom: 1px solid #eef2f7 !important;
  padding: 10px 12px !important;
}

.crm-page.crm-dfd-page .crm-dfd-table-wrap table.crm-table tbody td,
.crm-dfd-form .crm-dfd-table-wrap table.crm-table tbody td {
  vertical-align: middle !important;
}

/* Design package rows have multi-line cells ? keep top alignment */
.crm-page.crm-dfd-page .crm-dfd-table-wrap-packages table.crm-table tbody td,
.crm-dfd-form .crm-dfd-table-wrap-packages table.crm-table tbody td,
.crm-dfd-read-card .crm-dfd-table-wrap-packages table.crm-table tbody td {
  vertical-align: top !important;
}

.crm-page.crm-dfd-page .crm-dfd-schedule-col,
.crm-dfd-form .crm-dfd-schedule-col {
  min-width: 300px;
  width: 32%;
}

.crm-page.crm-dfd-page .crm-dfd-schedule-row,
.crm-dfd-form .crm-dfd-schedule-row {
  margin-bottom: 8px;
}

.crm-page.crm-dfd-page .crm-dfd-schedule-dates,
.crm-dfd-form .crm-dfd-schedule-dates {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.crm-page.crm-dfd-page .crm-dfd-schedule-dates .crm-date-input-wrap,
.crm-dfd-form .crm-dfd-schedule-dates .crm-date-input-wrap {
  flex: 0 0 auto;
  width: 148px;
  max-width: 148px;
  min-width: 0;
}

.crm-page.crm-dfd-page .crm-dfd-schedule-dates .crm-date-input,
.crm-dfd-form .crm-dfd-schedule-dates .crm-date-input {
  width: 100% !important;
  min-width: 0;
  max-width: 100%;
}

.crm-page.crm-dfd-page .crm-dfd-schedule-dates .crm-dfd-row-action,
.crm-dfd-form .crm-dfd-schedule-dates .crm-dfd-row-action {
  flex: 0 0 auto;
}

.crm-dfd-read-card a.crm-table-link,
.crm-page.crm-dfd-page a.crm-table-link {
  color: #1a6fd4 !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.crm-dfd-read-card a.crm-table-link:hover,
.crm-page.crm-dfd-page a.crm-table-link:hover {
  color: #1557a8 !important;
  text-decoration: underline !important;
}

.crm-page.crm-dfd-page .crm-dfd-table-wrap,
.crm-dfd-read-card .crm-dfd-table-wrap,
.crm-dfd-form .crm-dfd-table-wrap {
  margin-top: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.crm-page.crm-dfd-page .crm-dfd-signoff-block {
  margin-top: 18px;
  margin-bottom: 24px;
}

.crm-page.crm-dfd-page .crm-dfd-signoff-mgr {
  margin-top: 28px;
}

.crm-page.crm-dfd-page .crm-dfd-attach-list {
  margin-bottom: 8px;
}

.crm-page.crm-dfd-page .crm-dfd-table-wrap .table,
.crm-dfd-read-card .crm-dfd-table-wrap .table,
.crm-dfd-form .crm-dfd-table-wrap .table {
  margin: 0 !important;
}

.crm-page.crm-dfd-page .crm-dfd-col-actions,
.crm-dfd-form .crm-dfd-col-actions {
  width: 44px;
  text-align: center !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
}

.crm-page.crm-dfd-page .crm-dfd-row-action,
.crm-dfd-form .crm-dfd-row-action {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  text-decoration: none !important;
}

.crm-page.crm-dfd-page .crm-dfd-row-action:hover,
.crm-dfd-form .crm-dfd-row-action:hover {
  background: #fef2f2;
}

.crm-page.crm-dfd-page .crm-dfd-add-comment,
.crm-dfd-read-card .crm-dfd-add-comment,
.crm-dfd-form .crm-dfd-add-comment {
  margin-top: 4px;
  background: #f8fafc !important;
  border: 1px solid #dbe3ee !important;
  color: #1a6fd4 !important;
  font-weight: 650 !important;
}

.crm-page.crm-dfd-page .crm-dfd-add-comment:hover,
.crm-dfd-read-card .crm-dfd-add-comment:hover,
.crm-dfd-form .crm-dfd-add-comment:hover {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1557a8 !important;
}

/* DFD add/edit form (req_add_uc) */
.crm-dfd-form {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  margin-bottom: 16px;
  overflow: hidden;
}

.crm-dfd-form-header {
  background: #fff !important;
  border-bottom: 1px solid #eef2f7 !important;
  padding: 14px 18px;
}

.crm-dfd-form-title {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 650 !important;
  color: #0f172a !important;
}

.crm-dfd-form-body {
  padding: 18px;
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-section-head,
.crm-dfd-form .crm-dfd-section-head {
  margin: 28px 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e2e8f0;
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-section-title,
.crm-dfd-form .crm-dfd-section-title,
.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-section-title .aspNetDisabled,
.crm-dfd-form .crm-dfd-section-title span {
  margin: 0 !important;
  padding: 0 !important;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  color: #0f172a !important;
  text-transform: none !important;
  line-height: 1.3 !important;
}

.crm-page.crm-dfd-page .crm-dfd-form .form-group {
  margin-bottom: 14px;
}

.crm-page.crm-dfd-page .crm-dfd-form .form-group > label {
  display: block;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 5px;
}

.crm-page.crm-dfd-page .crm-dfd-form .form-control,
.crm-page.crm-dfd-page .crm-dfd-form .form-select,
.crm-page.crm-dfd-page .crm-dfd-form input[type="date"].form-control,
.crm-page.crm-dfd-page .crm-dfd-form select.form-select {
  display: block;
  width: 100%;
  min-height: 38px;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #fff !important;
  color: #0f172a !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

.crm-page.crm-dfd-page .crm-dfd-form select.form-select,
.crm-page.crm-dfd-page .crm-dfd-form .form-select {
  padding: 0.45rem 2.5rem 0.45rem 0.75rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 14px 10px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.crm-page.crm-dfd-page .crm-dfd-form .form-control:focus,
.crm-page.crm-dfd-page .crm-dfd-form .form-select:focus,
.crm-page.crm-dfd-page .crm-dfd-form select.form-select:focus {
  border-color: #1a6fd4 !important;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12) !important;
  outline: none !important;
}

/* Hide bootstrap-select chrome if any leftover wrappers appear */
.crm-page.crm-dfd-page .crm-dfd-form .bootstrap-select > .dropdown-toggle {
  display: none !important;
}

.crm-page.crm-dfd-page .crm-dfd-form .bootstrap-select > select.form-select {
  display: block !important;
}

/* Radio lists ? ASP.NET Flow renders input+label+br pairs */
.crm-page.crm-dfd-page .crm-radio-list,
.crm-dfd-form .crm-radio-list {
  display: block !important;
  margin: 0;
  padding: 0;
  line-height: 1.45;
}

.crm-page.crm-dfd-page .crm-radio-list.crm-radio-inline,
.crm-dfd-form .crm-radio-list.crm-radio-inline {
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

.crm-page.crm-dfd-page .crm-radio-list.crm-radio-inline br,
.crm-dfd-form .crm-radio-list.crm-radio-inline br {
  display: none;
}

.crm-page.crm-dfd-page .crm-radio-list label,
.crm-dfd-form .crm-radio-list label {
  display: inline !important;
  align-items: center;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.35;
  cursor: pointer;
}

.crm-page.crm-dfd-page .crm-radio-list.crm-radio-inline label,
.crm-dfd-form .crm-radio-list.crm-radio-inline label {
  margin: 0 !important;
}

.crm-page.crm-dfd-page .crm-radio-list input[type="radio"],
.crm-dfd-form .crm-radio-list input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0 8px 8px 0 !important;
  accent-color: #1a6fd4;
  vertical-align: middle;
}

.crm-page.crm-dfd-page .crm-radio-list.crm-radio-inline input[type="radio"],
.crm-dfd-form .crm-radio-list.crm-radio-inline input[type="radio"] {
  margin: 0 8px 0 0 !important;
}

/* Checkbox lists (designers, etc.) ? flat list, no nested card chrome */
.crm-page.crm-dfd-page .crm-check-list,
.crm-dfd-form .crm-check-list {
  display: table !important;
  width: auto;
  max-width: 100%;
  margin: 0 0 8px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  line-height: 1.45;
  border-collapse: separate;
  border-spacing: 0;
}

.crm-page.crm-dfd-page .crm-check-list table,
.crm-dfd-form .crm-check-list table {
  width: auto;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  border: none;
}

.crm-page.crm-dfd-page .crm-check-list td,
.crm-dfd-form .crm-check-list td {
  border: none !important;
  padding: 3px 0 !important;
  background: transparent !important;
  vertical-align: middle;
  box-shadow: none !important;
}

.crm-page.crm-dfd-page .crm-check-list label,
.crm-dfd-form .crm-check-list label {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.35;
  cursor: pointer;
  background: transparent !important;
  border: none !important;
}

.crm-page.crm-dfd-page .crm-check-list input[type="checkbox"],
.crm-dfd-form .crm-check-list input[type="checkbox"],
.crm-page.crm-dfd-page .crm-check-inline input[type="checkbox"],
.crm-dfd-form .crm-check-inline input[type="checkbox"],
.crm-page.crm-dfd-page .crm-dfd-form input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0 8px 0 0 !important;
  accent-color: #1a6fd4;
  vertical-align: middle;
}

.crm-page.crm-dfd-page .crm-check-inline,
.crm-dfd-form .crm-check-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
}

.crm-page.crm-dfd-page .crm-check-inline label,
.crm-dfd-form .crm-check-inline label {
  display: inline !important;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* Completed checkbox stamp (name + date beside checkbox) */
.crm-page.crm-dfd-page .crm-dfd-completed-wrap,
.crm-dfd-form .crm-dfd-completed-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: normal;
}

.crm-page.crm-dfd-page .crm-dfd-completed-wrap > span,
.crm-dfd-form .crm-dfd-completed-wrap > span,
.crm-page.crm-dfd-page .crm-dfd-completed-wrap .aspNetDisabled,
.crm-dfd-form .crm-dfd-completed-wrap .aspNetDisabled {
  display: inline-flex !important;
  align-items: flex-start;
  flex-shrink: 0;
  margin: 0 !important;
  padding: 0 !important;
}

.crm-page.crm-dfd-page .crm-dfd-completed-wrap input[type="checkbox"],
.crm-dfd-form .crm-dfd-completed-wrap input[type="checkbox"] {
  margin: 2px 0 0 0 !important;
  flex-shrink: 0;
}

.crm-page.crm-dfd-page .crm-dfd-completed-wrap label,
.crm-dfd-form .crm-dfd-completed-wrap label {
  display: none !important;
}

.crm-page.crm-dfd-page .crm-dfd-completed-stamp,
.crm-dfd-form .crm-dfd-completed-stamp {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  line-height: 1.25;
  color: #15803d;
  font-size: 12px;
  font-weight: 600;
  text-transform: none !important;
  letter-spacing: normal !important;
  white-space: normal;
}

.crm-page.crm-dfd-page .crm-dfd-completed-name,
.crm-dfd-form .crm-dfd-completed-name {
  display: block;
  color: #15803d;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  text-transform: none !important;
}

.crm-page.crm-dfd-page .crm-dfd-completed-date,
.crm-dfd-form .crm-dfd-completed-date {
  display: block;
  color: #15803d;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  text-transform: none !important;
}

/* Project scope combo ? native TextBox + suggestion menu (replaces RadComboBox) */
.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo {
  position: relative;
  width: 100%;
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo-field {
  position: relative;
  display: block;
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo-input {
  padding-right: 40px !important;
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo-toggle:hover,
.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo-toggle:focus-visible {
  color: #1a6fd4;
  outline: none;
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo.is-open .crm-dfd-combo-toggle i {
  transform: rotate(180deg);
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo-item {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: #0f172a;
  cursor: pointer;
  line-height: 1.35;
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo-item:hover,
.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo-item:focus {
  background: #eff6ff;
  color: #1a6fd4;
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo:has(.crm-dfd-combo-input:disabled) .crm-dfd-combo-toggle,
.crm-page.crm-dfd-page .crm-dfd-form .crm-dfd-combo:has(.crm-dfd-combo-input[readonly]) .crm-dfd-combo-toggle {
  pointer-events: none;
  opacity: 0.45;
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-field-error,
.crm-dfd-form .crm-field-error {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
  color: #d13232;
  font-weight: 500;
}

.crm-page.crm-dfd-page .crm-dfd-form .crm-req-mark {
  color: #d13232;
  font-weight: 700;
  margin-left: 2px;
}

.crm-page.crm-dfd-page .crm-dfd-form .form-control.is-invalid,
.crm-page.crm-dfd-page .crm-dfd-form .form-select.is-invalid {
  border-color: #d13232 !important;
  box-shadow: 0 0 0 3px rgba(209, 50, 50, 0.12) !important;
}

.crm-page.crm-dfd-page .crm-dfd-form label.form-control,
.crm-page.crm-dfd-page .crm-dfd-form span.form-control,
.crm-page.crm-dfd-page .crm-dfd-form .form-control[disabled] {
  background: #f8fafc !important;
  color: #334155 !important;
  opacity: 1 !important;
}

.crm-page.crm-dfd-page .crm-dfd-form .table.crm-table {
  margin-top: 8px;
}

.crm-page.crm-dfd-page .crm-dfd-actions .crm-btn {
  min-height: 38px !important;
  height: 38px !important;
  max-height: 38px !important;
  min-width: 96px;
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 600;
  border-radius: 6px;
  box-sizing: border-box;
}

/* HTML5 dates: clearable, no mm/dd/yyyy mask when empty */
.crm-page.crm-dfd-page .crm-date-input-wrap,
.crm-dfd-form .crm-date-input-wrap,
.crm-cal-modal .crm-date-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 100%;
}

.crm-page.crm-dfd-page .crm-date-input-wrap .crm-date-input,
.crm-dfd-form .crm-date-input-wrap .crm-date-input,
.crm-cal-modal .crm-date-input-wrap .crm-date-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.crm-page.crm-dfd-page .crm-date-clear-btn,
.crm-dfd-form .crm-date-clear-btn,
.crm-cal-modal .crm-date-clear-btn {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 4px;
  margin: 0;
  cursor: pointer;
}

.crm-page.crm-dfd-page .crm-date-clear-btn:hover,
.crm-page.crm-dfd-page .crm-date-clear-btn:focus-visible,
.crm-dfd-form .crm-date-clear-btn:hover,
.crm-dfd-form .crm-date-clear-btn:focus-visible,
.crm-cal-modal .crm-date-clear-btn:hover,
.crm-cal-modal .crm-date-clear-btn:focus-visible {
  color: #64748b;
}

.crm-page.crm-dfd-page .crm-date-input-wrap:not(:has(.crm-date-has-value)) .crm-date-clear-btn,
.crm-page.crm-dfd-page .crm-date-input-wrap:has(.crm-date-input:disabled) .crm-date-clear-btn,
.crm-page.crm-dfd-page .crm-date-input-wrap:has(.crm-date-input[readonly]) .crm-date-clear-btn,
.crm-dfd-form .crm-date-input-wrap:not(:has(.crm-date-has-value)) .crm-date-clear-btn,
.crm-dfd-form .crm-date-input-wrap:has(.crm-date-input:disabled) .crm-date-clear-btn,
.crm-dfd-form .crm-date-input-wrap:has(.crm-date-input[readonly]) .crm-date-clear-btn,
.crm-cal-modal .crm-date-input-wrap:not(:has(.crm-date-has-value)) .crm-date-clear-btn,
.crm-cal-modal .crm-date-input-wrap:has(.crm-date-input:disabled) .crm-date-clear-btn,
.crm-cal-modal .crm-date-input-wrap:has(.crm-date-input[readonly]) .crm-date-clear-btn {
  visibility: hidden;
  pointer-events: none;
}

.crm-page.crm-dfd-page input[type="date"].crm-date-input::-webkit-calendar-picker-indicator,
.crm-dfd-form input[type="date"].crm-date-input::-webkit-calendar-picker-indicator,
.crm-cal-modal input[type="date"].crm-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.65;
}

.crm-page.crm-dfd-page input[type="date"].crm-date-input:not(.crm-date-has-value):not(:focus)::-webkit-datetime-edit,
.crm-page.crm-dfd-page input[type="date"].crm-date-input:disabled:not(.crm-date-has-value)::-webkit-datetime-edit,
.crm-dfd-form input[type="date"].crm-date-input:not(.crm-date-has-value):not(:focus)::-webkit-datetime-edit,
.crm-dfd-form input[type="date"].crm-date-input:disabled:not(.crm-date-has-value)::-webkit-datetime-edit,
.crm-cal-modal input[type="date"].crm-date-input:not(.crm-date-has-value):not(:focus)::-webkit-datetime-edit,
.crm-cal-modal input[type="date"].crm-date-input:disabled:not(.crm-date-has-value)::-webkit-datetime-edit {
  opacity: 0 !important;
  color: transparent !important;
}

.crm-page.crm-dfd-page input[type="date"].crm-date-input:disabled:not(.crm-date-has-value),
.crm-dfd-form input[type="date"].crm-date-input:disabled:not(.crm-date-has-value),
.crm-cal-modal input[type="date"].crm-date-input:disabled:not(.crm-date-has-value) {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

.crm-page.crm-dfd-page input[type="date"].crm-date-input.crm-date-has-value::-webkit-datetime-edit,
.crm-page.crm-dfd-page input[type="date"].crm-date-input:focus::-webkit-datetime-edit,
.crm-dfd-form input[type="date"].crm-date-input.crm-date-has-value::-webkit-datetime-edit,
.crm-dfd-form input[type="date"].crm-date-input:focus::-webkit-datetime-edit,
.crm-cal-modal input[type="date"].crm-date-input.crm-date-has-value::-webkit-datetime-edit,
.crm-cal-modal input[type="date"].crm-date-input:focus::-webkit-datetime-edit {
  opacity: 1;
}

/* ===== DFD request list (req_view) ===== */
.crm-dfd-list-page .crm-dfd-req-block {
  margin-bottom: 16px;
}

.crm-dfd-list-page .crm-dfd-req-block:last-child {
  margin-bottom: 0;
}

.crm-dfd-list-page .crm-dfd-req-table {
  margin-bottom: 0 !important;
}

.crm-dfd-list-page .crm-dfd-req-table thead th {
  white-space: nowrap;
}

.crm-page.crm-dfd-page.crm-dfd-list-page .crm-dfd-col-actions {
  width: 1% !important;
  min-width: 160px;
  white-space: nowrap;
  text-align: right !important;
  vertical-align: middle !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.crm-page.crm-dfd-page.crm-dfd-list-page .crm-dfd-req-btns {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.crm-page.crm-dfd-page.crm-dfd-list-page .crm-dfd-req-btns .crm-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.crm-dfd-list-page .crm-dfd-status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.crm-dfd-list-page .crm-dfd-status-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  line-height: 1.35;
}

.crm-dfd-list-page .crm-dfd-status-cell img {
  width: auto !important;
  height: auto !important;
  max-width: none;
  max-height: none;
  display: block;
}

.crm-dfd-list-page .crm-dfd-status-text {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: #475569;
}

.crm-dfd-list-page .crm-dfd-log-link {
  display: block;
  margin-top: 0;
  font-size: 12px;
  font-weight: 600;
  color: #1a6fd4 !important;
  text-decoration: none !important;
}

.crm-dfd-list-page .crm-dfd-log-link:hover {
  text-decoration: underline !important;
}


.crm-dfd-list-page .crm-dfd-signoffs {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.crm-dfd-list-page .crm-dfd-signoff-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.crm-dfd-list-page .crm-dfd-signoff-line .crm-badge {
  flex: 0 0 auto;
}

.crm-dfd-list-page .crm-dfd-signoff-val {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.crm-dfd-list-page .crm-dfd-revisions {
  margin-top: 0;
  padding: 10px 12px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 10px 10px;
}

.crm-dfd-list-page .crm-dfd-req-block > .table-responsive {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.crm-dfd-list-page .crm-dfd-req-block:has(.crm-dfd-revisions) > .table-responsive {
  border-radius: 10px 10px 0 0;
}

.crm-dfd-list-page .crm-dfd-revisions-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.crm-dfd-list-page .crm-dfd-rev-table {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.crm-dfd-empty-state {
  text-align: center;
  padding: 36px 16px;
  color: #64748b;
}

.crm-dfd-empty-icon {
  font-size: 28px;
  color: #94a3b8;
  display: block;
  margin-bottom: 8px;
}

.crm-dfd-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.crm-dfd-empty-hint {
  font-size: 13px;
  color: #64748b;
}

.crm-dfd-list-page .modal-full {
  min-width: 90vw;
  height: 75vh;
  margin: 30px auto !important;
}

.crm-dfd-list-page .modal-full .modal-content {
  min-height: 75vh;
}

.crm-dfd-list-page .modal-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 75vh !important;
  border: 0;
}

/* ===== AP&A Design Calendar ===== */
.crm-page.crm-calendar-page {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
}

.crm-page.crm-calendar-page .crm-calendar-page-header {
  margin: 0 0 12px;
}

.crm-page.crm-calendar-page .crm-calendar-heading,
.crm-calendar-page h4.crm-calendar-heading {
  margin: 0 0 4px !important;
  padding: 0 !important;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em !important;
  color: #0f172a !important;
  text-transform: none !important;
}

.crm-page.crm-calendar-page .crm-card-sub,
.crm-calendar-page .crm-card-sub {
  margin: 0 !important;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  color: #64748b !important;
  text-transform: none !important;
}

.crm-page.crm-calendar-page .crm-card,
.crm-calendar-page .crm-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.crm-calendar-side-card {
  overflow: hidden;
}

.crm-calendar-side-title {
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}

.crm-calendar-side-body {
  padding: 12px 14px;
}

.crm-calendar-option-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-calendar-option-list li {
  margin: 0 0 8px;
}

.crm-calendar-option-list a {
  color: #1a6fd4;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.crm-calendar-option-list a:hover {
  color: #1557a8;
  text-decoration: underline;
}

.crm-calendar-user-list,
.crm-calendar-user-list table {
  width: 100%;
  border-collapse: collapse;
}

.crm-calendar-user-list td {
  padding: 4px 0 !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

.crm-calendar-user-list td > input[type="checkbox"],
.crm-calendar-user-list input[type="checkbox"] {
  display: inline-block !important;
  margin: 0 8px 0 0 !important;
  vertical-align: middle !important;
  accent-color: #1a6fd4;
  float: none !important;
}

.crm-calendar-user-list td > label,
.crm-calendar-user-list label {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  text-transform: none !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  line-height: 1.3 !important;
}

.crm-calendar-main-card {
  padding: 0;
  overflow: hidden;
}

.crm-calendar-toolbar {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
}

.crm-calendar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-calendar-filter {
  min-width: 160px;
  max-width: 240px;
  border-radius: 8px !important;
  border-color: #e2e8f0 !important;
  font-size: 13px !important;
}

.crm-calendar-filter:disabled,
.crm-calendar-page .crm-calendar-filter:disabled {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
  opacity: 1 !important;
  cursor: not-allowed;
}

.crm-calendar-tabs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef2f7;
}

.crm-calendar-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-calendar-view-tabs .crm-tabs-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: #475569 !important;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none !important;
  background: transparent;
}

.crm-calendar-view-tabs .crm-tabs-link:hover {
  background: #f1f5f9;
  color: #0f172a !important;
}

.crm-calendar-view-tabs .crm-tabs-link.is-selected,
.crm-calendar-view-tabs .crm-tabs-link.active {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1a6fd4 !important;
}

.crm-calendar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-calendar-board {
  padding: 12px;
  overflow: auto;
}

.crm-calendar-event {
  vertical-align: top;
  cursor: pointer;
  margin: 5px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  line-height: 1.35;
}

.crm-calendar-event:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.crm-calendar-modal .modal-header {
  border-bottom: 1px solid #eef2f7;
}

.crm-calendar-modal-frame {
  display: block;
  width: 100%;
  min-height: 70vh;
  border: 0;
}

.crm-cal-modal .card-header {
  background: #fff;
  border-bottom: 1px solid #eef2f7;
}

.crm-cal-modal .form-group > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

.crm-cal-modal .form-control,
.crm-cal-modal .form-select,
.crm-cal-modal select.form-select,
.crm-cal-modal select.form-control {
  display: block;
  width: 100%;
  min-height: 38px;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  background-color: #fff !important;
  color: #0f172a !important;
  font-size: 14px !important;
  padding: 0.45rem 2.5rem 0.45rem 0.75rem;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 16px 12px !important;
}

.crm-cal-modal input.form-control {
  padding-right: 0.75rem;
  background-image: none !important;
}

/* Keep ASP.NET validators hidden until they fail */
.crm-cal-modal span.text-danger[style*="display:none"],
.crm-cal-modal span.validator[style*="display:none"],
.crm-cal-modal span[style*="visibility:hidden"] {
  display: none !important;
  visibility: hidden !important;
}

.crm-cal-modal span.text-danger,
.crm-cal-modal span.validator {
  color: #9b1c1c;
  font-size: 12px;
  font-weight: 600;
}

.crm-cal-modal .crm-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  text-decoration: none !important;
  border: 1px solid transparent !important;
}

.crm-cal-modal .crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-cal-modal .crm-btn-secondary {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

.crm-cal-modal .crm-btn-danger {
  background: #fff !important;
  border: 1px solid #fecaca !important;
  color: #b91c1c !important;
}

.crm-cal-modal table.crm-table thead th {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.crm-cal-modal table.crm-table tbody td {
  font-size: 13px !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #eef2f7 !important;
}

/* Schedule / add-detail type counts */
.crm-schedule-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-schedule-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.2;
}

.crm-schedule-stat-name {
  font-weight: 600;
  color: #1e40af;
}

.crm-schedule-stat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: #1a6fd4;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.crm-cal-modal .crm-date-input-wrap,
.crm-schedule-wrap .crm-date-input-wrap {
  position: static;
  display: flex !important;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
}

.crm-schedule-wrap .crm-schedule-date-row,
.crm-cal-modal .crm-schedule-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.crm-schedule-wrap .crm-schedule-date-row .crm-date-input-wrap,
.crm-cal-modal .crm-schedule-date-row .crm-date-input-wrap {
  flex: 0 0 auto;
  width: 148px;
  max-width: 148px;
}

.crm-schedule-wrap .crm-schedule-date-row .crm-date-input,
.crm-cal-modal .crm-schedule-date-row .crm-date-input {
  flex: 1 1 auto;
  width: 100% !important;
  min-width: 0;
  max-width: 100%;
}

.crm-cal-modal .crm-date-input-wrap .crm-date-input,
.crm-schedule-wrap .crm-date-input-wrap .crm-date-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding-right: 0.75rem !important;
}

.crm-cal-modal .crm-date-clear-btn,
.crm-schedule-wrap .crm-date-clear-btn {
  position: static !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 4px;
  margin: 0;
  cursor: pointer;
}

.crm-cal-modal .crm-date-clear-btn:hover,
.crm-schedule-wrap .crm-date-clear-btn:hover {
  color: #64748b;
}

.crm-cal-modal .crm-date-input-wrap:not(:has(.crm-date-has-value)) .crm-date-clear-btn,
.crm-schedule-wrap .crm-date-input-wrap:not(:has(.crm-date-has-value)) .crm-date-clear-btn,
.crm-cal-modal .crm-date-input-wrap:has(.crm-date-input:disabled) .crm-date-clear-btn,
.crm-schedule-wrap .crm-date-input-wrap:has(.crm-date-input:disabled) .crm-date-clear-btn {
  visibility: hidden;
  pointer-events: none;
  display: inline-block;
}

.crm-cal-modal input[type="date"].crm-date-input::-webkit-calendar-picker-indicator,
.crm-schedule-wrap input[type="date"].crm-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.65;
}

.crm-add-form .crm-schedule-designer-list,
.crm-cal-modal .crm-schedule-designer-list,
.crm-schedule-wrap .crm-schedule-designer-list,
.crm-add-form .crm-schedule-designer-list table,
.crm-cal-modal .crm-schedule-designer-list table,
.crm-schedule-wrap .crm-schedule-designer-list table {
  width: 100%;
  border-collapse: collapse;
}

.crm-add-form .crm-schedule-designer-list td,
.crm-cal-modal .crm-schedule-designer-list td,
.crm-schedule-wrap .crm-schedule-designer-list td {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 7px 0 !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

.crm-add-form .form-group .crm-schedule-designer-list input[type="checkbox"],
.crm-add-form .crm-schedule-designer-list input[type="checkbox"],
.crm-cal-modal .crm-schedule-designer-list input[type="checkbox"],
.crm-schedule-wrap .crm-schedule-designer-list input[type="checkbox"] {
  display: inline-block !important;
  float: none !important;
  position: static !important;
  margin: 0 !important;
  flex: 0 0 16px !important;
  width: 16px !important;
  height: 16px !important;
  accent-color: #1a6fd4;
  vertical-align: middle !important;
}

.crm-add-form .form-group .crm-schedule-designer-list label,
.crm-add-form .crm-schedule-designer-list label,
.crm-cal-modal .crm-schedule-designer-list label,
.crm-schedule-wrap .crm-schedule-designer-list label {
  display: inline-block !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 1 1 auto !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  line-height: 1.35 !important;
}

.crm-schedule-completed-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.crm-schedule-completed-wrap input[type="checkbox"],
.crm-add-form .form-group .crm-schedule-completed-wrap input[type="checkbox"] {
  margin: 0 !important;
  float: none !important;
  position: static !important;
  width: 16px !important;
  height: 16px !important;
  accent-color: #1a6fd4;
  flex: 0 0 auto;
}

.crm-schedule-completed-wrap .crm-schedule-completed-check,
.crm-schedule-completed-wrap span.crm-schedule-completed-check,
.crm-schedule-completed-wrap label {
  display: inline-flex !important;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.crm-schedule-completed-label {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.3 !important;
}

.crm-schedule-completed-stamp {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857 !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1.3;
  white-space: nowrap;
}

.crm-schedule-notes {
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.crm-schedule-notes-body {
  display: block !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  line-height: 1.45 !important;
}

.crm-schedule-notes-empty {
  color: #94a3b8 !important;
  font-weight: 500 !important;
}

.crm-schedule-completed {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  text-transform: none !important;
}

.crm-schedule-completed input[type="checkbox"] {
  margin: 0 !important;
  accent-color: #1a6fd4;
}

/* Keep UpdatePanel action links looking like CRM buttons after async postback */
.crm-schedule-wrap a.crm-btn,
.crm-cal-modal a.crm-btn,
.crm-schedule-wrap .crm-btn,
.crm-cal-modal .crm-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  text-decoration: none !important;
  border: 1px solid transparent !important;
  line-height: 1.2 !important;
  cursor: pointer;
  box-sizing: border-box;
  white-space: nowrap;
}

.crm-schedule-wrap .crm-btn-primary,
.crm-cal-modal .crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-schedule-wrap .crm-btn-secondary,
.crm-cal-modal .crm-btn-secondary {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

.crm-schedule-wrap .crm-schedule-add-date,
.crm-cal-modal .crm-schedule-add-date,
.crm-page.crm-dfd-page .crm-schedule-add-date,
.crm-dfd-form .crm-schedule-add-date,
input.crm-schedule-add-date,
button.crm-schedule-add-date,
a.crm-schedule-add-date {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin-top: 8px !important;
  min-height: 34px !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background: #fff !important;
  color: #334155 !important;
  font-family: "DM Sans", system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.crm-schedule-wrap .crm-schedule-add-date:hover,
.crm-cal-modal .crm-schedule-add-date:hover,
.crm-page.crm-dfd-page .crm-schedule-add-date:hover,
.crm-dfd-form .crm-schedule-add-date:hover,
input.crm-schedule-add-date:hover,
button.crm-schedule-add-date:hover,
a.crm-schedule-add-date:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

/* Calendar page action buttons */
.crm-page.crm-calendar-page .crm-calendar-actions > a,
.crm-calendar-page .crm-calendar-actions > a,
.crm-page.crm-calendar-page .crm-btn,
.crm-calendar-page .crm-btn,
.crm-page.crm-calendar-page a.crm-btn,
.crm-calendar-page a.crm-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  text-decoration: none !important;
  border: 1px solid transparent !important;
  line-height: 1.2 !important;
  cursor: pointer;
  box-sizing: border-box;
  white-space: nowrap;
}

.crm-page.crm-calendar-page .crm-btn-primary,
.crm-calendar-page .crm-btn-primary,
.crm-page.crm-calendar-page a.crm-btn-primary,
.crm-calendar-page a.crm-btn-primary {
  background: #1a6fd4 !important;
  border-color: #1a6fd4 !important;
  color: #fff !important;
}

.crm-page.crm-calendar-page .crm-btn-secondary,
.crm-calendar-page .crm-btn-secondary,
.crm-page.crm-calendar-page a.crm-btn-secondary,
.crm-calendar-page a.crm-btn-secondary {
  background: #fff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

.crm-page.crm-calendar-page .crm-btn-secondary:hover,
.crm-calendar-page .crm-btn-secondary:hover,
.crm-page.crm-calendar-page a.crm-btn-secondary:hover,
.crm-calendar-page a.crm-btn-secondary:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

.crm-page.crm-calendar-page .crm-btn-primary:hover,
.crm-calendar-page .crm-btn-primary:hover,
.crm-page.crm-calendar-page a.crm-btn-primary:hover,
.crm-calendar-page a.crm-btn-primary:hover {
  background: #1557a8 !important;
  border-color: #1557a8 !important;
}

/* ===== My Inbox (RequestInbox / ucInbox) ===== */
.crm-inbox-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
  color: #8a9ab0;
}

.crm-inbox-page .crm-inbox-card {
  overflow: visible;
}

.crm-inbox-page .crm-inbox-tabs {
  margin-bottom: 1rem;
}

.crm-inbox-page .crm-inbox-tabs .crm-tabs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crm-inbox-page .crm-inbox-tabs .crm-tabs-link.active,
.crm-inbox-page .crm-inbox-tabs .crm-tabs-link.is-selected {
  color: #1a6fd4 !important;
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  box-shadow: none !important;
}

.crm-inbox-page .crm-inbox-tabs .crm-tabs-link.active .crm-tab-icon,
.crm-inbox-page .crm-inbox-tabs .crm-tabs-link.is-selected .crm-tab-icon {
  color: #1a6fd4 !important;
}

.crm-inbox-page .crm-tabs-item.notify .crm-tabs-link {
  position: relative;
}

.crm-inbox-page .crm-tabs-item.notify .crm-tabs-link::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: #1a6fd4;
  vertical-align: middle;
  box-shadow: 0 0 0 2px #eff6ff;
}

.crm-inbox-page .crm-inbox-table-wrap {
  overflow: visible !important;
  width: 100%;
}

.crm-inbox-page .crm-inbox-table {
  width: 100% !important;
  margin: 0;
  border-collapse: separate !important;
  border-spacing: 0;
}

.crm-inbox-page .crm-inbox-table thead th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 10px 12px !important;
  white-space: nowrap;
  vertical-align: middle;
}

.crm-inbox-page .crm-inbox-table tbody td {
  font-size: 13px;
  color: #1e293b;
  padding: 10px 12px !important;
  vertical-align: middle;
  border-top: none !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: #fff !important;
}

.crm-inbox-page .crm-inbox-table tbody tr:hover td {
  background: #f8fafc !important;
}

.crm-inbox-page .crm-inbox-table a {
  color: #1a6fd4;
  font-weight: 600;
  text-decoration: none;
}

.crm-inbox-page .crm-inbox-table a:hover,
.crm-inbox-page .crm-inbox-table a:focus {
  color: #1557a8;
  text-decoration: underline;
}

.crm-inbox-page .crm-inbox-col-icon {
  width: 36px;
  color: #64748b;
  text-align: center;
}

.crm-inbox-page .crm-inbox-col-icon .bi {
  font-size: 1.05rem;
}

.crm-inbox-page .crm-inbox-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f0fb;
  color: #1a6fd4;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.crm-inbox-page .crm-inbox-revised {
  color: #1a9e5f;
  font-weight: 600;
  font-size: 12px;
}

.crm-inbox-page .crm-inbox-revised:empty {
  display: none;
}

.crm-inbox-page .crm-inbox-badge-new,
.crm-inbox-page span.new {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  border-radius: 4px;
  background: #dcfce7;
  color: #15803d;
}

@media (max-width: 768px) {
  .crm-inbox-page .crm-inbox-tabs .crm-tabs-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
}

.crm-inbox-page .crm-inbox-dt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.crm-inbox-page .dataTables_filter label {
  margin: 0;
  font-size: 0;
}

.crm-inbox-page .dataTables_filter input {
  min-width: 240px;
  height: 34px;
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  background: #fff;
}

.crm-inbox-page .dataTables_filter input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
}

.crm-inbox-page .dataTables_info {
  font-size: 13px;
  color: #64748b;
  padding: 0 !important;
}

.crm-inbox-page .crm-inbox-table thead th.sorting,
.crm-inbox-page .crm-inbox-table thead th.sorting_asc,
.crm-inbox-page .crm-inbox-table thead th.sorting_desc {
  cursor: pointer;
  user-select: none;
}

/* ===== Edit Profile / myAccount.aspx ===== */
.crm-account-page {
  padding-bottom: 4.25rem;
}

.crm-account-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
  color: #8a9ab0;
}

.crm-account-page .crm-validation-summary {
  display: block;
  margin: 0 0 1rem;
  padding: 12px 14px;
  border: 1px solid #f1c2c2;
  border-radius: 10px;
  background: #fef2f2;
  color: #9b1c1c;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: none;
}

.crm-account-page .crm-validation-summary ul {
  margin: 6px 0 0;
  padding-left: 1.15rem;
}

.crm-account-page .crm-validation-summary li {
  margin: 0 0 2px;
  color: #9b1c1c;
  font-weight: 400;
}

.crm-account-page .crm-validation-summary a {
  color: #9b1c1c;
  text-decoration: underline;
}

.crm-account-page .crm-account-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 650;
  color: #475569;
}

.crm-account-page .crm-account-optional {
  font-weight: 500;
  color: #94a3b8;
}

.crm-account-page .crm-account-req {
  color: #d13232;
  font-weight: 700;
  margin-left: 2px;
}

.crm-account-page .crm-req-mark {
  color: #d13232;
  font-weight: 700;
  margin-left: 2px;
}

.crm-account-page .crm-field-error {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
  color: #d13232;
  font-weight: 500;
}

.crm-account-page .crm-field-error[style*="display:none"],
.crm-account-page .crm-field-error[style*="display: none"] {
  display: none !important;
}

.crm-account-page .form-control.is-invalid {
  border-color: #d13232 !important;
  box-shadow: 0 0 0 3px rgba(209, 50, 50, 0.12) !important;
}

.crm-account-page .form-control {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  color: #0f172a;
  min-height: 40px;
  box-shadow: none;
}

.crm-account-page .form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
}

.crm-account-page .crm-account-field-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
}

.crm-account-page .crm-account-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.crm-account-page .crm-account-badge-required {
  background: #fdeaea;
  color: #d13232;
}

.crm-account-page .crm-account-security-required {
  border-color: #fecaca !important;
  box-shadow: 0 0 0 1px rgba(209, 50, 50, 0.08);
}

.crm-account-page .crm-account-security-required .card-header {
  background: #fff7f7;
}

.crm-account-page .crm-account-steps {
  margin: 0;
  padding: 10px 12px 10px 28px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
}

.crm-account-page .crm-account-steps li + li {
  margin-top: 4px;
}

.crm-account-page .crm-form-actions.crm-account-actions {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  padding: 10px 16px !important;
  border: 0 !important;
  border-top: 1px solid #e2e8f0 !important;
  background: #fff !important;
  box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.08) !important;
}

.crm-shell .crm-account-page .crm-form-actions.crm-account-actions {
  left: 260px;
}

.crm-shell .main-panel.main-panel-expanded .crm-account-page .crm-form-actions.crm-account-actions {
  left: 80px;
}

/* Forced password / profile (sidebar hidden) ? top + bottom bars edge to edge */
body.crm-forced-account.crm-shell .crm-topbar,
body.crm-forced-account.crm-shell .main-panel.main-panel-expanded .crm-topbar {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

body.crm-forced-account.crm-shell .main-panel,
body.crm-forced-account.crm-shell .main-panel.main-panel-expanded {
  margin-left: 0 !important;
  width: 100% !important;
}

body.crm-forced-account.crm-shell .crm-account-page .crm-form-actions.crm-account-actions,
body.crm-forced-account.crm-shell .main-panel.main-panel-expanded .crm-account-page .crm-form-actions.crm-account-actions {
  left: 0 !important;
  right: 0 !important;
}

@media (max-width: 991.98px) {
  .crm-shell .crm-account-page .crm-form-actions.crm-account-actions {
    left: 0;
  }
}

.crm-account-page .crm-account-actions .crm-btn {
  min-height: 38px;
  min-width: 140px;
}

.crm-account-page .crm-account-confirm-card {
  border: 1px solid #bfdbfe;
  background: #f8fbff;
}

.crm-account-page .crm-account-confirm-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: #0f172a;
}

.crm-account-page .crm-account-confirm-lead {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
}

/* ===== Notifications preferences (notifications.aspx / ucNotification) ===== */
.crm-notifications-page .crm-card-sub {
  font-size: 13px;
  margin-top: 2px;
  color: #8a9ab0;
}

.crm-notifications-page .crm-notifications-group-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.crm-notifications-page .crm-notif-section {
  margin-bottom: 1rem;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.crm-notifications-page .crm-notif-section-hdr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.crm-notifications-page .crm-notif-section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: #0f172a;
}

.crm-notifications-page .crm-notif-check-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #1a6fd4;
  cursor: pointer;
  user-select: none;
}

.crm-notifications-page .crm-notif-check-all input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #1a6fd4;
  cursor: pointer;
}

.crm-notifications-page .crm-notif-checklist {
  width: 100%;
  margin: 0;
}

.crm-notifications-page .crm-notif-checklist td {
  padding: 4px 12px 4px 0;
  vertical-align: middle;
  border: none !important;
}

.crm-notifications-page .crm-notif-checklist label,
.crm-notifications-page .crm-notif-checklist td label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
}

.crm-notifications-page .crm-notif-checklist input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0 6px 0 0;
  accent-color: #1a6fd4;
  cursor: pointer;
  vertical-align: middle;
}

.crm-notifications-page .crm-notifications-footnote {
  margin: 4px 0 18px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.crm-notifications-page {
  padding-bottom: 4.25rem;
}

.crm-notifications-page .crm-form-actions {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  padding: 10px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  border-top: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.08) !important;
}

.crm-shell .crm-notifications-page .crm-form-actions {
  left: 260px;
}

.crm-shell .main-panel.main-panel-expanded .crm-notifications-page .crm-form-actions {
  left: 80px;
}

@media (max-width: 991.98px) {
  .crm-shell .crm-notifications-page .crm-form-actions {
    left: 0;
  }
}

.crm-notifications-page .crm-form-actions .crm-btn,
.crm-notifications-page .crm-form-actions input.crm-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 38px !important;
  min-width: 96px;
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 600;
  border-radius: 6px;
  box-shadow: none !important;
}

@media (max-width: 768px) {
  .crm-notifications-page .crm-notif-checklist {
    display: block;
  }

  .crm-notifications-page .crm-notif-checklist tbody,
  .crm-notifications-page .crm-notif-checklist tr,
  .crm-notifications-page .crm-notif-checklist td {
    display: block;
    width: 100%;
  }
}

/* ?? Auth pages (login.Master) ? same CRM controls as pcenter, facility photo behind the card ?? */
body.crm-auth-page {
  min-height: 100vh;
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: #1a1d23;
  background-color: #0f172a;
  background-image: url(/_/themes/signature_portal/img/Ford-Facility-25.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.crm-auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
  pointer-events: none;
}

body.crm-auth-page::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 280px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.72) 100%);
  z-index: 0;
  pointer-events: none;
}

body.crm-auth-page form {
  position: relative;
  z-index: 1;
}

.crm-auth-page .crm-auth-wrap {
  max-width: 420px;
  margin: 7vh auto 40px;
  padding: 0 16px;
}

.crm-auth-page .crm-auth-wrap-wide {
  max-width: 800px;
  margin: 40px auto 40px;
  padding: 0 16px;
}

.crm-auth-page .crm-auth-brand {
  text-align: center;
  margin-bottom: 22px;
  color: #fff;
}

.crm-auth-page .crm-auth-brand h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.15;
}

.crm-auth-page .crm-auth-brand p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

.crm-auth-page .crm-auth-card,
.crm-auth-page .card,
.crm-auth-page .card-login,
.crm-auth-page .card-signup {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.crm-auth-page .card-header,
.crm-auth-page .crm-auth-card-header {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: none;
  padding: 18px 24px 16px;
  text-align: left;
}

.crm-auth-page .crm-auth-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.crm-auth-page .crm-auth-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e8f0fb;
  color: #1a6fd4;
  font-size: 18px;
  line-height: 1;
}

.crm-auth-page .crm-auth-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.crm-auth-page .crm-auth-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.crm-auth-page .crm-auth-step-num {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.crm-auth-page .crm-auth-step.is-current {
  color: #0f172a;
}

.crm-auth-page .crm-auth-step.is-current .crm-auth-step-num {
  background: #1a6fd4;
  border-color: #1a6fd4;
  color: #fff;
}

.crm-auth-page .crm-auth-step.is-done {
  color: #334155;
}

.crm-auth-page .crm-auth-step.is-done .crm-auth-step-num {
  background: #e8f0fb;
  border-color: #1a6fd4;
  color: #1a6fd4;
}

.crm-auth-page .crm-auth-step-sep {
  flex: 1;
  height: 1px;
  background: #e2e8f0;
  max-width: 72px;
}

.crm-auth-page .card-signup .form-control,
.crm-auth-page .card-signup .form-select,
.crm-auth-page .card-signup select {
  background-color: #fff;
  border-color: #cbd5e1;
}

.crm-auth-page .card-signup .form-group > label {
  color: #475569;
}

.crm-auth-page .card-title,
.crm-auth-page .crm-auth-card-header .card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.crm-auth-page .crm-auth-sub,
.crm-auth-page .card-description {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.crm-auth-page .card-body,
.crm-auth-page .crm-auth-card-body {
  padding: 18px 24px 8px;
}

.crm-auth-page .card-footer,
.crm-auth-page .crm-auth-card-footer {
  background: #f8fafc;
  border-top: 1px solid #eef2f7;
  padding: 16px 24px 20px;
  display: block;
  text-align: center;
}

.crm-auth-page .form-group,
.crm-auth-page .login-field {
  margin-bottom: 1rem;
  text-align: left;
}

.crm-auth-page .crm-auth-hint {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #64748b;
}

.crm-auth-page .crm-auth-radio-label {
  display: block;
  font-size: var(--crm-fs-label, 13px);
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.crm-auth-page table.crm-auth-radio {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  margin: -8px 0 0;
}

.crm-auth-page table.crm-auth-radio td {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.crm-auth-page table.crm-auth-radio td:has(input:checked) {
  border-color: #1a6fd4;
  background: #f0f6fd;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
}

.crm-auth-page table.crm-auth-radio input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  padding: 0;
  border: 1.5px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
  box-sizing: border-box;
  flex: 0 0 18px;
  cursor: pointer;
}

.crm-auth-page table.crm-auth-radio input[type="radio"]:checked {
  border-color: #1a6fd4;
  box-shadow: inset 0 0 0 4px #1a6fd4;
}

.crm-auth-page table.crm-auth-radio input[type="radio"]:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 4px #1a6fd4, 0 0 0 3px rgba(26, 111, 212, 0.2);
}

.crm-auth-page table.crm-auth-radio label {
  flex: 1;
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  line-height: 1.35;
}

.crm-auth-page .form-group > label,
.crm-auth-page .login-field > label,
.crm-auth-page .crm-auth-card-body > label {
  display: block;
  font-size: var(--crm-fs-label, 13px);
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.35rem;
  letter-spacing: 0;
  text-transform: none;
}

.crm-auth-page .form-control,
.crm-auth-page .form-select,
.crm-auth-page input.form-control,
.crm-auth-page select.form-control,
.crm-auth-page select.form-select,
.crm-auth-page textarea.form-control,
.crm-auth-page select {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #1a1d23;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: none;
  box-sizing: border-box;
}

.crm-auth-page textarea.form-control {
  min-height: 88px;
  height: auto;
}

.crm-auth-page select,
.crm-auth-page .form-select,
.crm-auth-page select.form-control,
.crm-auth-page select.form-select {
  padding: 8px 2.5rem 8px 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 10px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.crm-auth-page .form-control:focus,
.crm-auth-page .form-select:focus,
.crm-auth-page select:focus {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
  outline: none;
}

.crm-auth-page .form-control.is-invalid,
.crm-auth-page .form-select.is-invalid,
.crm-auth-page select.is-invalid {
  border-color: #d13232 !important;
  box-shadow: 0 0 0 3px rgba(209, 50, 50, 0.12) !important;
}

.crm-auth-page .crm-field-error,
.crm-auth-page span.crm-field-error {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
  color: #d13232;
  font-weight: 500;
}

.crm-auth-page .crm-field-error[style*="display:none"],
.crm-auth-page .crm-field-error[style*="display: none"] {
  display: none !important;
}

.crm-auth-page .crm-form-actions .crm-btn,
.crm-auth-page .crm-form-actions input.crm-btn,
.crm-auth-page input.crm-btn,
.crm-auth-page .crm-btn,
.crm-auth-page a.crm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  box-shadow: none;
  cursor: pointer;
}

.crm-auth-page .crm-form-actions .crm-btn-primary,
.crm-auth-page .crm-form-actions input.crm-btn-primary,
.crm-auth-page input.crm-btn-primary,
.crm-auth-page .crm-btn-primary,
.crm-auth-page a.crm-btn-primary {
  background: #1a6fd4;
  border-color: #1a6fd4;
  color: #fff;
}

.crm-auth-page .crm-btn-primary:hover,
.crm-auth-page input.crm-btn-primary:hover,
.crm-auth-page a.crm-btn-primary:hover {
  background: #1558a8;
  border-color: #1558a8;
  color: #fff;
}

.crm-auth-page .crm-btn-block {
  display: flex !important;
  width: 100%;
}

.crm-auth-page .crm-auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 14px;
}

.crm-auth-page .crm-auth-links a {
  color: #1a6fd4;
  font-weight: 650;
  text-decoration: none;
}

.crm-auth-page .crm-auth-links a:hover {
  text-decoration: underline;
}

.crm-auth-page .crm-auth-links a.crm-auth-link-muted {
  color: #64748b;
  font-weight: 550;
}

.crm-auth-page .crm-auth-links a.crm-auth-link-muted:hover {
  color: #1a6fd4;
}

.crm-auth-page .crm-auth-links a.crm-auth-link-emphasis {
  color: #1a6fd4;
  font-weight: 700;
}

.crm-auth-page .crm-auth-password {
  position: relative;
}

.crm-auth-page .crm-auth-password .form-control {
  padding-right: 44px;
}

.crm-auth-page .crm-auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 36px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.crm-auth-page .crm-auth-password-toggle:hover,
.crm-auth-page .crm-auth-password-toggle:focus {
  color: #0f172a;
  background: #f1f5f9;
  outline: none;
}

.crm-auth-page .crm-auth-password-toggle:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1a6fd4;
}

.crm-auth-page .crm-auth-legal {
  margin-top: 16px;
  padding: 14px 16px 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

.crm-auth-page .crm-auth-legal .crm-auth-notes {
  margin: 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.94);
  font-size: 12.5px;
  line-height: 1.5;
}

.crm-auth-page .crm-auth-notes {
  margin: 18px 0 0;
  padding: 0 4px;
  list-style: none;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12.5px;
  line-height: 1.5;
}

.crm-auth-page .crm-auth-notes li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 8px;
}

.crm-auth-page .crm-auth-notes li:last-child {
  margin-bottom: 0;
}

.crm-auth-page .crm-auth-notes li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}

.crm-auth-page .crm-auth-legal .crm-auth-copyright,
.crm-auth-page .crm-auth-legal .copyright {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.crm-auth-page .crm-auth-copyright,
.crm-auth-page .copyright {
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  font-size: 13px;
  margin: 16px 0 24px;
}

.crm-auth-page .crm-auth-ctrl {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 8px;
}

.crm-auth-page .Submission {
  display: block;
}

.crm-auth-page .login-alert,
.crm-auth-page .alert-danger {
  display: block;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

.crm-auth-page .login-alert-error,
.crm-auth-page .alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.crm-auth-page .login-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.crm-auth-page .alert-info {
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  text-align: left;
}

.crm-auth-page .crm-captcha {
  margin: 8px 0 4px;
  padding: 14px 16px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  text-align: left;
}

.crm-auth-page .crm-captcha-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a9ab0;
  margin-bottom: 10px;
}

.crm-auth-page .RadCaptcha {
  width: 100%;
}

.crm-auth-page .RadCaptcha table {
  width: auto;
  border: 0;
  border-collapse: collapse;
}

.crm-auth-page .RadCaptcha td {
  padding: 0 10px 8px 0;
  vertical-align: middle;
}

.crm-auth-page .RadCaptcha img,
.crm-auth-page .crm-captcha-img {
  display: block;
  height: 52px;
  width: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.crm-auth-page .RadCaptcha label,
.crm-auth-page .RadCaptcha span[id$="CaptchaTextBoxLabel"],
.crm-auth-page .RadCaptcha .rcText {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 6px;
  text-transform: none;
  letter-spacing: 0;
}

.crm-auth-page .RadCaptcha input[type="text"] {
  display: block;
  width: 180px;
  min-height: 38px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #1a1d23;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: none;
}

.crm-auth-page .RadCaptcha input[type="text"]:focus {
  border-color: #1a6fd4;
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
  outline: none;
}

.crm-auth-page .RadCaptcha a {
  display: inline-flex !important;
  align-items: center;
  width: auto !important;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #1a6fd4 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
}

.crm-auth-page .RadCaptcha a::after {
  content: "Refresh";
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
}

.crm-auth-page .RadCaptcha a:hover::after {
  text-decoration: underline;
}

.crm-auth-page .RadCaptcha .crm-field-error,
.crm-auth-page .RadCaptcha span[style*="color:Red"],
.crm-auth-page .RadCaptcha span[style*="color:red"] {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #d13232 !important;
}


/* ===== Navy sidebar hard override (end of file) ===== */
body.crm-shell .sidebar.crm-sidebar-shell,
.sidebar.crm-sidebar-shell {
  background: #0E1733 !important;
  background-color: #0E1733 !important;
  color: #ffffff !important;
}
body.crm-shell .sidebar.crm-sidebar-shell .sidebar-wrapper,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-logo-block,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-nav,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-user,
body.crm-shell .sidebar.crm-sidebar-shell .logo {
  background: #0E1733 !important;
  background-color: #0E1733 !important;
  color: #ffffff !important;
}
body.crm-shell .sidebar.crm-sidebar-shell a,
body.crm-shell .sidebar.crm-sidebar-shell .nav-link,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-link,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-sublink,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-label,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-user-name,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-user-link,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-icon,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-caret,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-abbr {
  color: #ffffff !important;
}
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-group-label {
  color: rgba(255, 255, 255, 0.55) !important;
}
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-link:hover,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-sublink:hover,
body.crm-shell .sidebar.crm-sidebar-shell .crm-sidebar-link--active {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}
