/* Deal Stack: continuous desktop sheet and compact phone summaries. */
.deal-stack { --ds-line:#ddd7ce; --ds-ink:#171311; --ds-muted:#726b63; color:var(--ds-ink); min-width:0; }
.deal-stack *, .deal-stack button, .deal-stack input, .deal-stack select { box-sizing:border-box; font-family:Inter,Arial,sans-serif!important; }
.deal-stack .ds-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 20px; }
.crm-content .deal-stack h1 { font-family:'Archivo Black',Arial,sans-serif!important; font-size:28px!important; line-height:1.1; letter-spacing:-1px!important; margin:0; }
.ds-tagline { margin:7px 0 0; color:var(--ds-muted); font-size:12px; font-weight:600; letter-spacing:.06em; }
.crm-content .deal-stack button { cursor:pointer; box-shadow:none!important; border-radius:4px!important; }
.deal-stack button:focus-visible, .deal-stack select:focus-visible, .deal-stack input:focus-visible { outline:2px solid #fa5422!important; outline-offset:2px; }
.deal-stack .ds-new { background:#fa5422; color:#171311; border:1px solid #fa5422; padding:10px 16px; font-size:14px; font-weight:700; white-space:nowrap; }
.ds-toolbar, .ds-filters, .ds-sort { display:flex; align-items:center; gap:8px; }
.ds-toolbar { justify-content:space-between; margin-bottom:12px; flex-wrap:wrap; }
.ds-filters { flex-wrap:wrap; }
.deal-stack .ds-toolbar select { border:1px solid var(--ds-line); border-radius:4px; padding:8px 26px 8px 10px; background:#fffdf8; font-size:12px; color:var(--ds-ink); max-width:180px; }
.ds-count { font-size:12px; color:var(--ds-muted); margin-right:6px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.deal-stack .ds-direction { border:1px solid var(--ds-line); background:transparent; height:34px; width:30px; font-size:18px; }
.deal-stack button:disabled { opacity:.45; cursor:default; }
.ds-deals { display:grid; gap:8px; width:100%; min-width:0; }
.deal-stack .ds-row { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1.2fr) minmax(0,2.4fr) minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr); align-items:center; column-gap:12px; padding:10px 14px; border:1px solid var(--ds-line); border-radius:12px; background:#fffdf9; min-width:0; }
.deal-stack .ds-row:hover { border-color:#b7aea1; }
.deal-stack .ds-row:focus-within { border-color:#27221e; }
.deal-stack .ds-row-error { border-color:#a02d21; }
.ds-cell, .ds-deal-wrap { min-width:0; }
.ds-label { display:block; font-size:10px; font-weight:500; color:var(--ds-muted); line-height:1.4; margin-bottom:2px; }
.deal-stack .ds-deal-name { padding:0; border:0; background:none; color:var(--ds-ink); display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; width:100%; overflow:hidden; overflow-wrap:anywhere; font-size:15px; font-weight:650; text-align:left; line-height:1.3; }
.ds-deal-name:hover { text-decoration:underline; text-underline-offset:3px; }
.deal-stack .ds-deal-name { width:fit-content; max-width:100%; }
.crm-pipeline-deal-name:hover { text-decoration:underline; text-underline-offset:3px; }
.crm-pipeline-deal-name:focus-visible, .crm-deal-close:focus-visible { outline:2px solid #fa5422; outline-offset:3px; }
.ds-deal-meta { color:var(--ds-muted); font-size:11px; display:flex; gap:6px; margin-top:4px; min-width:0; overflow-wrap:anywhere; line-height:1.3; }
.ds-row-status { margin-left:auto; font-size:11px; flex-shrink:0; white-space:nowrap; }
.ds-row-status.saved { color:#547057; } .ds-row-status.error { color:#a02d21; }
.deal-stack .ds-deals select { width:100%; max-width:100%; min-width:0; padding:4px 15px 4px 0; color:var(--ds-ink); background-color:transparent!important; border:1px solid transparent!important; border-radius:3px!important; font-size:12px; line-height:1.3; cursor:pointer; }
.deal-stack .ds-deals select:hover { border-color:var(--ds-line)!important; }
.deal-stack .ds-deals .ds-temp-hot { color:#a13824; } .deal-stack .ds-deals .ds-temp-warm { color:#896218; } .deal-stack .ds-deals .ds-temp-cold { color:#486477; }
.deal-stack .ds-cell-button { border:1px solid transparent; padding:3px 2px; margin-left:-3px; background:transparent; color:var(--ds-ink); text-align:left; font-size:13px; min-height:26px; max-width:100%; line-height:1.35; overflow:hidden; text-overflow:ellipsis; display:block; white-space:nowrap; }
.deal-stack button.ds-cell-button:hover { border-color:var(--ds-line); background:#fff; }
.deal-stack .ds-placeholder { color:#867e75; font-size:12px; }
.ds-inline { position:relative; min-width:0; width:100%; }
.deal-stack .ds-inline input { width:100%; min-width:0; background:#fff; border:1px solid #fa5422; border-radius:3px; padding:6px 5px; font-size:14px; color:var(--ds-ink); font-variant-numeric:tabular-nums; }
.ds-field-error { display:block; color:#a02d21; font-size:12px; white-space:normal; padding-top:4px; }
.deal-stack .ds-sub-link { display:block; border:0; padding:0; margin-top:1px; background:transparent; color:var(--ds-muted); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; text-align:left; }
.deal-stack .ds-sub-link:hover { text-decoration:underline; } .deal-stack .ds-overdue { color:#a13824; }
.ds-meta { display:block; font-size:11px; line-height:1.4; color:var(--ds-muted); margin-top:1px; }
.deal-stack .ds-client-text { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; white-space:normal; overflow-wrap:anywhere; overflow:hidden; font-size:13px; line-height:1.35; }
.deal-stack .ds-client-text:not(.ds-placeholder) { font-weight:600; }
.ds-value, .ds-commission { text-align:right; font-variant-numeric:tabular-nums; }
.ds-value .ds-cell-button { margin-left:auto; text-align:right; }
.deal-stack .ds-commission-button { display:block; width:100%; border:0; padding:3px 0; background:transparent; text-align:right; font-size:14px; color:var(--ds-ink); }
.ds-commission-button:hover strong { text-decoration:underline; }
.ds-commission-button .ds-meta { white-space:nowrap; }
/* Context stays in the card. There is no expand/collapse state. */
.ds-context { grid-column:1 / -1; display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); column-gap:20px; border-top:1px solid #eae4db; margin-top:8px; padding-top:7px; min-width:0; align-items:start; }
.ds-context-with-note { grid-template-columns:minmax(0,1.1fr) minmax(0,1.3fr) minmax(0,1fr); }
.ds-next, .ds-task-preview { min-width:0; }
.ds-context-heading { display:flex; gap:10px; align-items:baseline; }
.ds-task-date { font-size:10px; color:var(--ds-muted); line-height:1.4; }
.ds-task-preview { display:flex; align-items:flex-start; gap:6px; }
.deal-stack .ds-next .ds-cell-button { font-size:13px; white-space:normal; overflow-wrap:anywhere; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; min-width:0; }
.ds-task-preview .ds-task-text { flex:1; min-width:0; overflow-wrap:anywhere; font-size:13px; line-height:1.35; }
.deal-stack .ds-inline-edit { flex:none; border:0; background:none; color:var(--ds-muted); font-size:11px; padding:4px; min-height:26px; }
.ds-inline-edit:hover { text-decoration:underline; color:var(--ds-ink); }
.deal-stack .ds-note-preview { display:block; min-width:0; width:100%; border:0; padding:0; background:none; text-align:left; color:var(--ds-muted); }
.ds-note-text { font-size:12px; line-height:1.5; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; }
.ds-next-actions, .ds-link-actions { display:flex; flex-wrap:wrap; gap:3px 12px; align-items:center; margin-top:2px; }
.deal-stack .ds-context-action { border:0; background:none; padding:2px 0; min-height:24px; color:var(--ds-muted); font-size:11px; line-height:1.4; text-align:left; }
.deal-stack .ds-context-action:hover { color:var(--ds-ink); text-decoration:underline; text-underline-offset:2px; }
.ds-links { min-width:0; }
.ds-link-list { list-style:none; margin:0; padding:0; }
.ds-link-list li { min-width:0; margin:0; padding:0; line-height:1.6; }
.deal-stack .ds-link-list a { display:block; color:var(--ds-ink); font-size:12px; line-height:1.6; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; text-decoration:underline; text-decoration-color:#c9c0b4; text-underline-offset:3px; }
.deal-stack .ds-link-list a:hover { text-decoration-color:var(--ds-ink); }
.ds-footnote { font-size:12px; color:var(--ds-muted); margin:10px 0 0; line-height:1.5; }
.ds-save-error { border:1px solid #d49a90; background:#fff2ef; padding:10px 12px; font-size:13px; margin-bottom:10px; }
.ds-save-error button { background:none; border:0; text-decoration:underline; font-size:inherit; font-weight:600; color:#a02d21; }
.ds-empty { padding:40px 20px; text-align:center; border:1px solid var(--ds-line); border-radius:12px; background:#fffdf8; font-size:14px; }
.ds-mobile-search { display:none; }
.dl-mobile-count { display:none; }
/* Keep related fields together when the desktop columns collapse. */
@media(max-width:1100px) {
 .deal-stack .ds-deal { grid-area:deal; }
 .deal-stack .ds-stage { grid-area:stage; }
 .deal-stack .ds-client { grid-area:client; }
 .deal-stack .ds-value { grid-area:value; }
 .deal-stack .ds-commission { grid-area:commission; }
 .deal-stack .ds-date { grid-area:dates; }
 .deal-stack .ds-context { grid-area:context; }
}
@media(min-width:761px) and (max-width:1100px) {
 .deal-stack .ds-row {
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-template-areas:"deal deal stage client" "dates dates value commission" "context context context context";
  row-gap:8px;
 }
 .ds-context { margin-top:0; }
}
@media(max-width:760px) {
 .crm-content:has(.deal-stack) { padding:16px 12px!important; }
 .deal-stack .ds-heading { margin-bottom:16px; gap:8px; }
 .crm-content .deal-stack h1 { font-size:25px!important; }
 .ds-tagline { font-size:10px; letter-spacing:.01em; }
 .deal-stack .ds-new { padding:10px; font-size:13px; }
 .ds-toolbar { gap:10px; align-items:flex-start; }
 .ds-filters { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; width:100%; }
 .deal-stack .ds-toolbar select { font-size:12px; padding:8px 18px 8px 7px; max-width:100%; }
 .deal-stack .ds-filters select { width:100%; min-width:0; min-height:44px; padding:9px 32px 9px 12px; box-sizing:border-box; }
 .ds-sort { width:100%; justify-content:flex-end; }
 .ds-count { margin-right:auto; }
 .deal-stack .ds-mobile-search { display:block; width:100%; border:1px solid var(--ds-line); border-radius:4px; background:#fffdf8; padding:10px; margin:0 0 10px; font-size:16px; }
 /* A short scan on phones; full detail stays behind the deal name. */
 .deal-stack .ds-row {
  --ds-footer:"actions links";
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-areas:"deal deal" "stage client" "value commission" "dates dates" "next next" "note note" var(--ds-footer);
  align-items:start; column-gap:10px; row-gap:2px; padding:8px 10px; border-color:#cec7bc;
 }
 .deal-stack .ds-deal { padding:0 0 4px; margin-bottom:2px; border-bottom:1px solid var(--ds-line); }
 .deal-stack .ds-deal-wrap { display:flex; align-items:center; gap:6px; }
 .deal-stack .ds-deal-name { display:block; flex:0 1 auto; min-width:0; font-size:15px; line-height:1.4; white-space:nowrap; text-overflow:ellipsis; min-height:24px; }
 .deal-stack .ds-deal-meta { display:contents; }
 .deal-stack .ds-property-meta { display:none; }
 .deal-stack .ds-row-status { margin:0; font-size:10px; }
 .deal-stack .ds-label { flex:none; font-size:10px; font-weight:600; line-height:1.4; letter-spacing:.025em; text-transform:uppercase; color:#625c54; margin:0; white-space:nowrap; }
 .deal-stack .ds-stage > .ds-label { display:none; }
 .deal-stack .ds-client, .deal-stack .ds-value, .deal-stack .ds-commission { display:flex; align-items:baseline; gap:5px; min-height:24px; text-align:left; }
 .deal-stack .ds-client { align-items:center; }
 .deal-stack .ds-client, .deal-stack .ds-commission { border-left:1px solid var(--ds-line); padding-left:8px; align-self:stretch; }
 .deal-stack .ds-client-text { display:block; flex:1; min-width:0; font-size:12px; line-height:1.4; margin:0; white-space:nowrap; text-overflow:ellipsis; }
 .deal-stack .ds-deals select { font-size:16px; line-height:1.25; min-height:24px; padding:0 15px 0 0; }
 .deal-stack .ds-inline { flex:1; min-width:0; }
 .deal-stack .ds-inline input { font-size:16px; min-height:36px; }
 .deal-stack .ds-cell-button { font-size:13px; min-height:24px; }
 .deal-stack .ds-value .ds-cell-button, .deal-stack .ds-commission-button {
  display:block; flex:1; min-width:0; width:auto; margin:0; padding:2px 0; border:0; min-height:24px;
  text-align:left; font-size:13px; line-height:1.4; white-space:nowrap;
 }
 .deal-stack .ds-commission-button .ds-meta { display:none; }
 .deal-stack .ds-date { display:flex; align-items:baseline; gap:8px; padding:5px 0 3px; margin-top:2px; border-top:1px solid var(--ds-line); }
 .deal-stack .ds-date:has(.ds-key-dates.ds-placeholder) { display:none; }
 .deal-stack .ds-date .ds-key-dates { flex:1; min-width:0; padding:0; font-size:11.5px; line-height:1.5; color:#625c54; }
 .deal-stack .ds-key-date { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
 .deal-stack .ds-key-date + .ds-key-date { border-top:1px solid #eee9e1; margin-top:1px; padding-top:1px; }
 .deal-stack .ds-key-date time { flex:none; color:#302b26; }
 .deal-stack .ds-context, .deal-stack .ds-next { display:contents; }
 .deal-stack .ds-next-summary { grid-area:next; display:flex; align-items:center; gap:8px; min-width:0; border-top:1px solid var(--ds-line); padding-top:3px; }
 .deal-stack .ds-next-summary:not(.ds-has-task) { display:none; }
 .deal-stack .ds-context-heading { display:contents; }
 .deal-stack .ds-task-date { order:1; flex:none; font-size:10px; white-space:nowrap; }
 .deal-stack .ds-task-preview { flex:1; min-width:0; align-items:center; gap:4px; }
 .deal-stack .ds-task-text { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:12px; line-height:1.4; }
 .deal-stack .ds-inline-edit { min-height:24px; padding:2px; font-size:11px; }
 .deal-stack .ds-note-preview { grid-area:note; display:flex; align-items:baseline; gap:8px; min-width:0; border-top:1px solid var(--ds-line); padding:4px 0 2px; }
 .deal-stack .ds-date > .ds-label, .deal-stack .ds-note-preview > .ds-label, .deal-stack .ds-next-summary .ds-label { flex:0 0 62px; }
 .deal-stack .ds-note-text { display:block; flex:1; min-width:0; white-space:nowrap; text-overflow:ellipsis; font-size:12px; line-height:1.4; color:#514b44; }
 .deal-stack .ds-next-actions { grid-area:actions; flex-wrap:nowrap; gap:10px; margin:0; border-top:1px solid var(--ds-line); padding-top:3px; }
 .deal-stack .ds-context-action { min-height:24px; padding:2px 0; font-size:11px; white-space:nowrap; color:#625c54; }
 .deal-stack .ds-links { grid-area:links; min-width:0; border-top:1px solid var(--ds-line); padding-top:3px; }
 .deal-stack .ds-links > .ds-label { display:none; }
 /* Keep saved links after notes; empty action rows stay on one line. */
 .deal-stack .ds-row:has(.ds-links :is(.ds-link-list, .dl-form, .dl-status, .ds-field-error)) { --ds-footer:"links links" "actions actions"; }
 .deal-stack .ds-links:has(.ds-link-list) > .ds-label { display:block; margin-bottom:1px; }
 .deal-stack .ds-links .deal-links { display:flex; flex-wrap:wrap; align-items:flex-start; gap:2px 8px; }
 .deal-stack .ds-links .ds-link-list { flex:1; min-width:0; }
 .deal-stack .ds-links .ds-link-list li { gap:5px; min-height:24px; align-items:center; }
 .deal-stack .ds-links .ds-link-list li:nth-child(n+2) { display:none; }
 .deal-stack .ds-links .ds-link-list a { min-height:24px; font-size:12px; line-height:24px; }
 .deal-stack .ds-links .ds-link-actions { margin:0; gap:4px; }
 .deal-stack .ds-links .ds-context-action { min-height:24px; padding:2px 0; font-size:11px; color:#625c54; }
 .deal-stack .ds-links .dl-remove { flex-basis:24px; width:24px; min-height:24px; font-size:18px; }
 .deal-stack .ds-links .dl-mobile-count { display:inline; font-size:10px; white-space:nowrap; }
 .deal-stack .ds-links .dl-desktop-count { display:none; }
 .deal-stack .ds-links .dl-form, .deal-stack .ds-links .dl-status, .deal-stack .ds-links .ds-field-error { flex-basis:100%; }
}
@media(max-width:359px) {
 .deal-stack .ds-row { grid-template-areas:"deal deal" "stage stage" "client client" "value commission" "dates dates" "next next" "note note" var(--ds-footer); }
 .deal-stack .ds-client { border-left:0; padding-left:0; }
 .deal-stack .ds-value, .deal-stack .ds-commission { gap:3px; }
 .deal-stack .ds-value .ds-cell-button, .deal-stack .ds-commission-button { font-size:12px; }
}
/* Navigation marks follow the named view rather than the old tab position. */
.crm-nav > button[data-nav-view="active"] > span:first-child { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9h18M3 14h18M9 9v11'/%3E%3C/svg%3E")!important; mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9h18M3 14h18M9 9v11'/%3E%3C/svg%3E")!important; }
.crm-nav > button[data-nav-view="pipeline"] > span:first-child { -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='4' width='4' height='16' rx='1'/%3E%3Crect x='10' y='4' width='4' height='11' rx='1'/%3E%3Crect x='17' y='4' width='4' height='14' rx='1'/%3E%3C/svg%3E")!important; mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='4' width='4' height='16' rx='1'/%3E%3Crect x='10' y='4' width='4' height='11' rx='1'/%3E%3Crect x='17' y='4' width='4' height='14' rx='1'/%3E%3C/svg%3E")!important; }

/* One workspace, two layouts; board scrolling stays inside the available width. */
.ds-view-switch { display:inline-flex; gap:2px; padding:3px; border:1px solid var(--ds-line); border-radius:7px; margin:0 0 12px; background:#f1ede6; }
.deal-stack .ds-view-switch button { padding:7px 14px; border:1px solid transparent; background:transparent; color:var(--ds-muted); font-size:12px; font-weight:600; min-height:34px; }
.deal-stack .ds-view-switch button[aria-pressed="true"] { background:#fffdf9; border-color:var(--ds-line); color:var(--ds-ink); }
.ds-view-content { width:100%; min-width:0; max-width:100%; }
.deal-stack .ds-deals[hidden] { display:none!important; }
.ds-card-board { width:100%; min-width:0; max-width:100%; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; }
.ds-save-summary { font-size:11px; color:var(--ds-muted); white-space:nowrap; }
@media(max-width:760px) { .deal-stack .ds-view-switch button { min-height:40px; } .ds-sort { flex-wrap:wrap; } }

.deal-stack .ds-key-dates { display:block; width:100%; border:0; padding:2px 0; background:transparent; text-align:left; color:var(--ds-muted); font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.ds-key-date { display:block; }
.ds-key-date time { white-space:nowrap; font-variant-numeric:tabular-nums; }
@media(max-width:760px) { .deal-stack .ds-key-dates { font-size:12px; } }

.ds-header-actions { display:flex; gap:8px; align-items:center; flex-shrink:0; }

.ds-sheet-head, .ds-note-empty { display:none; }
@media(min-width:761px) {
 .deal-stack .ds-sheet { display:block; overflow:visible; max-height:none; border:1px solid var(--ds-line); border-radius:4px; background:#fffdf9; }
 .deal-stack .ds-sheet-head, .deal-stack .ds-sheet .ds-row { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(0,1fr) minmax(0,1.5fr) minmax(0,1.1fr) minmax(0,.85fr) minmax(0,.85fr) minmax(0,1.15fr) minmax(0,1.4fr) minmax(0,1fr); grid-template-areas:none; width:100%; min-width:0; gap:0; padding:0; margin:0; border:0; border-radius:0; align-items:stretch; background:#fffdf9; }
 .deal-stack .ds-sheet-head { position:relative; z-index:1; background:#ede9e2; color:#514b44; font-size:12px; font-weight:600; }
 .ds-sheet-head > div { min-width:0; overflow-wrap:anywhere; padding:10px 8px; border-right:1px solid var(--ds-line); border-bottom:1px solid #c9c1b5; }
 .deal-stack .ds-sheet .ds-context { display:contents; }
 .deal-stack .ds-sheet .ds-row > .ds-cell, .deal-stack .ds-sheet .ds-next, .deal-stack .ds-sheet .ds-note-preview, .deal-stack .ds-sheet .ds-note-empty, .deal-stack .ds-sheet .ds-links { grid-area:auto; display:block; margin:0; padding:10px 8px; border:0; border-right:1px solid #e7e1d8; border-bottom:1px solid var(--ds-line); min-width:0; }
 .deal-stack .ds-sheet .ds-row:nth-child(odd) { background:#f8f6f1; }
 .deal-stack .ds-sheet .ds-row:hover { background:#f0ede6; }
 .deal-stack .ds-sheet .ds-row:focus-within { background:#f3f0e9; }
 .deal-stack .ds-sheet .ds-deal { position:relative; background:inherit; box-shadow:1px 0 0 #cfc7ba; }
 .deal-stack .ds-sheet-head > div:first-child { position:relative; background:#ede9e2; }
 .deal-stack .ds-sheet .ds-label { display:none; }
 .deal-stack .ds-sheet .ds-deal-name { font-size:13px; line-height:1.4; }
 .deal-stack .ds-sheet .ds-key-dates, .deal-stack .ds-sheet .ds-note-text { font-size:12px; color:#514b44; }
 .deal-stack .ds-sheet .ds-next-actions { gap:4px 10px; margin-top:3px; }
 .deal-stack .ds-sheet .ds-commission-button { font-size:13px; }
 .deal-stack .ds-sheet .ds-row-error .ds-deal { box-shadow:inset 3px 0 #a02d21,1px 0 #cfc7ba; }
 .deal-stack .ds-sheet .ds-note-empty { color:var(--ds-muted); }
 .deal-stack .ds-sheet .ds-commission-button, .deal-stack .ds-sheet .ds-cell-button { max-width:100%; overflow-wrap:anywhere; white-space:normal; }
 .deal-stack .ds-sheet .ds-key-date time { white-space:normal; }
 .deal-stack .ds-sheet .ds-task-preview { flex-wrap:wrap; }
 .deal-stack .ds-sheet .ds-task-text { flex-basis:100%; }
 .deal-stack .ds-sheet .ds-link-list li { flex-wrap:wrap; gap:2px 5px; }
 .deal-stack .ds-sheet .ds-link-list a { max-width:100%; }
 .deal-stack .ds-sheet .dl-actions { min-width:0; }

}

/* Labelled links use the same small editor in Stack and full deal details. */
.deal-links { min-width:0; color:#171311; font-family:Inter,Arial,sans-serif; }
.deal-links .ds-link-list li { display:flex; align-items:baseline; gap:8px; min-width:0; }
.deal-links .ds-link-list a { flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#171311; font-size:12px; text-decoration:underline; text-underline-offset:3px; }
.deal-links button { cursor:pointer; }
.deal-links .ds-context-action { background:none; border:0; color:#726b63; padding:3px 0; font-size:12px; }
.deal-links .dl-edit { flex:none; font-size:11px; }
.deal-links .dl-remove { display:inline-flex; align-items:center; justify-content:center; flex:0 0 24px; width:24px; min-height:24px; padding:0; font-size:18px; line-height:1; color:#817a72; }
.deal-links .dl-remove:hover { color:#171311; }
.deal-links .dl-remove:focus-visible { outline:2px solid #fa5422; outline-offset:2px; border-radius:3px; }
.deal-links .dl-form { display:grid; gap:4px; margin-top:6px; min-width:0; }
.deal-links .dl-form label { font-size:11px; color:#726b63; }
.deal-links .dl-form input { box-sizing:border-box; width:100%; min-width:0; padding:7px 8px; font-size:13px; border:1px solid #ddd7ce; border-radius:4px; background:#fffdf9; color:#171311; }
.deal-links .dl-form input:focus-visible { outline:2px solid #fa5422; outline-offset:1px; }
.deal-links .dl-actions { display:flex; flex-wrap:wrap; gap:5px 10px; margin-top:4px; }
.deal-links .dl-actions button { padding:5px 7px; border:1px solid #ddd7ce; border-radius:4px; color:#171311; background:#fffdf9; font-size:11px; }
.deal-links .dl-actions button[type="submit"] { background:#171311; color:#fffdf9; border-color:#171311; }
.deal-links .dl-status { font-size:11px; color:#726b63; margin-top:4px; }
.deal-links .dl-status[role="alert"] { color:#a02d21; }
.deal-links .dl-status button { margin-left:8px; border:0; background:none; text-decoration:underline; font-size:inherit; color:inherit; }
.deal-links-detail { padding:14px; margin-bottom:16px; border:1px solid #ddd7ce; border-radius:10px; background:#fffdf9; }
.deal-links-detail h3 { margin:0 0 8px; font-size:14px!important; }
.deal-links-detail .ds-link-list a { font-size:13px; }
.deal-links-detail .dl-form { max-width:560px; }
@media(max-width:760px) {
 .deal-links .dl-form input { font-size:16px; min-height:40px; }
 .deal-links .ds-context-action, .deal-links .dl-actions button { min-height:34px; }
 .deal-links .dl-remove { flex-basis:34px; width:34px; }
}

@media(min-width:600px) and (max-width:760px) { .deal-stack .ds-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } .deal-stack .ds-filters select:last-child { grid-column:1 / -1; } }
