:root{--navy:#17324d;--blue:#2d6cdf;--ink:#223246;--muted:#708095;--line:#e2e8f0;--bg:#f4f7fb;--green:#238567;--amber:#bf861c;--red:#ca6257}
    *{box-sizing:border-box}html{background:var(--bg)}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.5 Inter,system-ui,-apple-system,"Segoe UI",sans-serif}.auth-pending body{visibility:hidden}button,input,select,textarea{font:inherit}button{cursor:pointer}
    .top{height:60px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:30px;padding:0 clamp(18px,5vw,64px)}.brand{display:flex;align-items:center;gap:11px;white-space:nowrap}.mark{width:36px;height:36px;border-radius:10px;background:var(--navy);color:#fff;display:grid;place-items:center;font-size:12px;font-weight:800}.brand strong{display:block;color:var(--navy);font-size:13px}.brand small{display:block;color:var(--muted);font-size:10px}.top-nav{height:100%;display:flex;gap:18px}.nav-link{display:flex;align-items:center;padding:0 4px;border-bottom:2px solid transparent;color:var(--muted);text-decoration:none;font-size:12px;font-weight:650}.nav-link.active{color:var(--blue);border-bottom-color:var(--blue)}.user{margin-left:auto;color:var(--muted);font-size:11px}.logout{border:1px solid var(--line);border-radius:7px;background:white;color:#617187;padding:7px 10px;font-size:11px;font-weight:650}
    main{max-width:1280px;margin:auto;padding:24px clamp(18px,5vw,64px) 48px}.primary{background:var(--blue);border:0;color:#fff;border-radius:8px;padding:10px 14px;font-weight:700;white-space:nowrap}.primary:hover{background:#245dc0}.secondary{background:#fff;border:1px solid var(--line);border-radius:8px;padding:9px 12px;color:#5e6c7c;font-weight:650}.danger{color:#b94d42;border-color:#f1d6d2}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:17px}.stat{background:#fff;border:1px solid var(--line);border-radius:10px;padding:13px 16px;min-height:76px}.stat-action{display:flex;align-items:center;padding:10px}.stat-action .primary{width:100%;height:44px;display:flex;align-items:center;justify-content:center;gap:8px}.stat-action .primary svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.stat span{display:block;color:var(--muted);font-size:11px}.stat strong{display:block;color:var(--navy);font-size:22px;line-height:1.25;margin-top:3px}
    .toolbar{display:flex;gap:9px;margin:0 0 11px}.search,.filter{height:39px;border:1px solid var(--line);background:#fff;border-radius:8px;padding:0 11px;outline:none;color:var(--ink)}.search{flex:1;min-width:150px}.filter{min-width:160px}.search:focus,.filter:focus,.field input:focus,.field textarea:focus,.field select:focus{border-color:#83a6e8;box-shadow:0 0 0 3px #edf3ff}
    .notice{display:none;margin:0 0 12px;padding:11px 13px;border:1px solid #f0d8a8;background:#fffaf0;border-radius:8px;color:#805e1e;font-size:12px}.notice.show{display:block}.status{min-height:0;margin:0 0 10px;color:#687a90;font-size:12px}.status.error{padding:10px 12px;border:1px solid #f2d0cc;border-radius:8px;background:#fff8f7;color:#a83b32}.table-wrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 5px 16px rgba(27,49,77,.04)}table{width:100%;min-width:790px;border-collapse:collapse;text-align:left}th{padding:11px 13px;background:#f8fafd;color:#718095;font-size:9px;text-transform:uppercase;letter-spacing:.09em;border-bottom:1px solid var(--line)}td{padding:12px 13px;border-bottom:1px solid #edf0f4;color:#47596e;font-size:12px;vertical-align:middle}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fafcff}.lead-name{font-weight:750;color:var(--navy);cursor:pointer}.lead-name:hover{color:var(--blue)}.subline{display:block;color:#8a97a7;font-size:10px;margin-top:2px}.pill{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:700;white-space:nowrap}.pill.negotiation{background:#eaf2ff;color:#2862bf}.pill.warming{background:#fff4df;color:#a66f10}.age{display:inline-flex;align-items:center;gap:5px;color:#65758a;font-size:10px}.dot{width:8px;height:8px;border-radius:50%;display:inline-block}.dot.new{background:#36a979}.dot.mid{background:#e1a32a}.dot.old{background:#d46b60}.row-actions{white-space:nowrap;display:flex;gap:5px}.icon-btn{width:29px;height:29px;display:inline-grid;place-items:center;border:1px solid var(--line);border-radius:7px;background:#fff;color:#627286}.icon-btn:hover{color:var(--blue);background:#f7faff}.icon-btn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.empty{padding:38px 18px;text-align:center;color:var(--muted);font-size:12px}.empty strong{display:block;color:var(--navy);font-size:14px;margin-bottom:3px}
    dialog{width:min(780px,calc(100% - 22px));max-height:min(90vh,900px);border:0;border-radius:13px;padding:0;box-shadow:0 24px 75px rgba(15,31,50,.24);color:var(--ink)}dialog.wide{width:min(980px,calc(100% - 22px))}dialog.confirm-dialog{width:min(480px,calc(100% - 22px))}dialog::backdrop{background:rgba(17,33,52,.42)}.modal{padding:22px}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:17px}.modal-head h2{margin:0;color:var(--navy);font-size:19px;letter-spacing:-.02em}.modal-head p{margin:3px 0 0;color:var(--muted);font-size:11px}.confirm-copy{margin:0;color:#617187;font-size:13px;line-height:1.55}.close{border:0;border-radius:7px;background:#f1f4f8;padding:6px 10px;color:#5e6c7c}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px 13px}.field label{display:block;margin:0 0 5px;color:#506175;font-size:11px;font-weight:700}.field input,.field textarea,.field select{width:100%;min-height:39px;border:1px solid var(--line);border-radius:7px;padding:8px 10px;background:white;color:var(--ink);outline:none}.money-field input{text-align:right;font-variant-numeric:tabular-nums}.field textarea{min-height:76px;resize:vertical}.field.full{grid-column:1/-1}.field.two{grid-column:span 2}.phones{display:grid;gap:7px}.phone-row{display:grid;grid-template-columns:78px minmax(0,1fr) 34px;gap:7px;align-items:center}.phone-row input{width:100%}.phone-label{font-size:9px;color:#748398;font-weight:700}.remove-phone{width:34px;height:36px;border:1px solid var(--line);border-radius:7px;background:#fff;color:#77869a}.add-phone{justify-self:start;border:0;background:transparent;color:var(--blue);font-size:11px;font-weight:700;padding:2px 0}.hint{margin-top:4px;color:#8a97a7;font-size:10px}.modal-actions{display:flex;justify-content:space-between;gap:8px;margin-top:17px}.modal-actions .actions-right{display:flex;gap:8px;margin-left:auto}.required{color:#c4473d}.form-error{display:none;margin:12px 0 0;color:#a83b32;background:#fff8f7;border:1px solid #f2d0cc;border-radius:7px;padding:8px 10px;font-size:11px}.form-error.show{display:block}.wizard-progress{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:-2px 0 17px}.wizard-chip{padding:8px 10px;border:1px solid #e5eaf1;border-radius:7px;color:#8995a4;background:#fafbfd;font-size:10px;font-weight:700}.wizard-chip.active{border-color:#a9c2ef;color:#2862bf;background:#f2f7ff}.wizard-chip.done{border-color:#b9dfd0;color:#287856;background:#f2faf6}.wizard-panel[hidden]{display:none}.wizard-note{margin:0 0 13px;color:#77869a;font-size:11px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:13px 0 8px}.section-title h3{margin:0;color:var(--navy);font-size:14px}.section-title small{color:var(--muted);font-size:10px}.detail-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-bottom:4px}.detail-section[hidden]{display:none}.detail-section+.detail-section{border-top:1px solid #edf0f4;margin-top:13px;padding-top:1px}.detail-item{padding:7px 9px;background:#f8fafd;border:1px solid #edf1f6;border-radius:8px;min-width:0}.detail-item span{display:block;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.06em}.detail-item strong{display:block;color:#3c5067;font-size:11px;margin-top:3px;white-space:pre-wrap;overflow-wrap:anywhere}.stack{display:grid;gap:8px}.event{padding:12px;border:1px solid var(--line);border-radius:9px;background:#fff}.event-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.event-title{font-weight:750;color:var(--navy);font-size:12px}.event-meta{color:var(--muted);font-size:10px;margin-top:2px}.event-body{white-space:pre-wrap;overflow-wrap:anywhere;color:#617187;font-size:11px;margin-top:7px}.event-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.event-actions select{height:31px;border:1px solid var(--line);border-radius:6px;background:#fff;color:#53667b;padding:0 7px;font-size:10px}.tiny{padding:6px 9px;font-size:10px}.empty-small{padding:15px;border:1px dashed #d5deea;border-radius:8px;color:#8793a1;text-align:center;font-size:11px}.divider{height:1px;background:#edf0f4;margin:15px 0}.contact-rating{font-size:10px;color:#63758b}
    dialog#leadDialog.lead-create-fullscreen{position:fixed;inset:0;width:100vw;height:100vh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:var(--bg);box-shadow:none;overflow:auto}
    dialog#leadDialog.lead-create-fullscreen::backdrop{background:var(--bg)}
    dialog#leadDialog.lead-create-fullscreen .modal{width:min(100%,1100px);min-height:100vh;margin:0 auto;padding:0 clamp(18px,5vw,64px) 30px;display:flex;flex-direction:column;background:transparent}
    dialog#leadDialog.lead-create-fullscreen .modal-head{position:sticky;top:0;z-index:10;align-items:center;margin:0 calc(-1 * clamp(18px,5vw,64px)) 22px;padding:12px clamp(18px,5vw,64px);min-height:66px;background:#fff;border-bottom:1px solid var(--line)}
    dialog#leadDialog.lead-create-fullscreen .wizard-panel{padding:20px;border:1px solid var(--line);border-radius:12px;background:#fff}
    dialog#leadDialog.lead-create-fullscreen .modal-actions{margin-top:auto;padding-top:18px}
    .detail-layout{display:grid;grid-template-columns:minmax(270px,320px) minmax(0,1fr);gap:18px;align-items:start}.client-info-panel,.quick-card,.detail-placeholder{background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 4px 14px rgba(27,49,77,.035)}.client-info-panel{overflow:hidden}.client-info-head{padding:16px;border-bottom:1px solid var(--line);background:#fff}.client-info-head .pill{margin-bottom:0}.client-status-line{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:9px}.client-created-date{color:#8390a1;font-size:9px}.client-status-button{border:0;font:inherit;line-height:1;cursor:pointer;transition:filter .15s}.client-status-button:hover{filter:brightness(.96)}.client-status-button:focus-visible{outline:2px solid #83a6e8;outline-offset:2px}.client-status-button:disabled{opacity:.7;cursor:wait}.client-name-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.client-info-head h2{min-width:0;margin:0;color:var(--navy);font-size:17px;line-height:1.3;overflow-wrap:anywhere}.client-action-icons{display:flex;flex:0 0 auto;gap:5px}.client-icon-btn{width:28px;height:28px;display:inline-grid;place-items:center;border:1px solid var(--line);border-radius:7px;background:#fff;color:#627286;text-decoration:none;cursor:pointer}.client-icon-btn:hover{color:var(--blue);background:#f7faff}.client-icon-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.client-icon-btn.copied{color:#238567;border-color:#b9dfd0;background:#f2faf6}.client-info-group{padding:13px 16px;border-bottom:1px solid #edf0f4}.client-info-group:last-child{border-bottom:0}.client-info-group h3{margin:0 0 9px;color:#52657b;font-size:9px;font-weight:750;letter-spacing:.07em;text-transform:uppercase}.client-info-item+.client-info-item{margin-top:8px}.client-info-item span{display:block;color:#8793a1;font-size:9px}.client-info-item strong{display:block;margin-top:2px;color:#3d5269;font-size:11px;font-weight:600;white-space:pre-wrap;overflow-wrap:anywhere}.client-contact-value{color:#3d5269;font-size:11px;font-weight:650;overflow-wrap:anywhere}.client-contact-value+.client-contact-value{margin-top:5px}.client-contact-value a{color:inherit;text-decoration:none}.client-contact-value a:hover{text-decoration:underline;color:var(--blue)}.client-profile-inline-line{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 5px;margin-top:7px;color:#3d5269;font-size:10px;line-height:1.5}.client-profile-inline-pair{display:inline-flex;align-items:baseline;gap:3px}.client-profile-inline-label{color:#8793a1;font-size:9px}.client-profile-inline-pair strong{color:#3d5269;font-size:10px;font-weight:650;overflow-wrap:anywhere}.client-profile-inline-separator{color:#a5b0bd;font-size:9px}.detail-main-column{min-width:0}.quick-box-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}.quick-card{min-height:128px;padding:14px}.quick-card h3{margin:0 0 12px;color:var(--navy);font-size:13px}.quick-card select{width:100%;min-height:39px;border:1px solid var(--line);border-radius:7px;background:#fff;color:#52657b;padding:7px 9px;font-size:11px}.quick-help{margin:8px 0 0;color:#8390a1;font-size:9px;line-height:1.4}.notes-card{grid-column:span 2;display:flex;flex-direction:column;height:158px;min-height:158px;max-height:158px;overflow:hidden}.notes-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;flex:0 0 auto}.notes-card-head h3{margin:0}.notes-edit-button{width:27px;height:27px;display:grid;place-items:center;flex:0 0 auto;border:1px solid var(--line);border-radius:7px;background:#fff;color:#627286;cursor:pointer}.notes-edit-button:hover{color:var(--blue);background:#f7faff}.notes-edit-button svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.notes-preview{display:block;width:100%;min-height:0;max-height:none;margin:0;padding:0 5px 0 0;text-align:left;vertical-align:top;align-self:stretch;flex:1 1 auto;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;color:#506175;font-size:11px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.notes-placeholder{color:#8a97a7;font-size:10px}.notes-editor[hidden]{display:none}.notes-editor textarea{width:100%;min-height:65px;resize:vertical;border:1px solid var(--line);border-radius:7px;padding:8px 9px;color:var(--ink);font:inherit;font-size:11px;outline:none}.notes-editor textarea:focus{border-color:#83a6e8;box-shadow:0 0 0 3px #edf3ff}.notes-editor-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}.notes-feedback{color:#8390a1;font-size:9px}.notes-editor-actions .secondary,.notes-editor-actions .primary{padding:6px 9px;font-size:10px}.notes-editor-buttons{display:flex;gap:6px}.detail-section{margin-top:4px}.detail-section .section-title{margin-bottom:8px}.detail-section .section-title h3{font-size:16px}.detail-empty{padding:22px 14px;border:1px dashed #d5deea;border-radius:8px;background:#fff;text-align:center;color:#8793a1;font-size:11px}.previous-plan-fields{grid-column:1/-1;padding:12px;border:1px solid var(--line);border-radius:8px;background:#f9fbfd}.previous-plan-fields[hidden]{display:none}.previous-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px}.previous-plan-grid .field.full{grid-column:1/-1}
    @media(max-width:980px){.detail-layout{grid-template-columns:minmax(240px,280px) minmax(0,1fr);gap:13px}.quick-box-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-card:first-child{grid-column:1/-1}}
    @media(max-width:430px){.previous-plan-grid{grid-template-columns:1fr}}
    @media(max-width:640px){.detail-layout{grid-template-columns:1fr}.quick-box-grid{grid-template-columns:1fr}.quick-card:first-child{grid-column:auto}.quick-card{min-height:96px}.notes-card{grid-column:1}.client-info-head,.client-info-group{padding:12px 14px}}
    .lead-data-boxes{display:block;margin-bottom:12px}.lead-profile-box{position:relative;background:#fff;border:1px solid var(--line);border-radius:9px;padding:10px 44px 10px 14px;min-width:0}.lead-profile-overview{display:flex;align-items:stretch;justify-content:flex-start;min-height:62px}.lead-status-block,.lead-data-block,.lead-origin-block{min-width:0;display:flex;flex-direction:column;justify-content:center}.lead-status-block{flex:0 0 145px;padding:0 14px 0 2px;border-right:1px solid #e8edf3}.lead-status-block .pill{align-self:flex-start;font-size:10px;padding:5px 9px}.lead-data-block{flex:0 1 350px;padding:0 18px;border-right:1px solid #e8edf3;gap:3px}.lead-data-name-phone{min-width:0;display:flex;align-items:baseline;gap:7px;white-space:nowrap}.lead-data-name-phone strong{overflow:hidden;text-overflow:ellipsis;color:var(--navy);font-size:12px;line-height:1.3}.lead-data-name-phone .separator{color:#99a5b3}.lead-data-name-phone a,.lead-data-name-phone span{overflow:hidden;text-overflow:ellipsis;color:#65758a;font-size:11px}.lead-email-line{min-width:0;display:flex;align-items:center;font-size:11px;color:#65758a}.lead-email-line a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lead-origin-block{flex:0 1 250px;padding:0 16px;gap:5px}.lead-origin-line,.lead-cost-line{min-width:0;display:flex;align-items:baseline;gap:5px;font-size:11px;line-height:1.3}.lead-origin-line span,.lead-cost-line span{color:#718095}.lead-origin-line strong,.lead-cost-line strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#42566d;font-size:11px}.lead-profile-details{margin:0}.lead-profile-details summary{position:absolute;right:10px;top:10px;width:24px;height:28px;display:grid;place-items:center;cursor:pointer;list-style:none;color:var(--blue);font-size:0;outline:none}.lead-profile-details summary::-webkit-details-marker{display:none}.lead-profile-details summary::after{content:"⌄";font-size:17px;line-height:1;transition:transform .15s}.lead-profile-details[open] summary::after{transform:rotate(180deg)}.lead-profile-details summary:focus-visible{outline:2px solid #83a6e8;border-radius:5px}.lead-profile-details .lead-extra-grid{margin-top:10px;padding-top:8px;border-top:1px solid #edf0f4}.lead-extra-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:14px;row-gap:8px}.lead-extra-grid .detail-item{padding:2px 0 5px;background:transparent;border:0;border-bottom:1px solid #edf0f4;border-radius:0}.lead-extra-grid .detail-item:last-child{border-bottom:0}.lead-extra-grid .detail-item span{font-size:8px}.lead-extra-grid .detail-item strong{font-size:10px;margin-top:1px}.contract-card{display:grid;grid-template-columns:minmax(250px,.95fr) minmax(0,1.35fr) minmax(0,1fr);border:1px solid var(--line);border-radius:9px;background:#fff;overflow:hidden}.contract-block{min-width:0;padding:11px 14px;display:flex;flex-direction:column;justify-content:flex-start;gap:4px}.contract-block+.contract-block{border-left:1px solid #e8edf3}.contract-label{color:#718095;font-size:8px;font-weight:700;letter-spacing:.07em;text-transform:uppercase}.contract-primary p{font-size:11px}.contract-primary p small{color:#7a8797;font-size:9px}.contract-block p{margin:0;color:#42566d;font-size:11px;font-weight:400;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}.contract-empty{color:#8995a4!important;font-style:italic}.contact-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:8px;background:#fff}.contact-table{width:100%;min-width:0;border-collapse:collapse;text-align:left}.contact-table th{padding:7px 10px;font-size:8px}.contact-table td{padding:6px 10px;font-size:10px}.contact-table td:first-child{white-space:nowrap}.contact-table th:last-child,.contact-table td:last-child{width:112px;text-align:center}.contact-action-cell{padding:3px!important}.interaction-icon{width:27px;height:27px}.interaction-icon svg{width:15px;height:15px}.sales-indicator-cell{width:36px;text-align:center;padding:6px 4px!important}.sale-leaf{display:inline-grid;place-items:center;width:27px;height:27px;padding:4px;border:0;border-radius:6px;background:transparent;color:#258055;cursor:pointer}.sale-leaf:hover{background:#eaf6ef}.sale-leaf svg{width:17px;height:17px;fill:#e6f5eb;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.contact-link{color:inherit;text-decoration:none;border-bottom:1px dashed #c8d3e0;cursor:pointer}.contact-link:hover{color:var(--blue);border-bottom-style:solid}.subline .contact-link{font-size:inherit}.pill.closed{background:#edf1f5;color:#65758a}.pill.rating-bom{background:#e5f5eb;color:#22764b}.pill.rating-regular{background:#fff4df;color:#a66f10}.pill.rating-ruim{background:#fff0ef;color:#b2443b}.pill.rating-unknown{background:#edf1f5;color:#7a8797}.pill.quote-open{background:#eaf2ff;color:#2862bf}.pill.quote-approved{background:#e5f5eb;color:#22764b}.pill.quote-cancelled{background:#fff0ef;color:#b2443b}.pill.quote-expired{background:#edf0f4;color:#6d7887}.contact-row-actions{display:flex;justify-content:center;gap:4px}.contact-expand-button svg{transition:transform .16s ease}.contact-expand-button[aria-expanded="true"] svg{transform:rotate(180deg)}.contact-expanded-row td{padding:0!important;background:#f8fafd;text-align:left!important}.contact-expanded-content{padding:10px 14px 12px 38px;border-top:1px solid #edf0f4;border-bottom:1px solid var(--line);text-align:left}.contact-expanded-meta{display:flex;flex-wrap:wrap;gap:8px 20px;margin-bottom:8px}.contact-expanded-meta-item small,.contact-expanded-summary small{display:block;color:#8290a1;font-size:9px}.contact-expanded-meta-item strong{display:block;margin-top:2px;color:#52657b;font-size:10px;font-weight:650}.contact-expanded-summary p{margin:3px 0 0;color:#465b73;font-size:11px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}.contact-expanded-empty{color:#8995a4;font-style:italic}.quote-icon.quote-open{color:#a96700;background:#fff5e5;border-color:#f1d7aa}.quote-icon.quote-approved{color:#258055;background:#eff9f3;border-color:#c7e6d3}.quote-icon.quote-cancelled{color:#b2443b;background:#fff6f5;border-color:#efd2ce}.quote-icon.quote-expired{color:#7d2942;background:#f8eef2;border-color:#e8cdd6}.quote-icon.quote-empty{color:#2862bf;background:#f7faff;border-color:#cbdcf8;box-shadow:inset 0 0 0 1px #f1f6ff}.quote-icon:hover{filter:brightness(.97)}.quote-icon:disabled{opacity:.45;cursor:not-allowed;filter:none;background:#f4f6f8}.quote-details{display:grid;gap:12px}.quote-details small{display:block;color:#758398;font-size:10px}.quote-details p{margin:3px 0 0;color:#3c5067;font-size:12px;overflow-wrap:anywhere}.quote-date-line{font-size:10px;color:#718095}.quote-contract{padding:10px;border-radius:8px;background:#f2faf5;border:1px solid #d8ecdf}.quote-contract strong{color:#247750;font-size:12px}.sale-event{padding:11px 12px}.sale-event .event-title{font-size:12px}.sale-event .event-meta,.sale-event .event-body{font-size:10px}.contact-modal-fields{display:grid;grid-template-columns:1fr 1fr;gap:7px 10px}.contact-modal-fields label{font-size:10px;font-weight:700;color:#53667b}.contact-modal-fields select,.contact-modal-fields input{grid-column:1/-1;width:100%;min-height:36px;margin-top:-5px;border:1px solid var(--line);border-radius:7px;padding:6px 9px;background:white;color:var(--ink)}.contact-text-content{padding:12px;border-radius:8px;background:#f8fafd;border:1px solid #e9eef4;color:#465b73;font-size:12px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere;min-height:48px}.contact-text-empty{color:#8995a4;font-style:italic}html.lead-detail-route body>header.topbar,html.lead-detail-route body>main{display:none!important}.detail-screen[hidden]{display:none!important}.detail-screen{position:relative;width:100%;min-height:100vh;margin:0;padding:0;border:0;background:var(--bg);overflow:visible}.detail-topbar{position:sticky;top:0;z-index:10;min-height:66px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px clamp(18px,5vw,64px);background:#fff;border-bottom:1px solid var(--line)}.detail-back{white-space:nowrap}.detail-top-actions{display:flex;align-items:center;gap:9px}.detail-contact{min-height:43px;padding:11px 18px;font-size:13px;box-shadow:0 4px 12px rgba(45,108,223,.2)}.detail-contact span{font-size:17px;line-height:12px}.detail-content{max-width:1280px;margin:0 auto;padding:18px clamp(18px,5vw,64px) 40px}.detail-heading{margin:0 0 12px}.detail-heading h2{margin:0;color:var(--navy);font-size:20px;letter-spacing:-.025em}.detail-heading p{margin:2px 0 0;color:var(--muted);font-size:11px}.detail-screen .detail-summary{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:12px}.detail-screen .section-title{margin-top:0}.detail-screen .section-title{margin-bottom:6px}.detail-screen .event{padding:10px 12px}.detail-screen .event-title{font-size:12px}.detail-screen .event-meta,.detail-screen .event-body{font-size:10px}.contact-actions .actions-right{gap:7px}.contact-actions button{font-size:11px;padding:8px 10px}.hint-inline{font-size:10px;font-weight:400;color:#8995a4}.contact-primary-fields{grid-template-columns:1fr;gap:9px}.contact-primary-fields .field.full{grid-column:1}.contact-followup-fields{margin-top:10px}.contact-primary-fields textarea{min-height:62px}.modal#contactForm{padding:18px}.modal#contactForm .modal-head{margin-bottom:12px}.modal#contactForm .modal-head h2{font-size:17px}.modal#contactForm .modal-head p{font-size:10px}
    @media(max-width:760px){.lead-profile-overview{display:grid;grid-template-columns:115px minmax(0,1fr) 185px}.contract-card{grid-template-columns:minmax(145px,.8fr) minmax(0,1.2fr)}.contract-block:last-child{grid-column:1/-1;border-left:0;border-top:1px solid #e8edf3}.lead-profile-overview{grid-template-columns:115px minmax(0,1fr) 185px}.lead-data-block{padding:0 12px}.lead-origin-block{padding:0 12px}.lead-data-name-phone strong{font-size:12px}.detail-topbar{min-height:60px;padding:9px 14px}.detail-back{font-size:10px;padding:8px}.detail-top-actions{gap:6px}.detail-top-actions .secondary{padding:8px;font-size:10px}.detail-contact{min-height:38px;padding:9px 11px;font-size:10px}.detail-content{padding:16px 14px 30px}.detail-heading h2{font-size:19px}.lead-data-boxes{grid-template-columns:minmax(0,.9fr) minmax(0,1.6fr)}.lead-extra-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.contact-edit-grid{grid-template-columns:1fr 1fr}.contact-edit-grid label:last-child{grid-column:1/-1}.detail-screen .detail-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.top{height:54px;gap:12px;padding:0 13px}.brand small{display:none}.brand{gap:7px}.mark{width:31px;height:31px}.top-nav{gap:7px}.nav-link{font-size:10px;padding:0 2px}.user{display:none}.logout{padding:6px 8px;font-size:10px}main{padding:19px 14px 35px}.primary{padding:9px 11px;font-size:11px}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.stat{padding:10px}.stat span{font-size:9px}.stat strong{font-size:19px}.toolbar{flex-wrap:wrap}.search{flex:1 1 100%}.filter{flex:1}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.origin-field,.cost-field{grid-column:span 1!important}.detail-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.event-head{flex-direction:column}.event-actions{width:100%}}
    @media(max-width:600px){.lead-profile-overview{grid-template-columns:105px minmax(0,1fr)}.lead-origin-block{grid-column:2;flex-direction:row;justify-content:space-between;gap:8px;padding:8px 12px 0;border-top:1px solid #e8edf3}.lead-origin-line,.lead-cost-line{font-size:10px}.lead-origin-line strong,.lead-cost-line strong{max-width:150px}}
    @media(max-width:430px){.contract-card{grid-template-columns:1fr}.contract-block+.contract-block{border-left:0;border-top:1px solid #e8edf3}.contract-block:last-child{grid-column:auto}.lead-profile-overview{grid-template-columns:1fr;gap:0;padding-right:22px}.lead-status-block,.lead-data-block,.lead-origin-block{padding:8px 2px;border-right:0}.lead-status-block,.lead-data-block{border-bottom:1px solid #e8edf3}.lead-data-name-phone{white-space:normal;flex-wrap:wrap}.lead-data-name-phone strong{font-size:12px}.lead-profile-box{padding-right:42px}.lead-data-boxes{grid-template-columns:1fr}.lead-extra-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-topbar{align-items:flex-start;flex-direction:column;gap:4px}.detail-top-actions{width:100%}.detail-top-actions button{flex:1}.detail-content{padding-top:14px}.contact-actions{align-items:stretch;flex-direction:column}.contact-actions .actions-right{width:100%;margin-left:0}.contact-actions .actions-right button{flex:1}.top{gap:6px}.brand strong{font-size:11px}.top-nav{gap:4px}.nav-link{font-size:9px}.form-grid{grid-template-columns:1fr}.field.two,.field.full{grid-column:1}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.modal{padding:16px}.detail-summary{grid-template-columns:1fr 1fr}}

    @media(max-width:680px){
      html,body{max-width:100%;overflow-x:hidden}
      .top{height:auto;min-height:54px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:7px 12px}
      .brand{grid-column:1;grid-row:1;min-width:0}.brand strong{font-size:12px}.brand small{display:none}
      .top-nav{grid-column:1/-1;grid-row:2;height:40px;width:100%;justify-content:space-between;gap:8px;overflow-x:auto;scrollbar-width:none}.top-nav::-webkit-scrollbar{display:none}
      .nav-link{min-height:40px;flex:0 0 auto;padding:0 7px;font-size:11px;white-space:nowrap}
      .user{display:none}.logout{grid-column:2;grid-row:1;min-width:48px;min-height:40px;padding:7px 10px;font-size:12px}
      main{padding:14px 12px 28px}
      .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}
      .stat{min-height:68px;padding:10px 11px}.stat span{font-size:10px;line-height:1.3}.stat strong{font-size:19px;margin-top:4px}
      .stat-action{padding:7px}.stat-action .primary{height:48px;white-space:normal;line-height:1.2;padding:6px;gap:5px}
      .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}
      .search{grid-column:1/-1;width:100%;min-width:0;height:46px;font-size:16px}.filter{width:100%;min-width:0;height:44px;padding:0 8px;font-size:13px}
      .table-wrap{overflow:visible;background:transparent;border:0;border-radius:0;box-shadow:none}
      .table-wrap>table{display:block;width:100%;min-width:0}
      .table-wrap thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
      .table-wrap tbody{display:grid;gap:8px}
      .table-wrap tbody tr{display:grid;grid-template-columns:34px minmax(0,1fr) auto;grid-template-areas:"sale lead status" "sale phone age" "origin origin actions";align-items:center;gap:3px 6px;padding:9px 10px;background:#fff;border:1px solid var(--line);border-radius:9px;box-shadow:0 2px 6px rgba(27,49,77,.035)}
      .table-wrap tbody td{min-width:0;padding:3px 2px;border:0;font-size:11px;overflow-wrap:anywhere}
      .table-wrap tbody td:nth-child(1){grid-area:sale;width:auto;padding:0!important}
      .table-wrap tbody td:nth-child(2){grid-area:lead}
      .table-wrap tbody td:nth-child(3){grid-area:phone;color:#53667b}
      .table-wrap tbody td:nth-child(3)::before{content:"Celular: ";color:#8793a1;font-size:10px}
      .table-wrap tbody td:nth-child(4){grid-area:origin;color:#53667b}
      .table-wrap tbody td:nth-child(4)::before{content:"Origem: ";color:#8793a1;font-size:10px}
      .table-wrap tbody td:nth-child(5){grid-area:status;justify-self:end}
      .table-wrap tbody td:nth-child(6){grid-area:age;justify-self:end}
      .table-wrap tbody td:nth-child(7){grid-area:actions;justify-self:end}
      .lead-name{font-size:13px}.subline{font-size:10px}
      .pill{font-size:10px;padding:4px 7px}
      .age{font-size:10px;white-space:nowrap}
      .row-actions{gap:5px}
      .icon-btn{width:38px;height:38px;border-radius:8px}
      .icon-btn svg{width:17px;height:17px}
      .sale-leaf{width:34px;height:34px}
      .empty{padding:28px 14px}
      .detail-topbar{min-height:60px;padding:8px 12px;gap:8px}
      .detail-back{min-height:42px;padding:8px 10px;font-size:12px}
      .detail-top-actions{gap:6px}.detail-top-actions .secondary{min-height:42px;padding:7px 9px;font-size:12px;white-space:nowrap}
      .detail-contact{min-height:42px;padding:8px 10px;font-size:12px;white-space:normal;line-height:1.2}
      .detail-content{padding:14px 12px 28px}
      .detail-heading h2{font-size:19px}
      .lead-profile-box{padding:10px 42px 10px 12px}
      .contact-table-wrap{overflow:visible;border:0;background:transparent}
      .contact-table{display:block;width:100%}.contact-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
      .contact-table tbody{display:grid;gap:7px}
      .contact-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"date actions" "channel status" "rating rating";align-items:center;gap:4px 8px;padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:#fff}
      .contact-table td{min-width:0;padding:2px;border:0;font-size:12px}
      .contact-table td:nth-child(1){grid-area:date;white-space:normal;color:#53667b}
      .contact-table td:nth-child(2){grid-area:channel;color:#718095}
      .contact-table td:nth-child(3){grid-area:status;justify-self:end}.contact-table td:nth-child(4){grid-area:rating;justify-self:start}
      .contact-table th:last-child,.contact-table td:last-child{width:auto;text-align:right}
      .contact-action-cell{grid-area:actions;padding:0!important}
      .contact-row-actions{justify-content:flex-end;gap:5px}
      .contact-table tbody tr.contact-expanded-row{grid-column:1/-1;display:block;padding:0;border:0;background:transparent}
      .contact-table tbody tr.contact-expanded-row td{display:block;width:100%;padding:0}
      .contact-expanded-content{margin-top:-7px;padding:10px;border:1px solid var(--line);border-top:0;border-radius:0 0 8px 8px}
      .interaction-icon{width:38px;height:38px}.interaction-icon svg{width:18px;height:18px}
      .contract-card{grid-template-columns:1fr}.contract-block{padding:11px 12px}.contract-block+.contract-block{border-left:0;border-top:1px solid #e8edf3}
      .detail-screen .detail-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
      dialog:not(.detail-screen){position:fixed;inset:8px 0 0;width:100%;max-width:100%;height:auto;max-height:calc(100vh - 8px);max-height:calc(100dvh - 8px);margin:0;border-radius:14px 14px 0 0;overflow:auto;overscroll-behavior:contain}
      .modal{padding:16px}
      .modal-head{position:sticky;top:0;z-index:3;margin:-16px -16px 12px;padding:15px 16px 10px;background:#fff;border-bottom:1px solid #edf0f4}
      .modal-head h2{font-size:18px}.modal-head p{font-size:12px}
      .close{min-width:44px;min-height:44px;padding:8px}
      .form-grid,.form-grid.contact-primary-fields,.form-grid.contact-followup-fields{grid-template-columns:1fr;gap:10px}
      .field.two,.field.full,.contact-primary-fields .field.full{grid-column:1}
      .field input,.field textarea,.field select,.contact-modal-fields input,.contact-modal-fields select{min-height:46px;font-size:16px;padding:10px 12px}
      .field textarea,.contact-primary-fields textarea{min-height:90px}
      .field label{font-size:12px}.hint{font-size:11px;line-height:1.4}
      .phone-row{grid-template-columns:72px minmax(0,1fr) 44px;gap:6px}.remove-phone{width:44px;height:44px}
      .add-phone{min-height:42px;font-size:13px;padding:8px 0}
      .contact-modal-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
      .contact-modal-fields label{font-size:11px}.contact-modal-fields select,.contact-modal-fields input{min-height:44px;margin-top:0}
      .modal-actions{position:sticky;bottom:-16px;z-index:2;flex-wrap:wrap;margin:14px -16px -16px;padding:10px 16px calc(12px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #edf0f4}
      .modal-actions button{min-height:44px;font-size:13px}
      .modal-actions .actions-right{gap:7px}
      .contact-actions{align-items:stretch;flex-direction:column-reverse}
      .contact-actions .actions-right{display:grid;width:100%;grid-template-columns:1fr;margin-left:0}
      .contact-actions .actions-right button{min-height:46px;white-space:normal}
      .form-error{font-size:12px;line-height:1.4}
      .contact-text-content{font-size:14px;line-height:1.5}
      .quote-details p{font-size:14px;line-height:1.45}
      .section-title{align-items:flex-start;flex-wrap:wrap}
    }
    @media(max-width:430px){
      .stats{gap:7px}.stat{padding:9px}.stat span{font-size:9px}.stat strong{font-size:18px}
      .detail-topbar{align-items:flex-start;flex-direction:column;gap:5px}.detail-top-actions{width:100%}.detail-top-actions button{flex:1;min-width:0;white-space:normal}
      .lead-profile-overview{grid-template-columns:1fr}.lead-status-block,.lead-data-block,.lead-origin-block{padding:8px 2px;border-right:0}.lead-status-block,.lead-data-block{border-bottom:1px solid #e8edf3}.lead-origin-block{grid-column:1;flex-direction:column;align-items:flex-start;padding:8px 2px 2px;border-top:0}
      .lead-data-name-phone{white-space:normal;flex-wrap:wrap}.lead-data-name-phone strong{font-size:12px}
      .contact-table tbody tr{grid-template-columns:minmax(0,1fr) auto}.contact-action-cell .contact-row-actions{gap:4px}.interaction-icon{width:36px;height:36px}
      .lead-extra-grid{grid-template-columns:1fr 1fr}.detail-screen .detail-summary{grid-template-columns:1fr 1fr}
      .modal-actions{gap:6px}.modal-actions .actions-right{width:100%;margin-left:0}.modal-actions:not(.contact-actions) .actions-right button{flex:1}
    }

    .topbar{height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100vw - 1380px)/2));gap:24px}
    .welcome{display:flex;align-items:center;gap:10px;color:var(--navy);white-space:nowrap}.welcome-copy{display:grid;gap:1px}.site-nav-icon{width:30px;height:30px;object-fit:contain;flex:none}.welcome-label{color:#69809a;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.welcome strong{font-size:16px;line-height:1.25;letter-spacing:-.02em;color:var(--navy)}
    .nav{display:flex;align-items:center;gap:7px;margin-left:auto}.nav-link{position:relative;width:42px;height:42px;display:grid;place-items:center;padding:0;border:0;border-radius:10px;background:transparent;color:#63758b;text-decoration:none;transition:background .15s,color .15s}.nav-link:hover{background:#f3f6fa;color:var(--navy)}.nav-link.active{background:#edf3ff;color:var(--blue)}.nav-link svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.nav-divider{height:28px;width:1px;background:var(--line);margin:0 5px}.mobile-label{display:none}.nav-link.app-nav-link{display:none}.nav-link[title]:hover::after{content:attr(title);position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);z-index:10;padding:6px 9px;border-radius:6px;background:#26384b;color:#fff;font-size:11px;font-weight:600;white-space:nowrap;box-shadow:0 5px 18px rgba(25,48,76,.1)}
    .logout:hover{color:var(--blue)}
    @media(max-width:720px){.topbar{height:auto;min-height:60px;display:grid;grid-template-columns:1fr;gap:8px;padding:10px 16px 8px}.welcome{grid-row:1}.welcome-label{font-size:9px}.welcome strong{font-size:15px}.nav{grid-row:2;width:100%;justify-content:space-between;gap:2px;margin:0;padding-top:6px;border-top:1px solid #f0f2f5}.nav-link,.nav-link.app-nav-link{display:flex;flex:1 1 0;width:auto;min-width:0;height:43px;flex-direction:column;gap:2px;border-radius:8px;color:#657990}.nav-link svg{width:17px;height:17px;flex:none}.nav-link .mobile-label{display:block;font-size:9px;line-height:1.1;font-weight:650;white-space:nowrap}.nav-divider{display:none}.nav-link[title]:hover::after{display:none}}
  


    .release-stamp{position:fixed;right:10px;bottom:7px;z-index:30;pointer-events:none;padding:3px 7px;border:1px solid rgba(220,227,236,.8);border-radius:999px;background:rgba(255,255,255,.9);color:#8290a1;font:9px/1.2 Arial,sans-serif;letter-spacing:.01em}
    .release-stamp-detail{color:#8290a1;font:9px/1.2 Arial,sans-serif;white-space:nowrap;align-self:center}
    .summary-origin-row{display:flex;align-items:center;justify-content:space-between;gap:9px;min-width:0}.summary-origin-row strong{min-width:0;margin-top:2px;overflow-wrap:anywhere}.lead-summary-trigger{width:28px;height:28px;display:grid;place-items:center;flex:none;border:1px solid #cfe0ff;border-radius:7px;background:#f2f7ff;color:#2862bf;cursor:pointer;transition:background .15s,border-color .15s,color .15s}.lead-summary-trigger:hover{background:#e8f1ff;border-color:#a9c5f4}.lead-summary-trigger.ready{border-color:#c4e6d2;background:#edf8f1;color:#218052}.lead-summary-trigger.ready:hover{background:#e0f3e8;border-color:#9bd3b1}.lead-summary-trigger:disabled{opacity:.65;cursor:wait}.lead-summary-trigger svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.lead-summary-status{min-height:16px;margin:10px 0 0;color:#718096;font-size:11px}.lead-summary-status.error{color:#b2443b}#leadSummaryDialog textarea{min-height:230px;resize:vertical;line-height:1.55}
    @media(max-width:640px){.release-stamp{right:6px;bottom:5px;font-size:8px}.release-stamp-detail{font-size:8px}}
    .client-name-edit-group{display:flex;align-items:center;gap:8px;min-width:0}.client-edit-lead{flex:none}.client-name-edit-group h2{min-width:0;overflow-wrap:anywhere}.detail-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 8px}.detail-section-heading h3{margin:0;color:var(--navy);font-size:16px}.detail-add-contact{display:inline-flex!important;align-items:center;justify-content:center;gap:7px;flex:none;width:auto;height:34px;padding:0 12px;border-color:var(--blue);border-radius:8px;background:var(--blue);color:#fff;font-family:inherit;font-size:11px;font-weight:700;box-shadow:0 3px 10px rgba(45,108,223,.16)}.detail-add-contact:hover{border-color:#245fc7;background:#245fc7;color:#fff}.detail-add-contact svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.detail-add-contact span{white-space:nowrap}

/* Registro de contato em tela cheia e respostas rápidas personalizadas (v118). */
dialog#contactDialog.contact-fullscreen-dialog{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#fff;color:var(--ink);overflow:hidden}
dialog#contactDialog.contact-fullscreen-dialog::backdrop{background:rgba(20,35,52,.48)}
.modal#contactForm{display:flex;flex-direction:column;width:100%;max-width:none;height:100%;max-height:100%;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;overflow:auto;background:#fff}
.contact-page-topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;min-height:66px;padding:10px clamp(18px,5vw,64px);background:#fff;border-bottom:1px solid var(--line)}
.contact-form-body{width:min(100%,1296px);max-width:1296px;margin:0 auto;flex:1;padding:22px 0 12px}
.contact-form-title{margin:0 0 16px}.contact-form-title h2{margin:0;color:var(--navy);font-size:22px;letter-spacing:-.02em}.contact-form-title p{margin:4px 0 0;color:var(--muted);font-size:12px}
.contact-primary-fields{width:100%;max-width:736px;grid-template-columns:repeat(2,minmax(0,360px));justify-content:start;gap:12px 16px}
.contact-primary-fields .field.full{grid-column:auto}
.contact-summary-layout{width:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,340px);gap:20px;align-items:stretch}
.contact-summary-field{min-width:0}.contact-summary-field textarea{min-height:clamp(230px,34vh,440px);height:100%;resize:vertical;line-height:1.55}
.custom-replies-card{min-width:0;padding:17px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 3px 12px rgba(23,50,77,.04)}
.custom-replies-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.custom-replies-heading h3{margin:0;color:var(--navy);font-size:16px}.custom-replies-heading p{margin:5px 0 14px;color:#7a8797;font-size:11px;line-height:1.4}
.custom-replies-grid{display:grid;gap:7px;align-content:start;max-height:min(420px,48vh);overflow:auto;padding:1px 2px 1px 0}
.custom-reply-row{display:grid;grid-template-columns:minmax(0,1fr) 34px 34px;gap:6px;align-items:center;min-width:0;padding:4px;border:1px solid #e0e7f0;border-radius:8px;background:#fff}
.custom-reply-insert{display:block;min-width:0;width:100%;padding:8px 10px;border:0;border-radius:5px;background:transparent;color:#31506f;font-family:inherit;font-size:12px;font-weight:650;line-height:1.35;text-align:left;overflow-wrap:anywhere;cursor:pointer;transition:background .15s,color .15s}
.custom-reply-insert:hover{background:#f4f8ff;color:var(--blue)}
.custom-reply-icon,.custom-reply-add{display:grid;place-items:center;width:32px;height:32px;border:1px solid #d9e2ee;border-radius:7px;background:#fff;color:#607791;cursor:pointer;transition:border-color .15s,background .15s,color .15s}
.custom-reply-icon:hover,.custom-reply-add:hover{border-color:#a9c5f4;background:#f2f7ff;color:var(--blue)}.custom-reply-icon.delete:hover{border-color:#f2c7c4;background:#fff5f4;color:#c4473d}
.custom-reply-icon svg,.custom-reply-add svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.custom-reply-add{width:36px;height:36px;flex:none;border-color:#cfe0ff;background:#f2f7ff;color:#2862bf}.custom-reply-add[hidden]{display:none}.custom-reply-add:disabled{opacity:.5;cursor:not-allowed}
.custom-replies-empty{margin:0;padding:15px 10px;border:1px dashed #d9e2ee;border-radius:8px;color:#7a8797;font-size:11px;text-align:center}
.custom-reply-insert:focus-visible,.custom-reply-icon:focus-visible,.custom-reply-add:focus-visible{outline:2px solid #83a6e8;outline-offset:2px}
.custom-replies-status{min-height:16px;margin:12px 0 0;color:#718095;font-size:10px;line-height:1.4}
.contact-followup-fields{max-width:880px;margin:28px 0 12px;grid-template-columns:repeat(2,minmax(0,360px)) auto;align-items:end;gap:16px}
.contact-inline-save{align-self:end;min-height:39px;white-space:nowrap;padding:9px 18px}
.contact-standard-field{min-width:0;width:100%;max-width:360px}
.modal-actions.contact-actions{position:sticky;bottom:0;z-index:4;flex:none;width:min(1480px,calc(100% - 48px));max-width:1480px;margin:12px auto 0;padding:14px 0 max(14px,env(safe-area-inset-bottom));border-top:1px solid #e7edf4;background:#fff}
.contact-actions .actions-right{gap:10px}.contact-actions .actions-right button{min-height:44px;background:var(--blue);border-color:var(--blue);color:#fff;font-weight:650}.contact-actions .actions-right button:hover{background:#245fc7;border-color:#245fc7}.contact-actions .actions-right button:disabled{opacity:.62;cursor:wait}
dialog#quickReplyDialog.quick-reply-dialog{width:min(560px,calc(100vw - 28px));max-width:560px;max-height:min(90vh,760px);max-height:min(90dvh,760px);overflow-x:hidden;overflow-y:auto}#quickReplyDialog .modal{box-sizing:border-box;width:100%;max-width:100%;min-width:0;padding:22px}#quickReplyText{box-sizing:border-box;width:100%;min-height:170px;resize:vertical;line-height:1.5}
@media(max-width:1360px){.contact-form-body{width:calc(100% - 48px)}}
@media(max-width:800px){.contact-form-body{width:calc(100% - 32px);padding-top:16px}.contact-page-topbar{padding-left:16px;padding-right:16px}.contact-form-title h2{font-size:20px}.contact-summary-layout{grid-template-columns:minmax(0,1fr) minmax(260px,320px);gap:12px}.custom-replies-card{padding:13px}.custom-replies-grid{gap:7px}.custom-reply-row{grid-template-columns:minmax(0,1fr) 36px 36px;gap:4px}.custom-reply-insert{font-size:11px}.custom-reply-icon{width:34px;height:34px}.modal-actions.contact-actions{width:calc(100% - 32px);margin-left:auto;margin-right:auto;padding-left:0;padding-right:0}}
@media(max-width:640px){.contact-form-body{width:calc(100% - 24px);padding-top:12px}.contact-page-topbar{min-height:60px}.contact-form-title{margin-bottom:12px}.contact-form-title h2{font-size:19px}.contact-summary-layout{grid-template-columns:1fr}.contact-summary-field textarea{min-height:200px;height:200px}.custom-replies-card{padding:12px}.custom-replies-heading h3{font-size:14px}.custom-replies-grid{grid-template-columns:1fr;max-height:min(280px,34vh)}.contact-followup-fields{grid-template-columns:1fr;gap:10px;margin-top:12px}.contact-inline-save{width:100%}.contact-primary-fields{grid-template-columns:1fr}.modal-actions.contact-actions{align-items:stretch;flex-direction:column-reverse;gap:8px;width:calc(100% + 24px);margin-left:-12px;margin-right:-12px;padding:10px 12px max(12px,env(safe-area-inset-bottom))}.contact-actions .actions-right{display:grid;width:100%;grid-template-columns:1fr;gap:7px;margin:0}.contact-actions .actions-right button,.contact-actions>button{width:100%;min-height:44px}.contact-actions>button{order:2}}

/* Temperatura de engajamento e situação congelada (v119). */
.client-status-line{justify-content:flex-end;margin-bottom:8px}
.client-status-group{display:flex;align-items:center;gap:7px}
.client-status-button.frozen,.pill.frozen{background:#edf1f5;color:#5f6f81}
.client-identity{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.client-name-row{align-items:center}
.client-created-date{display:block;color:#8390a1;font-size:9px;line-height:1.3}
.lead-temperature{width:22px;height:22px;display:inline-grid;place-items:center;flex:none}
.lead-temperature svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.lead-temperature.quente{color:#d94b4b}
.lead-temperature.morno{color:#d79b18}
.lead-temperature.frio{color:#65b8df}
@media(max-width:430px){.client-status-line{justify-content:flex-end}.client-identity{max-width:100%}}
