/* CRM 0.3.7 — one visual language across every existing page.
   Home is source of truth; no changes to block structure or routes. */
:root {font-family:"Segoe UI Variable","Segoe UI",Inter,Arial,sans-serif;font-weight:400;color:#222741}
body,.dashboard-page {font-family:"Segoe UI Variable","Segoe UI",Inter,Arial,sans-serif;font-weight:400}
.main,.dashboard-page .main {
  background:radial-gradient(ellipse 720px 410px at 14% 7%,#ffe9d58a,transparent 78%),
             radial-gradient(ellipse 820px 480px at 88% 10%,#e7e2ff9c,transparent 80%),
             linear-gradient(160deg,#fffbf7 0%,#faf7fb 55%,#f4f6fd 100%);
}
.app-shell .sidebar,.dashboard-page .sidebar {
  background:linear-gradient(165deg,#071831 0%,#0d203f 58%,#111c3b 100%);
  border-right:1px solid #1b294b;
  width:270px;flex-basis:270px;padding:22px 13px 17px;
  position:sticky;top:0;height:100vh;overflow:hidden auto;
}
.app-shell .sidebar::before {content:"";position:absolute;left:-85px;bottom:65px;width:350px;height:200px;pointer-events:none;background:linear-gradient(135deg,transparent 45%,#16bcaf16 47%,transparent 50%),linear-gradient(130deg,transparent 68%,#7775df1f 69%,transparent 76%)}
.app-shell .sidebar .brand,.dashboard-page .sidebar .brand {padding:9px 13px 21px;letter-spacing:-.7px}
.app-shell .sidebar .brand-title,.dashboard-page .sidebar .brand-title {font-size:27px;line-height:1.15;font-weight:750;color:#fff;letter-spacing:-.7px}
.app-shell .sidebar .brand small,.dashboard-page .sidebar .brand small {color:#b5c2df;font-size:11px;font-weight:400;letter-spacing:.01em;margin-top:5px}
.app-shell .sidebar .side-nav,.dashboard-page .sidebar .side-nav{gap:3px}
.app-shell .sidebar .side-nav>a,.app-shell .sidebar .sidebar-settings summary,.dashboard-page .sidebar .side-nav>a,.dashboard-page .sidebar .sidebar-settings summary {font-size:12.4px;font-weight:500;padding:11px 13px;min-height:42px;line-height:1.3;border-radius:12px;white-space:normal;overflow-wrap:anywhere}
.app-shell .sidebar .side-nav>a.selected,.dashboard-page .sidebar .side-nav>a.selected{background:linear-gradient(112deg,#6e5ed7 0%,#463db6 100%);box-shadow:0 7px 20px #06092655,inset 0 1px 0 #bcb5ff50}
.app-shell .sidebar .side-nav>a .ui-icon,.dashboard-page .sidebar .side-nav>a .ui-icon {width:19px;height:19px;flex:none}
.app-shell .sidebar-bottom,.dashboard-page .sidebar-bottom {position:relative;z-index:1;padding:17px 7px 0}
.app-shell .top-bar,.dashboard-page .top-bar {min-height:74px;height:auto;padding:12px 24px;display:flex;align-items:center;gap:14px;background:rgba(255,252,249,.84);border-bottom:1px solid #ebe4ed;box-shadow:0 3px 16px #26213b0a}
.app-shell .dashboard-top-context {display:flex;align-items:center;gap:12px;min-width:0;flex:0 0 auto}
.app-shell .dash-top-home{display:flex;align-items:center;gap:9px;padding-right:12px;border-right:1px solid #d9d4e4;color:#1d2140}
.app-shell .dash-top-home b {font-size:17px;font-weight:670;letter-spacing:-.25px;white-space:nowrap}
.app-shell .dash-top-home .ui-icon {width:20px;height:20px}
.app-shell .dash-top-date {font-size:11px;font-weight:400;color:#717c99;white-space:nowrap}
.app-shell .global-search,.dashboard-page .global-search{flex:1 1 275px;min-width:110px;max-width:490px;height:44px;margin-left:auto;background:#fffefa;border:1px solid #e8e0e8;border-radius:16px;box-shadow:0 7px 18px #382b5616}
.app-shell .global-search input {font-size:12px;font-weight:400}
.app-shell .top-quick-menu summary,.dashboard-page .top-quick-menu summary {font-weight:590;font-size:12px;box-shadow:0 8px 19px #5745bc2c}
.app-shell .content,.dashboard-page .content{max-width:1880px;padding:25px clamp(16px,1.8vw,31px) 50px}
/* Card surfaces and field weights match home, without hard bold text. */
.panel,.client-form-card,.client-editor-group,.workspace-mini,.filters-panel,.client-workspace-grid>.panel,.metric-card,.seller-branding-box{border:1px solid #eae3eb!important;border-radius:20px!important;background:#fffdfb!important;box-shadow:0 12px 26px #34304d10,0 2px 5px #37304409!important}
.page-heading h1 {font-size:27px;font-weight:680;letter-spacing:-.5px}
.page-heading .subheading,.muted,.cell-secondary {font-weight:400}
.eyebrow {font-weight:600}
.panel-heading h2,.client-section-title h2,h2 {font-weight:660;letter-spacing:-.3px}
h3 {font-weight:620}
.btn,.top-quick-menu summary {font-weight:590}
label,.filter-label,.field-note {font-weight:480}
input,textarea,select {font-weight:400}
:where(table) th {font-weight:600!important}
:where(table) td {font-weight:400}
.entity-link,td strong,.status-badge {font-weight:550!important}
.count-pill {font-weight:600}
/* Preserve reference dashboard's exact block arrangement; reduce excess typography weight. */
.dashboard-page .dash35-greeting {font-weight:690;letter-spacing:-.55px}
.dashboard-page .dash35-metric-name {font-weight:590}
.dashboard-page .dash35-metric strong {font-weight:700}
.dashboard-page .dash35-section-header h2 {font-weight:660;letter-spacing:-.25px}
.dashboard-page .dash35-section-header>a {font-weight:550}
.dashboard-page .dash35-action span {font-weight:590}
.dashboard-page .dash35-table th {font-weight:570!important}
.dashboard-page .dash35-table td {font-weight:430}
.dashboard-page .dash35-table a {font-weight:560}
.dashboard-page .dash35-money {font-weight:640!important}
.dashboard-page .dash35-task-line>a {font-weight:500}
.dashboard-page .dash35-feed-item strong {font-weight:560}
.dashboard-page .dash35-pill,.dashboard-page .dash35-task-date {font-weight:570}
.dashboard-page .dash35-plan-line strong {font-weight:720}
.dashboard-page .dash35-metric-growth {font-weight:590}
/* Deal file UI: distinct records and compact metadata, no large horizontal form rows. */
.doc-workspace {display:grid;gap:15px;min-width:0;color:#24294a}
.doc-context {padding:17px 19px;border:1px solid #e8e1ed;background:linear-gradient(135deg,#fcfbff,#f3efff 70%,#e9faf6);border-radius:17px}
.doc-context h2 {margin:3px 0 5px;font-size:21px;font-weight:660;line-height:1.25}
.doc-context p {font-size:12px;color:#67738b;margin:0}
.doc-kicker {color:#6d60ad;letter-spacing:1px;font-size:10px;font-weight:580}
.doc-tabs {display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.doc-tab {border:1px solid #e6e2ef;background:#fff;padding:9px 12px;border-radius:11px;color:#4f5778;font-size:12px;font-weight:540;display:flex;gap:7px;align-items:center}
.doc-tab b {font-size:10px;border-radius:15px;padding:2px 6px;background:#f1effa;font-weight:570}
.doc-tab.is-active {background:#ede9ff;color:#4537a7;border-color:#cbbffa}
.doc-upload-card,.doc-list-card {background:#fffefa;border:1px solid #eae4ed;border-radius:18px;padding:16px 19px;box-shadow:0 6px 16px #2823440b}
.doc-upload-card h3,.doc-list-card h3 {display:flex;align-items:center;gap:8px;font-size:15px;margin:0 0 13px;font-weight:620}
.doc-upload-card h3 .ui-icon {width:18px;height:18px;color:#5746bb}
.doc-field-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.doc-field-grid label {min-width:0;color:#596384;font-size:11px;font-weight:540;display:grid;gap:5px}
.doc-field-grid input,.doc-field-grid select {width:100%;min-width:0;padding:9px 11px;border-radius:10px;border:1px solid #dddced;background:#fff;min-height:38px;box-shadow:none;color:#242c48}
.doc-field-grid [hidden] {display:none!important}
.doc-field-grid .doc-wide {grid-column:1/-1}
.doc-form-footer {display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;flex-wrap:wrap}
.doc-form-footer small {font-size:10.5px;color:#7c8497;max-width:400px}
.doc-status-message {font-size:11px;margin:9px 0 0;color:#b24f56}
.doc-item {display:flex;align-items:flex-start;gap:12px;padding:13px 2px;border-bottom:1px solid #ece8f0}
.doc-item:last-child {border-bottom:0}
.doc-item[hidden]{display:none!important}
.doc-file-symbol {flex:none;width:38px;height:38px;display:grid;place-items:center;background:#ede9ff;color:#5a4bc2;border-radius:12px}
.doc-file-symbol .ui-icon {width:19px;height:19px}
.doc-file-main {min-width:0;flex:1}
.doc-file-main>a {color:#322c7d;font-size:12.5px;font-weight:570;overflow-wrap:anywhere}
.doc-file-details {display:flex;flex-wrap:wrap;gap:7px;margin:7px 0 5px;color:#515c77;font-size:10.5px}
.doc-file-details span {background:#f4f2f9;padding:3px 7px;border-radius:7px}
.doc-file-main small {font-size:10px;color:#8b92a6}
.doc-file-main p {color:#66718b;font-size:11px;margin:5px 0}
.doc-empty {padding:24px 10px;text-align:center;color:#8793a7;font-size:12px}
.doc-link {white-space:nowrap}
.deal-documents-dialog {border:0;padding:0;margin:0 0 0 auto;max-width:min(790px,94vw);width:790px;max-height:100dvh;height:100dvh;box-shadow:-18px 0 65px #10173245;background:#faf8fe;border-radius:20px 0 0 20px}
.deal-documents-dialog::backdrop {background:#101a3488}
.deal-documents-drawer {padding:20px;overflow:auto;height:100%}
.doc-drawer-header {display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}
.doc-drawer-header strong {font-size:19px;font-weight:650;color:#192342}
.doc-feedback {font-size:11px;color:#357f68;margin:0 0 7px}
.doc-feedback.error{color:#ad4656}
@media(min-width:1360px){.app-shell .sidebar,.dashboard-page .sidebar {width:278px;flex-basis:278px}}
@media(max-width:1500px){.app-shell .dash-top-date{display:none}}
@media(max-width:1270px){.app-shell .sidebar,.dashboard-page .sidebar{width:220px;flex-basis:220px}.app-shell .top-bar{gap:9px;padding:10px 14px}.app-shell .dash-top-home b {font-size:15px}}
@media(max-width:990px){.app-shell .dashboard-top-context {display:none}}
@media(max-width:760px){.app-shell .sidebar,.dashboard-page .sidebar{width:100%;height:auto;position:relative;overflow:visible}.app-shell .sidebar::before{display:none}.app-shell .top-bar,.dashboard-page .top-bar{padding:10px 12px}.app-shell .content,.dashboard-page .content{padding:17px 12px 30px}.doc-field-grid{grid-template-columns:1fr}.doc-field-grid .doc-wide{grid-column:auto}.deal-documents-dialog{width:100%;max-width:100%;border-radius:0}.deal-documents-drawer{padding:14px}}

/* 0.3.7.2: clarify which category receives the uploaded invoice. */
.doc-upload-help{margin:-5px 0 13px;color:#6e7590;font-size:11.5px;line-height:1.45}
.doc-tab:focus-visible,.doc-upload-form select:focus-visible{outline:2px solid #4cc5bd;outline-offset:2px}

/* 0.3.7.2: semantic event icons reused on homepage and client timeline. */
.crm-activity-icon {width:29px;height:29px;min-width:29px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;flex-shrink:0;background:#eef0ff;color:#5244bc;border:1px solid rgba(78,68,170,.08)}
.crm-activity-icon .ui-icon {width:17px;height:17px;stroke-width:1.95;flex-shrink:0}
.dash35-feed-item .crm-activity-icon {height:29px;width:29px;font-size:inherit}
.client-history-icon{margin-top:0}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--call,.crm-activity-icon--call{background:#e8f5ff;color:#2175b6}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--meeting,.crm-activity-icon--meeting{background:#eaf0ff;color:#4b63b9}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--note,.crm-activity-icon--note{background:#fff2e5;color:#bd7738}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--proposal,.crm-activity-icon--proposal{background:#e9eaff;color:#5143b9}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--sent,.crm-activity-icon--sent{background:#e0f9ee;color:#159177}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--task,.crm-activity-icon--task{background:#edf2ff;color:#5268b6}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--done,.crm-activity-icon--done{background:#e1f7e8;color:#198b52}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--deal,.crm-activity-icon--deal{background:#e5f7f7;color:#128d9a}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--document,.crm-activity-icon--document{background:#eee8fc;color:#7955b8}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--approved,.crm-activity-icon--approved{background:#e3f8e8;color:#158557}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--client,.crm-activity-icon--client{background:#e8f0ff;color:#4168b0}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--waiting,.crm-activity-icon--waiting{background:#fff5dc;color:#a67c23}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--declined,.crm-activity-icon--declined{background:#fee9e9;color:#b95353}
.dash35-feed-item .crm-activity-icon.crm-activity-icon--system,.crm-activity-icon--system{background:#eff0f5;color:#66718d}
/* The header lightning and the actions-panel lightning use exactly one symbol, at different sizes. */
.top-quick-menu summary>.ui-icon:first-child{height:17px;width:17px;stroke-width:2;flex:none}
.top-quick-menu summary>.quick-chevron{height:15px;width:15px;stroke-width:2.2;margin-left:4px;flex:none}
.dash35-section-icon .ui-icon{width:21px;height:21px;color:#e58b31;stroke-width:2.1}

/* 0.3.7.3: readable dashboard task rows (client, task, deadline, status). */
.dashboard-page .dash35-task-line {align-items:center;gap:12px;min-height:72px;padding:10px 4px}
.dashboard-page .dash35-task-line form {align-self:center}
.dashboard-page .dash35-task-main {flex:1;min-width:0;display:flex;flex-direction:column;gap:5px}
.dashboard-page .dash35-task-client {display:flex;flex-wrap:wrap;gap:4px 6px;align-items:baseline;min-width:0;font-size:11.2px;line-height:1.35;color:#68748b}
.dashboard-page .dash35-task-client span {font-weight:500;white-space:nowrap}
.dashboard-page .dash35-task-client a {font-weight:680;color:#4c40b1;min-width:0;overflow-wrap:anywhere;text-decoration:none}
.dashboard-page .dash35-task-client a:hover,.dashboard-page .dash35-task-subject:hover {text-decoration:underline}
.dashboard-page .dash35-task-subject {display:block;max-width:100%;min-width:0;font-size:12.2px;line-height:1.38;font-weight:540;color:#1c2943;overflow-wrap:anywhere;text-decoration:none}
.dashboard-page .dash35-task-subject span {font-weight:720;color:#243653}
.dashboard-page .dash35-task-deadline {flex:none;width:127px;display:flex;flex-direction:column;align-items:flex-end;gap:5px;text-align:right}
.dashboard-page .dash35-task-date {max-width:100%;font-size:10.6px;line-height:1.35;white-space:normal}
.dashboard-page .dash35-task-state {font-size:10.4px;font-weight:520;color:#758199;padding-right:4px}
.dashboard-page .dash35-task-date.is-late + .dash35-task-state {color:#be434d}
@media(max-width:460px){.dashboard-page .dash35-task-line{gap:7px}.dashboard-page .dash35-task-deadline{width:93px}.dashboard-page .dash35-task-client{font-size:10.7px}.dashboard-page .dash35-task-subject{font-size:11.5px}}

/* 0.3.7.4: clear deal drill-down from client card and admin-only destructive action. */
.client-deal-title{color:#4d3fbd;font-weight:650;display:inline-flex;gap:5px;align-items:center;overflow-wrap:anywhere;white-space:normal;text-decoration:none}
.client-deal-title:hover,.crm-deal-name-link:hover,.crm-detail-client:hover{text-decoration:underline}
.client-deal-title span{font-size:12px;color:#8d83ba}
.crm-deal-name-link{display:block;color:#292c64;text-decoration:none;overflow-wrap:anywhere}
.crm-client-delete{margin:22px 0 12px;border:1px solid #f0cccc;border-radius:14px;background:#fffafa;padding:0 18px;max-width:720px}
.crm-client-delete>summary{cursor:pointer;color:#a64551;font-size:12px;font-weight:640;padding:15px 0}
.crm-client-delete-body{border-top:1px solid #f1dddd;padding:13px 0 18px;font-size:12px;line-height:1.6;color:#675965}
.crm-delete-confirm{display:flex;flex-wrap:wrap;align-items:flex-end;gap:11px;margin-top:13px}
.crm-delete-confirm label{display:grid;gap:7px;flex:1;min-width:230px;font-size:11.5px;color:#5a5361}
.crm-delete-confirm input{border:1px solid #dbd4df;border-radius:10px;padding:10px;min-height:36px}
.crm-deal-heading{flex-wrap:wrap}
.crm-deal-overview{display:grid;grid-template-columns:minmax(210px,280px) minmax(0,1fr);gap:15px;align-items:stretch;margin-bottom:15px}
.crm-deal-summary,.crm-deal-details,.crm-deal-notes{padding:21px}
.crm-deal-label{color:#777c93;font-size:12px;margin-bottom:8px}
.crm-deal-amount{font-size:28px;font-weight:750;letter-spacing:-.5px;color:#1b2544;white-space:normal}
.crm-deal-stage{margin-top:14px}
.crm-deal-details h2,.crm-deal-notes h2{font-size:15px;font-weight:650;margin-bottom:15px}
.crm-deal-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0}
.crm-deal-facts>div{min-width:0}
.crm-deal-facts dt{font-size:10.5px;color:#78859e;margin-bottom:3px}
.crm-deal-facts dd{margin:0;font-size:12px;color:#1a2949;font-weight:550;overflow-wrap:anywhere}
.crm-detail-client{color:#5446bd;font-weight:620}
.crm-deal-notes{margin-bottom:15px}
.crm-deal-notes p{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;color:#475775;font-size:12px;line-height:1.6}
.crm-deal-files{overflow:hidden}
.crm-deal-files table th,.crm-deal-files table td{padding:11px 13px}
.crm-deal-files td{font-size:11.5px}
.crm-deal-empty{padding:10px 21px 24px;font-size:12px;color:#7d88a0}
@media(max-width:840px){.crm-deal-overview{grid-template-columns:1fr}.crm-deal-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:500px){.crm-deal-facts{grid-template-columns:1fr}.crm-client-delete{padding:0 12px}}

/* 0.3.7.5: tasks share the same restrained table treatment as recent deals. */
.dashboard-page .dash35-tasks-table{width:100%;table-layout:fixed}
.dashboard-page .dash35-tasks-table th:nth-child(1){width:26%}
.dashboard-page .dash35-tasks-table th:nth-child(2){width:34%}
.dashboard-page .dash35-tasks-table th:nth-child(3){width:20%}
.dashboard-page .dash35-tasks-table th:nth-child(4){width:14%}
.dashboard-page .dash35-tasks-table th:nth-child(5){width:6%}
.dashboard-page .dash35-tasks-table td{vertical-align:middle;max-width:none;overflow:visible;white-space:normal!important;overflow-wrap:anywhere;line-height:1.35}
.dashboard-page .dash35-tasks-table td:nth-child(1) a{color:#243252;font-weight:560;text-decoration:none}
.dashboard-page .dash35-tasks-table td:nth-child(1) a:hover,.dashboard-page .dash35-task-title:hover,.dashboard-page .dash35-deal-title:hover{text-decoration:underline;color:#4a39ab}
.dashboard-page .dash35-tasks-table .dash35-task-title{display:block;color:#27324a;font-weight:480;text-decoration:none;line-height:1.32}
.dashboard-page .dash35-tasks-table .dash35-task-date{display:inline-block;font-size:10px;font-weight:550;max-width:100%;padding:4px 5px;white-space:normal;overflow-wrap:normal}
.dashboard-page .dash35-tasks-table .dash35-pill{font-weight:550;font-size:9.5px;padding:4px 6px;max-width:100%;white-space:normal}
.dashboard-page .dash35-tasks-table .dash35-task-action{text-align:center;padding-left:2px!important;padding-right:2px!important}
.dashboard-page .dash35-tasks-table .dash35-task-action form{margin:0;display:flex;align-items:center;justify-content:center}
.dashboard-page .dash35-tasks-table .task-checkbox{width:17px;height:17px;border-radius:5px;flex:none;margin:0}
.dashboard-page .dash35-deal-title{display:inline;color:#243252;text-decoration:none;font-weight:530}
.task-client-selector{margin-bottom:5px}
.task-client-selector .offer-client-results{top:calc(100% - 3px);z-index:40}
@media(max-width:600px){.dashboard-page .dash35-tasks-table{min-width:520px}}

/* CRM 0.3.8.0 — Financial deal workspace, matching the established dashboard. */
.deal38{color:#192541;min-width:0;max-width:1640px}
.deal38-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 19px;flex-wrap:wrap}
.deal38-title-wrap{border-left:5px solid #15c6b7;padding:2px 0 2px 16px;min-width:0}
.deal38-title-line{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.deal38-title-line h1{margin:0;font-size:28px;font-weight:700;color:#131e38;letter-spacing:-.55px}
.deal38-title-wrap p{font-size:12.5px;margin:5px 0 0;color:#74839b}
.deal38-title-wrap p>a{color:#5143bb;font-weight:650}
.deal38-stage{display:inline-flex;align-items:center;border-radius:9px;padding:6px 11px;font-size:11px;color:#a65a18;background:#ffefd7;font-weight:600;white-space:normal}
.deal38-stage.is-paid{color:#197c4b;background:#ddf5e7}
.deal38-stage.is-lost{color:#b24950;background:#ffe5e5}
.deal38-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(270px,320px);gap:17px;align-items:start}
.deal38-main,.deal38-sidebar{min-width:0;display:grid;gap:17px}
.deal38-summary-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;border:1px solid #e8e2ef;background:linear-gradient(115deg,#fffdfc,#f7f5fd);border-radius:20px;padding:15px;box-shadow:0 8px 23px #30304c0c}
.deal38-metric{display:flex;align-items:center;gap:11px;padding:14px 12px;background:#fffefc;border:1px solid #eee8ef;border-radius:15px;min-width:0;box-shadow:0 3px 9px #2a284407}
.deal38-metric-icon{width:39px;height:39px;flex:0 0 39px;display:grid;place-items:center;background:#f0f1fe;border-radius:11px;color:#493ec0;font-size:22px;font-weight:550}
.deal38-metric-icon.teal{background:#e2f9f5;color:#0f998e}.deal38-metric-icon.violet{background:#f2ecff;color:#614aca}
.deal38-metric>div{display:grid;gap:7px;min-width:0}
.deal38-metric span:not(.deal38-metric-icon){font-size:11px;color:#57647c}
.deal38-metric strong{font-size:21px;letter-spacing:-.4px;color:#15203f;font-weight:700;line-height:1.18;white-space:normal;overflow-wrap:anywhere}
.deal38 .text-positive{color:#14814b!important}.deal38 .text-negative{color:#b53c49!important}
.deal38-tabs{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.deal38-tabs a{display:inline-flex;align-items:center;justify-content:center;min-height:39px;padding:9px 13px;color:#273252;font-size:11.5px;font-weight:560;border-radius:10px;border:1px solid #e3deee;background:#fffefc;box-shadow:0 2px 4px #2020400b;text-decoration:none}
.deal38-tabs a.is-active{background:linear-gradient(125deg,#6856e0,#4331b3);color:#fff;border-color:#6253ce;box-shadow:0 6px 15px #5542bb25}
.deal38-tabs a:hover{border-color:#9a91d9}
.deal38-panel{min-width:0;background:#fffdfa;border:1px solid #e5dfeb;border-radius:20px;padding:20px;box-shadow:0 9px 22px #30284a10,0 2px 5px #30284a08}
.deal38-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 20px}
.deal38-form label{font-size:11.5px;color:#43516d;font-weight:580;display:flex;flex-direction:column;gap:5px;min-width:0}
.deal38-form input,.deal38-form select,.deal38-form textarea{font-family:inherit;font-size:12px;color:#202b47;background:#fff;min-height:37px;min-width:0;width:100%;padding:9px 10px;border:1px solid #d9d8e5;border-radius:10px;box-shadow:none;font-weight:430}
.deal38-form input:focus,.deal38-form select:focus,.deal38-form textarea:focus{outline:none;border-color:#6d5edf;box-shadow:0 0 0 3px #6657d423}
.deal38-form input[name="margin"]{border-color:#28b9b0;background:#fafffe}
.deal38-form input[readonly]{background:#f6f5fa;color:#4d5970}
.deal38-form textarea{min-height:77px;resize:vertical;line-height:1.5}
.deal38-form .deal38-form-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;min-width:0}
.deal38-form .deal38-wide{grid-column:1/-1}
.deal38-client-combo{display:flex;gap:8px;align-items:center}
.deal38-client-combo input{min-width:0;flex:1}
.deal38-client-combo a{font-size:18px;color:#5545b5;line-height:1;padding:6px}
.deal38-field-hint{font-size:9.5px;color:#8a92a3;font-weight:400}
.deal38-form-footer{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:20px}
.deal38-sidebar .deal38-panel{padding:19px 17px}
.deal38-sidebar h2{margin:0 0 17px;display:flex;align-items:center;gap:8px;font-size:17px;color:#1c2642;font-weight:670}
.deal38-panel-symbol{font-size:22px;font-weight:400;line-height:1;color:#5644be}
.deal38-action-panel{display:grid;gap:8px}
.deal38-action-panel h2{margin-bottom:6px}
.deal38-action{display:flex;align-items:center;min-height:42px;padding:10px 14px;background:#f9f8fe;color:#332e67;border:1px solid #dbd7eb;border-radius:11px;text-decoration:none;font-size:11.7px;font-weight:570}
.deal38-action.primary{background:#edeaff;border-color:#cac1f1;color:#5241b4}
.deal38-action:hover{background:#e9e5ff;border-color:#9d92e1}
.deal38-facts dl{margin:0;display:grid;gap:13px}
.deal38-facts dl>div{display:flex;justify-content:space-between;align-items:baseline;gap:6px;min-width:0}
.deal38-facts dt{color:#64718d;font-size:11px;min-width:0;flex:0 1 auto}
.deal38-facts dd{margin:0;font-size:11.5px;font-weight:640;text-align:right;color:#1a2948;overflow-wrap:anywhere;max-width:60%}
.deal38-facts dd .deal38-stage{padding:5px 7px;font-size:10px}
.deal38-payment{background:#ffe1e2;color:#bb4c58;border-radius:7px;padding:5px 7px;display:inline-flex;font-size:10px}
.deal38-payment.is-paid{background:#ddf5e7;color:#197c4b}
.deal38-documents{scroll-margin-top:90px}
.deal38-documents h2{margin:0;font-size:15px}
.deal38-section-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;margin-bottom:13px}
.deal38-section-heading p{font-size:10.5px;color:#8590a5;margin:4px 0}
.deal38-documents table th,.deal38-documents table td{font-size:11px;padding:9px}
.deal38-documents table td{white-space:normal}
.deal38-empty{color:#8893a9;font-size:12px;margin:12px 0}
.dash38-margin{display:block;margin-top:4px;font-size:9.7px;color:#128751;font-weight:600;white-space:normal}
.dash38-plan-note{font-size:10px;color:#9b6228;background:#fff5e4;border-radius:7px;padding:6px 8px;margin:0 4px 9px}
.deal38-pipeline-margin{margin-top:4px;font-size:10.5px;color:#7d879b}
.deal38-pipeline-margin b{font-weight:660;color:#14814b}.deal38-pipeline-margin .text-negative{color:#b53c49}
@media(max-width:1330px){.deal38-grid{grid-template-columns:minmax(0,1fr) 275px;gap:11px}.deal38-summary-metrics{gap:7px;padding:10px}.deal38-metric{padding:11px 8px;gap:7px}.deal38-metric-icon{width:30px;height:30px;flex-basis:30px;font-size:18px}.deal38-metric strong{font-size:17px}.deal38-panel{padding:15px}.deal38-form-grid{gap:12px}}
@media(max-width:1050px){.deal38-grid{grid-template-columns:1fr}.deal38-sidebar{grid-template-columns:repeat(2,minmax(0,1fr))}.deal38-sidebar h2{font-size:15px}}
@media(max-width:700px){.deal38-summary-metrics{grid-template-columns:1fr}.deal38-sidebar{grid-template-columns:1fr}.deal38-form-grid{grid-template-columns:1fr}.deal38-form .deal38-form-split{grid-template-columns:1fr 1fr}.deal38-title-line h1{font-size:23px}.deal38-metric strong{font-size:19px}}
@media(max-width:470px){.deal38-form .deal38-form-split{grid-template-columns:1fr}.deal38-form-footer{align-items:stretch}.deal38-form-footer .btn{flex:1}.deal38-panel{padding:13px}}

.deal38-heading-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}

@media(max-width:1450px){.deal38-summary-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.deal38-summary-metrics{grid-template-columns:1fr}}
