/* Compact, read-first customer work file. Existing CRM controls remain in the DOM for compatibility. */
body.animus-work-file-active .crm-command-panel,
body.animus-work-file-active .crm-file-header,
body.animus-work-file-active .crm-file-grid {
  display: none !important;
}

/* The estimator shares the command panel, so it remains visible when opened. */
body.animus-work-file-active.crm-estimator-active .crm-command-panel {
  display: block !important;
}

/* Work Files is a dedicated master-detail workspace; CRM data stays untouched. */
body.animus-unified-ui .animus-work-files-layout {
  grid-template-columns: minmax(270px, 300px) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  min-height: calc(100vh - 118px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.animus-unified-ui .animus-work-files-layout.animus-work-files-collapsed {
  grid-template-columns: 48px minmax(0, 1fr);
}

body.animus-unified-ui .animus-work-files-layout .crm-file-list-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.animus-work-files-collapse { position:absolute; z-index:20; top:14px; right:-15px; display:grid; width:30px; height:30px; place-items:center; padding:0; border:1px solid #d5e0ef; border-radius:999px; color:#174a9b; background:#fff; box-shadow:0 2px 7px rgba(15,23,42,.11); cursor:pointer; font-size:22px; line-height:1; }
.animus-work-files-layout .crm-file-list-panel { position:relative; }
.animus-work-files-collapsed .crm-file-list-panel { display:block; padding:8px; overflow:visible; }
.animus-work-files-collapsed .crm-file-list-panel > :not(.animus-work-files-collapse) { display:none; }
.animus-work-files-collapsed .animus-work-files-collapse { top:10px; right:8px; }

body.animus-unified-ui .animus-work-files-layout .crm-file-workspace {
  min-height: 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.animus-work-files-layout .crm-panel-heading {
  align-items: start;
  margin: 0 0 12px;
}

.animus-work-files-layout .crm-panel-heading .eyebrow {
  margin: 0 0 3px;
  color: #0e408d;
  font-size: 11px;
}

.animus-work-files-layout .crm-panel-heading h2 {
  margin: 0;
  color: #132246;
  font-size: 20px;
}

.animus-work-file-filter {
  position: absolute;
  width: 1px !important;
  height: 1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
}

.animus-work-file-filter-menu { position:relative; display:flex; justify-content:flex-end; margin:-40px 0 12px; }
.animus-work-file-filter-button { display:grid; width:35px; height:35px; place-items:center; border:1px solid #dce5f2; border-radius:7px; color:#164d9f; background:#fff; cursor:pointer; font-size:17px; line-height:1; }
.animus-work-file-filter-button:hover,.animus-work-file-filter-button[aria-expanded="true"] { border-color:#8ab5ff; background:#f3f7ff; }
.animus-work-file-filter-options { position:absolute; z-index:15; top:41px; right:0; width:210px; overflow:hidden; padding:5px; border:1px solid #dce5f2; border-radius:9px; background:#fff; box-shadow:0 12px 30px rgba(15,23,42,.14); }
.animus-work-file-filter-options[hidden] { display:none; }
.animus-work-file-filter-option { display:flex; align-items:center; justify-content:space-between; width:100%; gap:12px; padding:9px 10px; border:0; border-radius:6px; color:#263959; background:#fff; cursor:pointer; font:inherit; font-size:12px; font-weight:750; text-align:left; }
.animus-work-file-filter-option:hover { background:#f4f8ff; }
.animus-work-file-filter-option.active { color:#fff; background:#2563eb; }
.animus-work-file-filter-option b { font-size:11px; }

.animus-work-file-tools {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 7px;
  margin-bottom: 14px;
}

.animus-work-file-tools::before {
  content: "⌕";
  position: absolute;
  left: 11px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: #8fa1ba;
  font-size: 16px;
  font-weight: 800;
  pointer-events: none;
}

.animus-work-file-tools input,
.animus-work-file-tools select,
.animus-file-search-button {
  min-width: 0;
  height: 35px;
  margin: 0;
  border: 1px solid #dce5f2;
  border-radius: 7px;
  background: #fff;
  color: #263959;
  font: inherit;
  font-size: 11px;
}

.animus-work-file-tools input { padding: 0 10px 0 32px; }
.animus-work-file-tools select { padding: 0 7px; font-weight: 750; }
.animus-file-search-button { display: none; }

.animus-work-files-layout .crm-file-list {
  display: grid;
  flex: 1;
  gap: 0;
  grid-auto-rows: min-content;
  align-content: start;
  max-height: none;
  overflow: auto;
  padding: 0;
}

.animus-work-files-layout .crm-file-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px;
  align-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 9px 3px;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.animus-work-files-layout .crm-file-card:first-child { border-top: 1px solid #edf1f6; }
.animus-work-files-layout .crm-file-card:hover { background: #f8fbff; }
.animus-work-files-layout .crm-file-card.active { margin:3px 0; padding:8px; border:1px solid #8ab5ff; border-radius:8px; background:linear-gradient(105deg,#f3f7ff,#fff); box-shadow:0 3px 10px rgba(37,99,235,.08); }

.animus-file-card-copy { min-width: 0; text-align: left; }
.animus-file-card-copy strong,
.animus-file-card-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.animus-file-card-copy strong { margin-bottom:2px; color:#15284a; font-size:14px; font-weight:850; }
.animus-file-card-copy small { color:#1d559f; font-size:11px; font-weight:800; }

.animus-file-card-meta { display:grid; justify-items:end; min-width:0; }
.animus-file-status { max-width:84px; overflow:hidden; padding:4px 6px; border-radius:999px; font-size:9px; font-weight:850; text-overflow:ellipsis; white-space:nowrap; }
.animus-file-status-inline { display:inline-block; max-width:100%; overflow:hidden; margin-top:5px; padding:3px 6px; border-radius:999px; font-size:9px; font-weight:850; line-height:1.1; text-overflow:ellipsis; white-space:nowrap; }
.animus-file-status.new-lead,.animus-file-status-inline.new-lead { background:#16a34a; color:#fff; }
.animus-file-status.contact-established,.animus-file-status-inline.contact-established { background:#fee2e2; color:#c2410c; }
.animus-file-status.contact-attempted,.animus-file-status-inline.contact-attempted { background:#991b1b; color:#fff; }
.animus-file-status.inspection-completed,.animus-file-status-inline.inspection-completed { background:#efe7ff; color:#6d28d9; }
.animus-file-status.negotiation,.animus-file-status-inline.negotiation { background:#dc2626; color:#fff; }
.animus-file-status.in-progress,.animus-file-status-inline.in-progress { background:#2563eb; color:#fff; }
.animus-file-status.lost-closed,.animus-file-status-inline.lost-closed { background:#e5e7eb; color:#4b5563; }
.animus-file-status.closed-paid,.animus-file-status-inline.closed-paid { background:#374151; color:#fff; }
.animus-file-chevron { color: #6d7f98 !important; font-size: 24px !important; font-weight: 300; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.animus-work-file {
  color: #10213f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-width: 0;
}

.animus-work-file button,
.animus-work-file a {
  font: inherit;
}

.animus-record-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #174a9b;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.animus-record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.animus-record-person {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.animus-record-avatar {
  display: grid;
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #e7edff, #f6f3ff);
  color: #102f6a;
  font-size: 28px;
  font-weight: 800;
}

.animus-record-title h2 {
  margin: 0 0 8px;
  color: #101d36;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: 0;
}

.animus-record-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.animus-customer-info { position: relative; }
.animus-customer-info summary {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid #d8e3f3;
  border-radius: 7px;
  color: #174a9b;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  list-style: none;
}
.animus-customer-info summary::-webkit-details-marker { display: none; }
.animus-customer-info-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: min(330px, calc(100vw - 52px));
  gap: 7px;
  padding: 14px;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .14);
  color: #29415f;
  font-size: 12px;
}
.animus-customer-info-panel strong { color: #102a5e; font-size: 13px; }
.animus-customer-info-panel span { overflow-wrap: anywhere; }
.animus-customer-info-panel a { color: #1552bd; font-weight: 700; text-decoration: none; }
.animus-customer-info-panel a:hover { text-decoration: underline; }
.animus-customer-info-panel .animus-record-button { justify-self: start; margin-top: 3px; }

.animus-record-file-number {
  margin: 0 0 7px;
  color: #1552bd;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.animus-record-subtitle {
  margin: 0 0 11px;
  color: #52627e;
  font-size: 14px;
}

.animus-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.animus-status-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.animus-status-new-lead { background:#16a34a; color:#fff; }
.animus-status-contact-established { background:#fee2e2; color:#c2410c; }
.animus-status-contact-attempted { background:#991b1b; color:#fff; }
.animus-status-inspection-completed { background:#efe7ff; color:#6d28d9; }
.animus-status-negotiation { background:#dc2626; color:#fff; }
.animus-status-in-progress { background:#2563eb; color:#fff; }
.animus-status-lost-closed { background:#e5e7eb; color:#4b5563; }
.animus-status-closed-paid { background:#374151; color:#fff; }

.animus-record-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: 480px;
}

.animus-record-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid #dce4f0;
  border-radius: 9px;
  background: #fff;
  color: #0c2c63;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.animus-record-button:hover { border-color: #2563eb; color: #1d4ed8; }
.animus-record-button.primary { border-color: #2563eb; background: #2563eb; color: #fff; }
.animus-record-button.primary:hover { background: #1d4ed8; color: #fff; }
.animus-record-button.small { min-height: 32px; padding: 0 10px; font-size: 12px; }

.animus-more-menu { position: relative; }
.animus-more-menu summary { list-style: none; }
.animus-more-menu summary::-webkit-details-marker { display: none; }
.animus-more-menu-panel {
  position: absolute;
  z-index: 15;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  width: 175px;
  padding: 7px;
  border: 1px solid #dce4f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
}
.animus-more-menu-panel button { justify-content: flex-start; border: 0; }
.animus-more-menu-panel button:hover { background: #f4f7fb; }
.animus-more-menu-panel .danger { color: #c42d2d; }

.animus-contact-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 12px 0 18px;
}
.animus-contact-actions .animus-record-button { min-width: 98px; }

body.animus-unified-ui .animus-work-files-layout .animus-work-file { max-width: none; }
body.animus-unified-ui .animus-work-files-layout .crm-file-workspace { gap: 16px; }

@media (max-width: 1240px) {
  body.animus-unified-ui .animus-work-files-layout { grid-template-columns: minmax(300px, 330px) minmax(0, 1fr); }
  .animus-file-card-meta { display: none; }
  .animus-work-files-layout .crm-file-card { grid-template-columns: minmax(0, 1fr) 13px; }
}

@media (max-width: 920px) {
  body.animus-unified-ui .animus-work-files-layout { grid-template-columns: 1fr; }
  body.animus-unified-ui .animus-work-files-layout .crm-file-list-panel { max-height: 440px; }
  .animus-file-card-meta { display: grid; }
  .animus-work-files-layout .crm-file-card { grid-template-columns: minmax(0, 1fr) 13px; }
}

.animus-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin: 0 0 18px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.animus-summary-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  padding: 12px 13px;
  border-right: 1px solid #e6ebf3;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  background: #fff;
  text-align: left;
}
.animus-summary-cell.clickable { cursor: pointer; }
.animus-summary-cell.clickable:hover { background: #f7faff; }
.animus-summary-cell:last-child { border-right: 0; }
.animus-summary-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 10px;
  background: #ecf2ff;
  color: #2563eb;
  font-size: 15px;
}
.animus-summary-cell:nth-child(1) .animus-summary-icon { background: #e7f8ef; color: #16824b; }
.animus-summary-cell:nth-child(3) .animus-summary-icon { background: #fff3e1; color: #dc7a00; }
.animus-summary-cell:nth-child(4) .animus-summary-icon { background: #f1ebff; color: #713fd2; }
.animus-summary-cell:nth-child(6) .animus-summary-icon { background: #fff3e1; color: #d48914; }
.animus-summary-copy { min-width: 0; }
.animus-summary-copy span { display: block; margin-bottom: 2px; color: #69758a; font-size: 10px; font-weight: 750; }
.animus-summary-copy strong { display: block; overflow: hidden; color: #102a5e; font-size: 16px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.animus-summary-cell:nth-child(4) .animus-summary-copy strong { overflow: hidden; font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.animus-summary-copy small { display: block; overflow: hidden; margin-top: 1px; color: #233c6f; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.animus-summary-cell.balance .animus-summary-copy strong { color: #d32929; }

.animus-record-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.animus-record-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 50px;
  gap: 8px;
  padding: 0 17px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #243653;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.animus-record-tab.active { border-bottom-color: #2563eb; color: #1558d6; }

.animus-work-grid {
  display: grid;
  grid-template-columns: minmax(220px, .95fr) minmax(360px, 1.35fr) minmax(260px, .95fr);
  gap: 14px;
  align-items: start;
}
.animus-work-grid-focused { grid-template-columns: minmax(0, 1.7fr) minmax(290px, .8fr); }
.animus-work-grid-focused .animus-work-column.right { grid-column: auto; grid-template-columns: none; }
.animus-work-column { display: grid; gap: 14px; min-width: 0; }
.animus-info-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .035);
}
.animus-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid #edf0f5;
}
.animus-card-head h3 { display: flex; align-items: center; gap: 10px; margin: 0; color: #102354; font-size: 15px; }
.animus-card-head h3 .card-mark { color: #2563eb; font-size: 17px; }
.animus-info-list { margin: 0; padding: 0 16px; }
.animus-info-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 32px; align-items: center; gap: 9px; min-height: 67px; border-bottom: 1px solid #eef1f5; }
.animus-info-row:last-child { border-bottom: 0; }
.animus-info-row .item-icon { color: #587096; text-align: center; }
.animus-info-row dt { margin: 0 0 3px; color: #71809a; font-size: 11px; font-weight: 750; }
.animus-info-row dd { margin: 0; color: #172849; font-size: 13px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.animus-info-row .row-action { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid #dce4f0; border-radius: 7px; color: #154baf; text-decoration: none; }

.animus-progress-card { padding-bottom: 14px; }
.animus-progress-line { display: grid; grid-template-columns: repeat(7, 1fr); position: relative; margin: 25px 18px 21px; }
.animus-progress-line::before { position: absolute; top: 9px; right: 8%; left: 8%; z-index: 0; height: 3px; background: #d9e0eb; content: ""; }
.animus-progress-step { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; color: #71809a; font-size: 10px; font-weight: 750; text-align: center; }
.animus-progress-dot { display: grid; width: 19px; height: 19px; place-items: center; border: 3px solid #cbd5e1; border-radius: 50%; background: #fff; color: #fff; font-size: 10px; }
.animus-progress-step.done { color: #1e426f; }
.animus-progress-step.done .animus-progress-dot { border-color: #14a35c; background: #14a35c; }
.animus-progress-step.current { color: #1f4e9c; }
.animus-progress-step.current .animus-progress-dot { border-color: #f59e0b; background: #fff9eb; }
.animus-status-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 16px; border: 1px solid #dce4f0; border-radius: 8px; background: #fbfcfe; }
.animus-status-details div { padding: 13px; }
.animus-status-details div + div { border-left: 1px solid #e6ebf3; }
.animus-status-details span { display: block; margin-bottom: 5px; color: #66758c; font-size: 11px; font-weight: 700; }
.animus-status-details strong { color: #15274a; font-size: 13px; }
.animus-status-details .closed-value { color: #d32929; }

.animus-activity { padding: 0 16px 4px; }
.animus-activity-row { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) 80px; gap: 10px; padding: 16px 0; border-bottom: 1px solid #edf1f6; }
.animus-activity-row:last-child { border-bottom: 0; }
.animus-activity-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: #e7f8ef; color: #13834a; font-size: 14px; }
.animus-activity-row:nth-child(2n) .animus-activity-icon { background: #ebf1ff; color: #2563eb; }
.animus-activity-row:nth-child(3n) .animus-activity-icon { background: #fff4df; color: #cd7e0b; }
.animus-activity-main strong { display: block; color: #18305c; font-size: 12px; }
.animus-activity-main p { margin: 4px 0 0; color: #65748c; font-size: 12px; line-height: 1.4; }
.animus-activity-time { color: #78859a; font-size: 10px; line-height: 1.4; text-align: right; }

.animus-next-inner { margin: 16px; padding: 16px; border: 1px solid #dce8ff; border-radius: 9px; background: linear-gradient(135deg, #f1f6ff, #fff); }
.animus-next-highlight { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 16px; }
.animus-next-icon { display: grid; width: 52px; height: 52px; flex: 0 0 52px; place-items: center; border-radius: 14px; background: #e4eeff; color: #1557d6; font-size: 23px; }
.animus-next-highlight strong { display: block; color: #0d3d97; font-size: 14px; }
.animus-next-highlight p { margin: 5px 0 0; color: #2f4f84; font-size: 12px; line-height: 1.45; }
.animus-next-meta { margin: 0 0 14px; }
.animus-next-meta div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #dce5f3; color: #60708a; font-size: 12px; }
.animus-next-meta strong { color: #19305c; text-align: right; }
.animus-next-empty { margin: 16px; color: #66758c; font-size: 13px; }

.animus-assigned-card { min-height: 118px; }
.animus-assigned-actions { display: flex; gap: 7px; }
.animus-assigned-person {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  width: calc(100% - 32px);
  align-items: center;
  gap: 10px;
  margin: 14px 16px 16px;
  padding: 11px;
  border: 1px solid #e1e9f5;
  border-radius: 9px;
  background: #f8fbff;
  color: #153460;
  text-align: left;
  cursor: default;
}
.animus-assigned-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #b97206; background: #fff2dc; font-size: 17px; }
.animus-assigned-person small { display: block; margin-bottom: 3px; color: #70809a; font-size: 10px; font-weight: 750; }
.animus-assigned-person strong { display: block; overflow: hidden; color: #14325e; font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }

.animus-file-notes-card { min-height: 178px; }
.animus-file-note-list { display: grid; gap: 10px; max-height: 330px; margin: 16px; overflow: auto; padding-right: 4px; }
.animus-file-note-entry { padding: 14px; border: 1px solid #e1e8f2; border-radius: 8px; background: #fff; }
.animus-file-note-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.animus-file-note-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.animus-file-note-entry p { margin: 0; color: #243653; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.animus-file-note-entry small { display: block; color: #71809a; font-size: 10px; font-weight: 700; }
.animus-file-note-entry .animus-file-note-edited { margin-top: 12px; }
.animus-recent-activity-card { margin-top: 14px; }

.animus-tab-panel { min-width: 0; }
.animus-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 18px; }
.animus-detail-card { min-width: 0; min-height: 0; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 9px; background: #fbfcfe; }
.animus-detail-card:last-child { grid-column: 1 / -1; }
.animus-detail-card h4 { margin: 0; padding: 13px 14px; border-bottom: 1px solid #e7edf5; color: #17345f; font-size: 13px; font-weight: 800; }
.animus-detail-card .animus-info-list { padding: 0 14px 6px; }
.animus-detail-pair { display: grid; grid-template-columns: minmax(145px, .85fr) minmax(180px, 1.15fr); align-items: center; gap: 18px; min-height: 60px; border-bottom: 1px solid #e8edf4; }
.animus-detail-pair:last-child { border-bottom: 0; }
.animus-detail-pair dt { margin: 0; color: #60708a; font-size: 12px; font-weight: 780; }
.animus-detail-pair dd { margin: 0; color: #152d56; font-size: 14px; font-weight: 760; line-height: 1.35; overflow-wrap: anywhere; }
.animus-empty-panel { padding: 36px; border: 1px dashed #cfd8e7; border-radius: 10px; background: #fff; color: #6b7a91; text-align: center; }
.animus-financial-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.animus-financial-value { padding: 18px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.animus-financial-value.clickable { cursor: pointer; text-align: left; }
.animus-financial-value.clickable:hover { border-color: #9bbcff; background: #f7faff; }
.animus-financial-value span { display: block; color: #71809a; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.animus-financial-value strong { display: block; margin-top: 9px; color: #0b3f94; font-size: 23px; }
.animus-financial-value.danger strong { color: #d32929; }
.animus-action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.animus-estimate-actions-inner { padding: 18px; }
.animus-estimate-actions-inner > p { margin: 0; color: #61718a; font-size: 13px; }
.animus-estimate-actions-inner small { display: block; margin-top: 15px; color: #526681; font-size: 12px; font-weight: 700; }
.animus-estimate-empty {
  display: grid;
  gap: 6px;
  margin: 0 18px 18px;
  padding: 28px;
  border: 1px dashed #cfd8e7;
  border-radius: 10px;
  background: #fbfdff;
  color: #66758c;
  text-align: center;
}
.animus-estimate-empty strong { color: #17345f; font-size: 15px; }
.animus-embedded-estimate {
  margin: 0 18px 18px;
  border: 1px solid #dfe7f2;
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}
.animus-estimate-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid #edf1f6;
  background: linear-gradient(180deg, #fbfdff, #fff);
}
.animus-estimate-kicker {
  display: inline-flex;
  margin-bottom: 6px;
  color: #1558d6;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.animus-estimate-preview-head h3 {
  margin: 0;
  color: #0f2347;
  font-size: 23px;
  line-height: 1.15;
}
.animus-estimate-preview-head p { margin: 7px 0 0; color: #65748c; font-size: 13px; font-weight: 700; }
.animus-estimate-document-meta {
  display: grid;
  min-width: 190px;
  align-content: start;
  gap: 8px;
  text-align: right;
}
.animus-estimate-document-meta span { color: #71809a; font-size: 11px; font-weight: 750; }
.animus-estimate-document-meta strong { display: block; margin-top: 2px; color: #14325e; font-size: 13px; }
.animus-estimate-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf1f6;
}
.animus-estimate-preview-grid section {
  border: 1px solid #e3eaf4;
  border-radius: 9px;
  background: #fbfcfe;
}
.animus-estimate-preview-grid h4,
.animus-estimate-section-title h4,
.animus-estimate-notes h4 {
  margin: 0;
  color: #17345f;
  font-size: 13px;
  font-weight: 850;
}
.animus-estimate-preview-grid h4 { padding: 12px 14px; border-bottom: 1px solid #e9eef6; }
.animus-estimate-preview-grid dl { margin: 0; padding: 4px 14px 10px; }
.animus-estimate-preview-grid dl div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #eef2f7;
}
.animus-estimate-preview-grid dl div:last-child { border-bottom: 0; }
.animus-estimate-preview-grid dt { color: #71809a; font-size: 11px; font-weight: 800; }
.animus-estimate-preview-grid dd { margin: 0; color: #152d56; font-size: 12px; font-weight: 760; line-height: 1.35; overflow-wrap: anywhere; }
.animus-estimate-lines { padding: 18px 20px 0; }
.animus-estimate-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.animus-estimate-section-title span { color: #71809a; font-size: 11px; font-weight: 800; }
.animus-estimate-line-table {
  overflow: hidden;
  border: 1px solid #e3eaf4;
  border-radius: 9px;
}
.animus-estimate-line-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 92px 108px;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 11px 14px;
  border-bottom: 1px solid #edf1f6;
  color: #263b5c;
  font-size: 12px;
}
.animus-estimate-line-row:last-child { border-bottom: 0; }
.animus-estimate-line-row > strong:last-child { color: #102354; text-align: right; }
.animus-estimate-line-row span { color: #66758c; font-weight: 700; text-align: right; }
.animus-estimate-line-row small { display: block; margin-top: 3px; color: #71809a; font-weight: 650; line-height: 1.35; }
.animus-estimate-line-row.section {
  display: block;
  min-height: 0;
  background: #f2f6fc;
  color: #102354;
}
.animus-estimate-line-row.subline { padding-left: 30px; background: #fcfdff; }
.animus-estimate-mini-empty {
  padding: 18px;
  border: 1px dashed #cfd8e7;
  border-radius: 9px;
  color: #66758c;
  font-size: 13px;
  text-align: center;
}
.animus-estimate-notes {
  display: grid;
  gap: 12px;
  padding: 18px 20px 0;
}
.animus-estimate-notes div {
  padding: 14px;
  border: 1px solid #e3eaf4;
  border-radius: 9px;
  background: #fbfcfe;
}
.animus-estimate-notes p {
  margin: 8px 0 0;
  color: #334766;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.animus-estimate-totals {
  display: grid;
  justify-content: end;
  gap: 6px;
  padding: 18px 20px 20px;
}
.animus-estimate-totals div {
  display: grid;
  grid-template-columns: 135px 125px;
  align-items: center;
  min-height: 32px;
  color: #66758c;
  font-size: 12px;
}
.animus-estimate-totals strong { color: #102354; font-size: 14px; text-align: right; }
.animus-estimate-totals .grand {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #dfe7f2;
  color: #102354;
  font-weight: 850;
}
.animus-estimate-totals .grand strong { color: #1558d6; font-size: 21px; }
.animus-documents-panel { min-width: 0; }
.animus-document-grid {
  display: grid;
  gap: 16px;
  padding: 18px;
}
.animus-document-box {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfcfe;
}
.animus-document-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 15px;
  border-bottom: 1px solid #e8edf5;
  background: #fff;
}
.animus-document-box-head h4 {
  margin: 0;
  color: #102354;
  font-size: 14px;
  font-weight: 850;
}
.animus-document-box-head span {
  color: #66758c;
  font-size: 11px;
  font-weight: 800;
}
.animus-document-list {
  display: grid;
  padding: 4px 12px 10px;
}
.animus-document-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(76px, auto);
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #e8edf5;
  background: transparent;
  color: #263b5c;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.animus-document-row:last-child { border-bottom: 0; }
.animus-document-row:hover { color: #1558d6; }
.animus-document-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #eaf1ff;
  color: #1558d6;
  font-size: 10px;
  font-weight: 900;
}
.animus-document-thumb {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  background: #eaf1ff;
  color: #1558d6;
  font-size: 10px;
  font-weight: 900;
}
.animus-document-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.animus-document-row strong,
.animus-document-row small,
.animus-document-row b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.animus-document-row strong { color: inherit; font-size: 13px; font-weight: 850; }
.animus-document-row small { margin-top: 4px; color: #6d7b91; font-size: 11px; font-weight: 700; }
.animus-document-row b { color: #102354; font-size: 12px; font-weight: 850; text-align: right; }
.animus-document-empty {
  padding: 24px 18px;
  color: #66758c;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}
.animus-document-actions { background: #fff; }
.animus-document-actions .animus-action-row { margin: 0; padding: 15px; }

.animus-inline-editor { margin-bottom: 16px; padding: 16px; border: 1px solid #bfd4ff; border-radius: 10px; background: #f8fbff; }
.animus-inline-editor h3 { margin: 0 0 13px; color: #123b80; font-size: 15px; }
.animus-inline-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.animus-inline-editor label { display: grid; gap: 6px; color: #51627d; font-size: 12px; font-weight: 750; }
.animus-inline-editor input, .animus-inline-editor select { min-height: 38px; padding: 0 10px; border: 1px solid #cfd9e8; border-radius: 7px; background: #fff; color: #142747; font: inherit; }
.animus-inline-editor .wide { grid-column: 1 / -1; }
.animus-inline-editor-details .animus-inline-editor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.animus-file-note-modal { width: min(620px, calc(100vw - 32px)); }
.animus-file-note-help { margin: 0 0 16px; color: #62728a; font-size: 13px; line-height: 1.45; }
.animus-file-note-label { display: grid; gap: 8px; color: #263b5c; font-size: 13px; font-weight: 800; }
.animus-file-note-label textarea { min-height: 190px; resize: vertical; padding: 13px; border: 1px solid #cfd9e8; border-radius: 9px; background: #fbfdff; color: #142747; font: inherit; line-height: 1.5; }
.animus-file-note-label textarea:focus { outline: 3px solid rgba(37, 99, 235, .14); border-color: #4f8cff; background: #fff; }
.crm-choice-actions.animus-file-note-actions { display: flex; justify-content: flex-end; gap: 10px; }
.crm-choice-actions.animus-file-note-actions .icon-button { width: auto; min-width: 132px; min-height: 44px; }

@media (max-width: 1240px) {
  .animus-work-grid { grid-template-columns: minmax(230px, 1fr) minmax(330px, 1.35fr); }
  .animus-work-column.right { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .animus-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .animus-summary-cell:nth-child(2n) { border-right: 0; }
  .animus-summary-cell:nth-child(-n+2) { border-bottom: 1px solid #e6ebf3; }
  .animus-inline-editor-details .animus-inline-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .animus-work-grid-focused { grid-template-columns: minmax(0, 1.45fr) minmax(270px, .85fr); }
}

@media (max-width: 850px) {
  .animus-record-header { display: grid; }
  .animus-record-actions, .animus-contact-actions { justify-content: flex-start; }
  .animus-work-grid, .animus-work-column.right, .animus-detail-grid { grid-template-columns: 1fr; }
  .animus-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .animus-summary-cell:nth-child(2n) { border-right: 0; }
  .animus-summary-cell:nth-child(-n+2) { border-bottom: 1px solid #e6ebf3; }
  .animus-financial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .animus-work-grid-focused { grid-template-columns: 1fr; }
  .animus-detail-pair { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
  .animus-estimate-preview-head,
  .animus-estimate-preview-grid { grid-template-columns: 1fr; }
  .animus-estimate-preview-head { display: grid; }
  .animus-estimate-document-meta { min-width: 0; text-align: left; }
  .animus-estimate-line-row { grid-template-columns: minmax(0, 1fr) 62px 90px; }
  .animus-estimate-line-row span:nth-of-type(2) { display: none; }
  .animus-estimate-totals { justify-content: stretch; }
  .animus-estimate-totals div { grid-template-columns: 1fr auto; }
  .animus-document-grid { padding: 14px; }
  .animus-document-row { grid-template-columns: 40px minmax(0, 1fr); }
  .animus-document-row b { grid-column: 2; text-align: left; }
}

/* Work Files dark theme: loaded after the shell, so this wins over light card defaults. */
body.animus-dark-theme.animus-unified-ui .animus-work-files-layout {
  background: #111827 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.animus-dark-theme.animus-unified-ui .animus-work-files-layout .crm-file-list-panel,
body.animus-dark-theme.animus-unified-ui .animus-work-files-layout .crm-file-workspace {
  background: #172234 !important;
  border-color: #334155 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18) !important;
}

body.animus-dark-theme .animus-work-files-collapse,
body.animus-dark-theme .animus-work-file-filter-button,
body.animus-dark-theme .animus-work-file-filter-options,
body.animus-dark-theme .animus-work-file-filter-option,
body.animus-dark-theme .animus-work-file-tools input,
body.animus-dark-theme .animus-work-file-tools select {
  background: #0f1724 !important;
  border-color: #3b4b63 !important;
  color: #dbeafe !important;
}

body.animus-dark-theme .animus-work-file-filter-button:hover,
body.animus-dark-theme .animus-work-file-filter-button[aria-expanded="true"],
body.animus-dark-theme .animus-work-file-filter-option:hover {
  background: #1d2d44 !important;
  border-color: #60a5fa !important;
  color: #fff !important;
}

body.animus-dark-theme .animus-work-file-filter-option.active {
  background: #2563eb !important;
  color: #fff !important;
}

body.animus-dark-theme .animus-work-files-layout .crm-panel-heading .eyebrow {
  color: #93c5fd !important;
}

body.animus-dark-theme .animus-work-files-layout .crm-panel-heading h2 {
  color: #f8fbff !important;
}

body.animus-dark-theme .animus-work-files-layout .crm-file-list {
  background: transparent !important;
}

body.animus-dark-theme .animus-work-files-layout .crm-file-card {
  margin: 0 0 8px !important;
  padding: 10px 11px !important;
  border: 1px solid #263449 !important;
  border-radius: 9px !important;
  background: #0f1724 !important;
  box-shadow: none !important;
}

body.animus-dark-theme .animus-work-files-layout .crm-file-card:first-child {
  border-top-color: #263449 !important;
}

body.animus-dark-theme .animus-work-files-layout .crm-file-card:hover {
  background: #1d2d44 !important;
  border-color: #3b4b63 !important;
}

body.animus-dark-theme .animus-work-files-layout .crm-file-card.active {
  background: #1f3555 !important;
  border-color: #60a5fa !important;
  box-shadow: inset 3px 0 0 #2563eb !important;
}

body.animus-dark-theme .animus-file-card-copy strong,
body.animus-dark-theme .animus-record-title h2,
body.animus-dark-theme .animus-info-card h3,
body.animus-dark-theme .animus-section-card h3,
body.animus-dark-theme .animus-section-card h2 {
  color: #f8fbff !important;
}

body.animus-dark-theme .animus-file-card-copy small,
body.animus-dark-theme .animus-record-subtitle,
body.animus-dark-theme .animus-detail-pair dt,
body.animus-dark-theme .animus-info-row dt {
  color: #b6c3d4 !important;
}

body.animus-dark-theme .animus-file-chevron {
  color: #8fa3bd !important;
}

body.animus-dark-theme .animus-work-file,
body.animus-dark-theme .animus-record-header,
body.animus-dark-theme .animus-summary-strip,
body.animus-dark-theme .animus-tabs,
body.animus-dark-theme .animus-record-tabs,
body.animus-dark-theme .animus-work-column > section,
body.animus-dark-theme .animus-section-card,
body.animus-dark-theme .animus-info-card,
body.animus-dark-theme .animus-job-progress,
body.animus-dark-theme .animus-next-action-card,
body.animus-dark-theme .animus-file-notes-card,
body.animus-dark-theme .animus-recent-activity-card,
body.animus-dark-theme .animus-documents-card,
body.animus-dark-theme .animus-financial-card,
body.animus-dark-theme .animus-detail-panel,
body.animus-dark-theme .animus-empty-panel {
  background: #111a28 !important;
  border-color: #334155 !important;
  color: #eef4fb !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18) !important;
}

body.animus-dark-theme .animus-summary-cell,
body.animus-dark-theme .animus-next-inner,
body.animus-dark-theme .animus-status-details,
body.animus-dark-theme .animus-file-note-entry,
body.animus-dark-theme .animus-detail-pair,
body.animus-dark-theme .animus-info-row,
body.animus-dark-theme .animus-financial-value,
body.animus-dark-theme .animus-document-row,
body.animus-dark-theme .animus-inline-editor {
  background: #0f1724 !important;
  border-color: #263449 !important;
  color: #eef4fb !important;
}

body.animus-dark-theme .animus-record-button,
body.animus-dark-theme .animus-customer-info summary,
body.animus-dark-theme .animus-inline-editor input,
body.animus-dark-theme .animus-inline-editor select,
body.animus-dark-theme .animus-file-note-label textarea {
  background: #0f1724 !important;
  border-color: #3b4b63 !important;
  color: #dbeafe !important;
}

body.animus-dark-theme .animus-record-button:hover,
body.animus-dark-theme .animus-customer-info summary:hover {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}

body.animus-dark-theme .animus-customer-info-panel,
body.animus-dark-theme .animus-document-actions {
  background: #111a28 !important;
  border-color: #334155 !important;
  color: #eef4fb !important;
}

body.animus-dark-theme .animus-record-tabs {
  background: #111a28 !important;
  border-color: #334155 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18) !important;
}

body.animus-dark-theme .animus-record-tab {
  background: transparent !important;
  border-bottom-color: transparent !important;
  color: #b6c3d4 !important;
}

body.animus-dark-theme .animus-record-tab:hover {
  color: #f8fbff !important;
}

body.animus-dark-theme .animus-record-tab.active {
  border-bottom-color: #60a5fa !important;
  color: #93c5fd !important;
}
