/* Lead Detail core parity — V1 Frontend 280 mobile structure on V2 data. */
.lead-core-screen{display:grid;gap:10px}

.lead-detail-toolbar{display:flex;align-items:center;gap:10px;min-height:40px}
.lead-detail-toolbar strong{min-width:0;color:#26332e;font-size:16px;font-weight:900;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lead-detail-back{flex:0 0 auto;min-height:40px;margin:0;padding:8px 12px 7px;border:1px solid #c7d2cc;border-radius:9px;background:#f5f6f5;color:#4b5550;font-size:12px;font-weight:850}

.lead-detail-contact-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.lead-detail-contact-actions a,.lead-detail-contact-actions button{min-width:0;min-height:44px;padding:10px 5px;display:flex;align-items:center;justify-content:center;border:1px solid #c5d2cb;border-radius:10px;background:#f5f6f5;color:#4b5550;font-size:12px;font-weight:850;text-decoration:none;box-shadow:none}
.lead-detail-contact-actions a:active,.lead-detail-contact-actions button:active{background:#f5f8f6}
.lead-detail-contact-actions button:disabled{background:#f3f4f3;color:#9aa39f;border-color:#d9dedb}

.lead-core-identity,.lead-core-ops,.lead-core-stack,.lead-core-disclosure{background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow)}
.lead-core-identity{padding:12px 14px}
.lead-core-id{color:#4a534e;font-size:13px;font-weight:900;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.lead-core-identity-meta{margin-top:4px;color:#68736e;font-size:11px;font-weight:750;line-height:1.3}

.lead-core-ops{padding:11px 13px}
.lead-core-op-grid{display:grid;grid-template-columns:1fr 1fr;gap:0}
.lead-core-op-item{appearance:none;border:0;background:transparent;text-align:left;padding:9px 10px;min-width:0;border-bottom:1px solid #e1e6e3;color:#23332c}
.lead-core-op-item:nth-child(odd){border-right:1px solid #e1e6e3}
.lead-core-op-item:nth-last-child(-n+2){border-bottom:0}
.lead-core-op-item span{display:block;color:#68736e;font-size:10px;font-weight:900;letter-spacing:.045em;text-transform:uppercase;margin-bottom:3px}
.lead-core-op-item strong{display:block;color:#4a534e;font-size:13px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.lead-core-disclosure{padding:0;overflow:hidden}
.lead-core-disclosure-toggle{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto 18px;align-items:center;gap:9px;border:0;background:#fff;padding:13px 14px;text-align:left;color:#4a534e;min-height:50px}
.lead-core-disclosure-toggle:active{background:#f6f8f7}
.lead-core-disclosure-title{font-size:12px;font-weight:900;letter-spacing:.045em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lead-core-disclosure-status{font-size:11px;font-weight:900;color:#68736e;text-transform:uppercase;white-space:nowrap;max-width:170px;overflow:hidden;text-overflow:ellipsis}
.lead-core-disclosure-chevron{font-size:18px;line-height:1;color:#59625d;transition:transform .15s ease;text-align:center}
.lead-core-disclosure.open>.lead-core-disclosure-toggle .lead-core-disclosure-chevron{transform:rotate(180deg)}
.lead-core-disclosure-body{padding:0 14px 14px}
.lead-core-disclosure-body[hidden]{display:none}

.lead-core-actions{margin:0}
.lead-core-actions-grid{display:grid;grid-template-columns:1fr;gap:7px}
.lead-core-actions-grid button,.lead-core-inline-save button,.lead-core-workflow-actions button,.lead-note-save{width:100%;min-height:44px;border:1px solid #c7d2cc;border-radius:9px;padding:9px 11px;background:#f5f6f5;color:#4b5550;font-size:12px;font-weight:900}
.lead-core-workflow-actions .gold{background:#f5f6f5;border-color:#cbd2ce;color:#4b5550}

.lead-core-stack{padding:0;overflow:hidden}
.lead-core-stack-head{display:flex;align-items:center;gap:10px;padding:12px 14px 9px;color:#4a534e;font-size:12px;font-weight:900;letter-spacing:.05em;text-transform:uppercase}
.lead-core-stack-head::before{content:"";width:4px;height:18px;border-radius:999px;background:#9ca39f;flex:0 0 auto}
.lead-core-stack-head::after{content:"";height:1px;background:#aebbb3;flex:1 1 auto;min-width:24px}
.lead-core-stack>.lead-core-disclosure{border:0;border-radius:0;box-shadow:none;margin:0;background:#fff}
.lead-core-stack>.lead-core-disclosure+.lead-core-disclosure{border-top:1px solid #e0e5e2}

.lead-core-form-grid{display:grid;grid-template-columns:1fr;gap:9px}
.lead-core-field{display:block;min-width:0}
.lead-core-field>span{display:block;margin:0 0 5px;color:#66716b;font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}
.lead-core-field input,.lead-core-field select,.lead-core-field textarea{width:100%;min-width:0;min-height:44px;padding:10px 11px;border:1px solid #c7d2cc;border-radius:8px;background:#f4f7f5;color:var(--text);font-size:16px;box-shadow:none}
.lead-core-field textarea{min-height:84px;resize:vertical}
.lead-core-field input:focus,.lead-core-field select:focus,.lead-core-field textarea:focus{outline:2px solid rgba(92,101,96,.14);outline-offset:1px;border-color:#9da6a1}
.lead-core-wide{display:block;margin-top:10px}
.lead-core-inline-save{margin-top:12px;display:flex;justify-content:flex-end}
.lead-core-workflow-actions{display:grid;grid-template-columns:1fr;gap:7px;margin-top:12px}

.lead-core-notes{margin-bottom:0}
.lead-original-note{padding:9px 10px;border:1px solid #dbe1de;border-radius:9px;background:#f8faf8}
.lead-original-note span{display:block;color:#6b7280;font-size:9.5px;line-height:1.05;font-weight:900;letter-spacing:.045em;text-transform:uppercase}
.lead-original-note p{margin:5px 0 0;color:#35433c;font-size:12px;line-height:1.4;white-space:pre-wrap}
.lead-note-history{display:grid;gap:7px;margin-top:8px}
.lead-note-item{border:1px solid #e0e5e2;border-radius:9px;padding:9px 10px;background:#fff}
.lead-note-meta{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.lead-note-meta strong{color:#3f4d46;font-size:11px;font-weight:900}
.lead-note-meta span{color:#7a857f;font-size:10px;font-weight:700}
.lead-note-text{margin-top:5px;color:#35433c;font-size:12px;line-height:1.38;white-space:pre-wrap;overflow-wrap:anywhere}
.lead-note-entry{margin-top:10px}
.lead-note-save{margin-top:8px}
.lead-detail-empty{color:#8a9690;font-size:11px;line-height:1.35}

@media(max-width:390px){
  .lead-detail-contact-actions{gap:5px}
  .lead-core-op-item{padding-left:8px;padding-right:8px}
}

@media(min-width:520px){
  .lead-core-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lead-core-wide{grid-column:1/-1}
}

@media(min-width:701px){
  .lead-core-screen{gap:11px}
  .lead-detail-mobile-contact{display:none}
  .lead-core-op-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .lead-core-op-item{border-bottom:0;border-right:1px solid #e1e6e3}
  .lead-core-op-item:last-child{border-right:0}
  .lead-core-actions-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .lead-core-workflow-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Notes parity — V1 structured note history / edit / soft-delete controls. */
.lead-note-row{display:flex;gap:8px;justify-content:space-between;align-items:flex-start}
.lead-note-main{min-width:0;flex:1}
.lead-note-meta{display:block;color:#6f7b75;font-size:10px;line-height:1.35}
.lead-note-meta strong{color:#3f4d46;font-size:11px;font-weight:900}
.lead-note-edited{color:#7a857f;font-size:10px;font-weight:700}
.lead-note-update{flex:0 0 auto;min-height:32px;padding:6px 9px;width:auto;font-size:11px}
.lead-note-update-menu{display:flex;gap:7px;margin-top:7px;flex-wrap:wrap}
.lead-note-update-menu[hidden]{display:none}
.lead-note-update-menu button{min-height:34px;padding:6px 10px;border:1px solid #c7d2cc;border-radius:8px;background:#f5f6f5;color:#4b5550;font-size:11px;font-weight:850}
.lead-note-edit-textarea{width:100%;min-height:88px;margin-top:7px;padding:9px 10px;border:1px solid #c7d2cc;border-radius:8px;background:#f4f7f5;color:var(--text);font-size:16px;resize:vertical}
.lead-note-item.deleted{background:#f7f7f7;border-color:#e5e7e6}
.lead-note-deleted{color:#68736e;font-size:11px;line-height:1.35}
.lead-note-deleted strong{color:#4d5953;font-weight:900}
.lead-notes-team-label{margin-top:10px;color:#66716b;font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}
.lead-original-note p{margin:0;color:#35433c;font-size:12px;line-height:1.4;white-space:pre-wrap}

/* Buyer Cart Picker parity - Lead-attached Inventory interest, blue workflow. */
.buyer-action,.buyer-details-button{background:#eaf3ff;border-color:#7fa8d8;color:#174f86}
.lead-core-buyer>.lead-core-disclosure-toggle{border-left:4px solid #2f78bd}
.buyer-inline-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}.buyer-inline-summary div{padding:9px;border:1px solid #d9e6f3;border-radius:8px;background:#f6faff}.buyer-inline-summary .wide{grid-column:1/-1}.buyer-inline-summary span{display:block;font-size:9px;font-weight:900;text-transform:uppercase;color:#66809b}.buyer-inline-summary strong{font-size:12px;color:#174f86}
.buyer-picker-overlay{position:fixed;inset:0;z-index:1000;background:rgba(16,28,22,.58);display:flex;align-items:flex-end;justify-content:center;padding:0}.buyer-picker-modal{width:100%;max-width:680px;max-height:92vh;overflow:auto;background:#fff;border-radius:16px 16px 0 0;padding:14px;box-shadow:0 -8px 30px rgba(0,0,0,.18)}.buyer-picker-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:10px}.buyer-picker-head strong{font-size:18px;color:#174f86}.buyer-picker-head strong span{font-size:10px;background:#eaf3ff;border:1px solid #a9c7e6;border-radius:999px;padding:3px 7px;vertical-align:middle}.buyer-picker-head small{color:#6c7771;text-align:right}.buyer-mode-row{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:10px}.buyer-mode-btn{min-height:42px;border:1px solid #b9c8d7;border-radius:8px;background:#fff;color:#174f86;font-weight:900}.buyer-mode-btn.active{background:#174f86;color:#fff;border-color:#174f86}.buyer-cart-grid{display:grid;gap:8px;margin-bottom:12px}.buyer-cart-grid.hidden{display:none}.buyer-cart-card{position:relative;width:100%;display:grid;grid-template-columns:86px 1fr;gap:10px;text-align:left;border:1px solid #d4dde5;border-radius:10px;background:#fff;padding:8px;color:#27352e}.buyer-cart-card.selected{border:2px solid #2f78bd;background:#f3f8ff}.buyer-cart-check{display:none;position:absolute;right:8px;top:7px;width:22px;height:22px;border-radius:50%;background:#2f78bd;color:#fff;text-align:center;line-height:22px;font-weight:900}.buyer-cart-card.selected .buyer-cart-check{display:block}.buyer-cart-photo{height:72px;border-radius:7px;background:#eef2f0;display:flex;align-items:center;justify-content:center;overflow:hidden;font-size:10px;color:#7b8781}.buyer-cart-photo img{width:100%;height:100%;object-fit:cover}.buyer-cart-copy{display:flex;flex-direction:column;justify-content:center;min-width:0}.buyer-cart-copy strong{font-size:13px}.buyer-cart-copy small{font-size:10px;color:#63726a;margin:2px 0}.buyer-cart-copy span{font-size:12px;font-weight:900;color:#174f86}.buyer-cart-empty{padding:16px;text-align:center;color:#74817a;border:1px dashed #cbd5d0;border-radius:9px}.buyer-profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.buyer-profile-grid label{min-width:0}.buyer-profile-grid label>span{display:block;margin-bottom:4px;font-size:9px;font-weight:900;text-transform:uppercase;color:#66716b}.buyer-profile-grid input,.buyer-profile-grid select,.buyer-profile-grid textarea{width:100%;min-height:42px;padding:9px;border:1px solid #c7d2cc;border-radius:8px;background:#f4f7f5;font-size:16px}.buyer-profile-grid textarea{min-height:72px}.buyer-profile-grid .wide{grid-column:1/-1}.buyer-picker-foot{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:sticky;bottom:-14px;background:#fff;padding:12px 0 14px;margin-top:8px}.buyer-picker-foot button{min-height:44px;border-radius:8px;border:1px solid #b8c5be;font-weight:900}
@media(min-width:701px){.buyer-picker-overlay{align-items:center;padding:24px}.buyer-picker-modal{border-radius:16px}.buyer-cart-grid{grid-template-columns:1fr 1fr}}

/* Buyer detail parity with Repair/Lithium card language */
.buyer-picker-modal{background:#f8faf9}
.buyer-picker-head{padding:0 0 10px;border-bottom:1px solid #dbe2de}
.buyer-picker-head>div{display:flex;align-items:baseline;gap:8px;min-width:0}
.buyer-picker-head strong{color:#285f8d;font-size:18px;font-weight:900}
.buyer-picker-head .buyer-picker-id{color:#68746e;font-size:11px;font-weight:850}
.buyer-type-select{display:block;margin:10px 0}
.buyer-type-select>span{display:block;margin-bottom:4px;color:#6b7280;font-size:9px;font-weight:900;letter-spacing:.035em;text-transform:uppercase}
.buyer-type-select select{width:100%;min-height:42px;padding:9px 11px;border:1px solid #b9cad8;border-top:3px solid #4d86b8;border-radius:9px;background:#fff;color:#285f8d;font-size:16px;font-weight:850}
.buyer-cart-grid{margin-top:8px}
.buyer-cart-card{border-color:#cfd9d4;background:#fff}
.buyer-cart-card.selected{border:2px solid #4d86b8;background:#f3f8fd;box-shadow:inset 0 0 0 1px rgba(77,134,184,.08)}
.buyer-cart-copy em{display:inline-block;align-self:flex-start;margin-top:5px;padding:2px 6px;border-radius:999px;background:#e9f3fc;color:#285f8d;font-size:9px;font-style:normal;font-weight:900;text-transform:uppercase;letter-spacing:.03em}
.buyer-cart-copy em.hidden{display:none}
.buyer-profile-grid{margin-top:10px;padding-top:10px;border-top:1px solid #dbe2de}
.buyer-team-note-panel{margin-top:10px;padding:10px;border-top:1px solid #dbe2de;background:#fff;border-radius:9px}
.buyer-team-note-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.buyer-team-note-head>span{color:#6b7280;font-size:9px;font-weight:900;letter-spacing:.035em;text-transform:uppercase}
.buyer-team-note-head button{min-height:34px;padding:6px 10px;border:1px solid #b9cad8;border-radius:8px;background:#fff;color:#285f8d;font-size:11px;font-weight:900}
.buyer-team-note-copy{display:grid;gap:3px;margin-top:7px}
.buyer-team-note-copy strong{color:#374151;font-size:12.5px;font-weight:800;line-height:1.35}
.buyer-team-note-copy small{color:#7a8580;font-size:10px;font-weight:700}
.buyer-detail-note-form{margin-top:8px}
.buyer-detail-note-form.hidden{display:none}
.buyer-detail-note-form textarea{width:100%;min-height:72px;box-sizing:border-box;padding:9px 10px;border:1px solid #c7d2cc;border-radius:8px;background:#fff;font-size:16px;resize:vertical}
.buyer-detail-note-form>div{display:flex;justify-content:flex-end;gap:7px;margin-top:7px}
.buyer-detail-note-form button{min-height:38px;padding:7px 11px;border:1px solid #c7d2cc;border-radius:8px;background:#fff;color:#285f8d;font-weight:850}

.lead-detail-toolbar{margin-bottom:10px}
.lead-core-screen>.lead-core-actions{margin-top:0}

/* Phase 2: secondary record layer — history first, utilities consolidated. */
.lead-core-notes{margin-top:10px}
.lead-more-stack{display:grid;gap:10px}
.lead-more-group{
  padding:11px;
  border:1px solid #dbe2de;
  border-radius:10px;
  background:#fff;
}
.lead-more-heading{
  margin-bottom:9px;
  color:#174f36;
  font-size:11px;
  font-weight:950;
  letter-spacing:.035em;
  text-transform:uppercase;
}
.lead-core-more .lead-core-disclosure-body{background:#f8faf9}

/* Nested Buyer controls are secondary detail, not a competing visual system. */
.lead-core-more .buyer-action,
.lead-core-more .buyer-details-button{
  background:#f4f7f5;
  border-color:#c8d2cd;
  color:var(--green);
}
.lead-core-more .buyer-inline-summary div{
  background:#f8faf9;
  border-color:#d7dfdb;
}
.lead-core-more .buyer-inline-summary span{color:#68756e}
.lead-core-more .buyer-inline-summary strong{color:#25352d}

/* Nested detail/editor consistency: common green/neutral language. */
.lead-core-more .buyer-action,
.lead-core-more .buyer-details-button{
  background:#eef5f0;border-color:#9fb5a9;color:#174f36
}
.buyer-picker-modal .buyer-picker-head strong,
.buyer-picker-modal .buyer-type-select select,
.buyer-picker-modal .buyer-cart-copy span,
.buyer-picker-modal .buyer-team-note-head button,
.buyer-picker-modal .buyer-detail-note-form button{
  color:#174f36
}
.buyer-picker-modal .buyer-type-select select{
  border-color:#c7d2cc;border-top-color:#c9a63d
}
.buyer-picker-modal .buyer-mode-btn{
  color:#174f36;border-color:#c7d2cc
}
.buyer-picker-modal .buyer-mode-btn.active{
  background:#eef5f0;border-color:#9fb5a9;color:#174f36
}
.buyer-picker-modal .buyer-cart-card.selected{
  border-color:#174f36;background:#f4f8f6;
  box-shadow:inset 0 0 0 1px rgba(23,79,54,.08)
}
.buyer-picker-modal .buyer-cart-check{background:#174f36}
.buyer-picker-modal .buyer-cart-copy em{background:#edf4f0;color:#174f36}
.buyer-picker-modal .buyer-team-note-head button{border-color:#c7d2cc}
.buyer-inline-summary div{background:#f8faf9;border-color:#d7dfdb}
.buyer-inline-summary span{color:#68756e}
.buyer-inline-summary strong{color:#25352d}

/* Lead Detail cleanup: More Details is now reference-only. */
.lead-more-stack-clean{
  gap:12px;
}
.lead-more-stack-clean .lead-more-group{
  margin:0;
}
.lead-more-admin-maintenance{
  margin-top:4px;
  border-style:dashed;
}

/* Buyer detail/editor controls are neutral/green.
   Dedicated Buyer cards may still use blue as their workflow identity. */
#app .buyer-picker-modal .buyer-picker-head strong,
#app .buyer-picker-modal .buyer-cart-copy span,
#app .buyer-picker-modal .buyer-team-note-head button,
#app .buyer-picker-modal .buyer-detail-note-form button{
  color:var(--green);
}
#app .buyer-picker-modal .buyer-picker-head strong span,
#app .buyer-picker-modal .buyer-cart-copy em{
  background:#edf4f0;
  border-color:#c7d2cc;
  color:var(--green);
}
#app .buyer-picker-modal .buyer-mode-btn{
  border-color:#c7d2cc;
  background:#fff;
  color:var(--green);
}
#app .buyer-picker-modal .buyer-mode-btn.active{
  border-color:#9fb5a9;
  background:#eef5f0;
  color:var(--green);
}
#app .buyer-picker-modal .buyer-type-select select{
  border-color:#c7d2cc;
  border-top-color:var(--gold);
  color:var(--green);
}
#app .buyer-picker-modal .buyer-cart-card.selected{
  border-color:var(--green);
  background:#f4f8f6;
  box-shadow:inset 0 0 0 1px rgba(23,79,54,.08);
}
#app .buyer-picker-modal .buyer-cart-check{
  background:var(--green);
}

.buyer-picker-modal {
  width:100%;
  max-width:680px;
  max-height:min(92dvh,760px);
  overflow-y:auto;
  overscroll-behavior:contain;
}

.buyer-picker-foot button {
  border-radius:9px;
}

/* 2026-10-02 — Lead Detail mobile hierarchy/theme parity */
@media (max-width:700px){
  .lead-core-screen{gap:11px}
  .lead-detail-toolbar{min-height:44px;gap:10px;margin-bottom:10px;padding:0 2px}
  .lead-detail-toolbar strong{font-size:18px;letter-spacing:-.01em}
  .lead-detail-contact-actions{gap:7px}
  .lead-detail-contact-actions a,.lead-detail-contact-actions button{min-height:46px;border-radius:9px;font-size:14px;font-weight:850}
  .lead-core-identity,.lead-core-ops,.lead-core-stack,.lead-core-disclosure{border-radius:14px;box-shadow:0 1px 0 rgba(17,78,54,.03)}
  .lead-core-stack-head{padding:13px 14px 10px;font-size:14px;letter-spacing:.035em}
  .lead-core-disclosure-toggle{min-height:56px;padding:14px}
  .lead-core-disclosure-title{font-size:14px;letter-spacing:.035em}
  .lead-core-disclosure-status{font-size:12px;max-width:180px}
  .lead-core-disclosure-chevron{font-size:19px}
  .lead-core-field>span{margin-bottom:6px;font-size:11px;letter-spacing:.035em}
  .lead-core-field input,.lead-core-field select,.lead-core-field textarea{min-height:46px;padding:11px 12px;border-radius:9px;font-size:16px}
  .lead-core-field textarea{min-height:96px}
  .lead-core-actions-grid button,.lead-core-inline-save button,.lead-core-workflow-actions button,.lead-note-save{min-height:46px;font-size:14px}
}


/* 2026-10-02 — Buyer Details: dedicated Buyer blue theme, matching softened workflow system */
#app .buyer-picker-overlay{background:rgba(16,28,22,.42)}
#app .buyer-picker-modal{
  background:#f7fbff;
  border:1px solid #cbddeb;
  box-shadow:0 -8px 28px rgba(0,0,0,.14);
}
#app .buyer-picker-head{padding:2px 0 12px;border-bottom:1px solid #d5e2ec;margin-bottom:12px}
#app .buyer-picker-head>div{width:100%}
#app .buyer-picker-head strong{font-size:18px;color:#285f8d;font-weight:900}
#app .buyer-type-select>span{font-size:11px;color:#66737f}
#app .buyer-type-select select{
  min-height:48px;
  border:1px solid #b8cfe2;
  border-top:3px solid #4d86b8;
  border-radius:11px;
  background:#fff;
  color:#285f8d;
  font-size:16px;
}
#app .buyer-cart-grid{gap:10px}
#app .buyer-cart-card{
  min-height:104px;
  border:1px solid #cbddeb;
  border-radius:12px;
  background:#fff;
}
#app .buyer-cart-card.selected{
  border:2px solid #4d86b8;
  background:#eef6fd;
  box-shadow:inset 0 0 0 1px rgba(77,134,184,.08);
}
#app .buyer-cart-check{background:#4d86b8}
#app .buyer-cart-copy span{color:#285f8d}
#app .buyer-cart-copy em{background:#e9f3fc;border-color:#b8cfe2;color:#285f8d}
#app .buyer-profile-grid{border-top-color:#d5e2ec}
#app .buyer-profile-grid label>span{font-size:11px;color:#66737f}
#app .buyer-profile-grid input,
#app .buyer-profile-grid select,
#app .buyer-profile-grid textarea{
  min-height:48px;
  border:1px solid #c7d2cc;
  border-radius:10px;
  background:#fff;
  color:#1f2937;
  font-size:16px;
}
#app .buyer-profile-grid textarea{min-height:92px}
#app .buyer-team-note-panel{background:rgba(255,255,255,.7);border-top-color:#d5e2ec}
#app .buyer-team-note-head button,
#app .buyer-detail-note-form button{
  min-height:44px;
  background:#fff;
  border-color:#b8cfe2;
  color:#285f8d;
}
#app .buyer-detail-note-form button.primary{background:#eef6fd;border-color:#b8cfe2;color:#285f8d}
#app .buyer-picker-foot{background:#f7fbff;grid-template-columns:1fr 1fr}
#app .buyer-picker-foot button{
  min-height:48px;
  border-radius:10px;
  background:#fff;
  border:1px solid #b8cfe2;
  color:#285f8d;
  font-size:16px;
  font-weight:900;
}
#app .buyer-picker-foot button.primary{background:#eef6fd;border-color:#8fb4d2;color:#285f8d}

/* 2026-10-02 — Buyer Details correction: preserve existing structure; theme only. */
.buyer-picker-overlay .buyer-picker-modal{
  background:#f7fbff;
  border:1px solid #cbddeb;
  box-shadow:0 -8px 28px rgba(0,0,0,.14);
}
.buyer-picker-overlay .buyer-picker-head{
  padding:2px 0 12px;
  margin-bottom:12px;
  border-bottom:1px solid #d5e2ec;
}
.buyer-picker-overlay .buyer-picker-head strong{
  color:#285f8d;
  font-size:18px;
  font-weight:900;
}
.buyer-picker-overlay .buyer-type-select>span,
.buyer-picker-overlay .buyer-profile-grid label>span{
  color:#66737f;
  font-size:11px;
  font-weight:900;
}
.buyer-picker-overlay .buyer-type-select select{
  min-height:48px;
  padding:10px 12px;
  border:1px solid #b8cfe2;
  border-top:1px solid #b8cfe2;
  border-radius:10px;
  background:#fff;
  color:#285f8d;
  font-size:16px;
  font-weight:850;
  box-shadow:none;
}
.buyer-picker-overlay .buyer-cart-grid{gap:10px}
.buyer-picker-overlay .buyer-cart-card{
  min-height:104px;
  border:1px solid #cbddeb;
  border-radius:10px;
  background:#fff;
  color:#1f2937;
  box-shadow:none;
}
.buyer-picker-overlay .buyer-cart-card.selected{
  border:1px solid #8fb4d2;
  background:#eef6fd;
  box-shadow:none;
}
.buyer-picker-overlay .buyer-cart-check{background:#4d86b8}
.buyer-picker-overlay .buyer-cart-copy span{color:#285f8d}
.buyer-picker-overlay .buyer-cart-copy em{
  background:#e9f3fc;
  color:#285f8d;
  border-color:#b8cfe2;
}
.buyer-picker-overlay .buyer-profile-grid{border-top-color:#d5e2ec}
.buyer-picker-overlay .buyer-profile-grid input,
.buyer-picker-overlay .buyer-profile-grid select,
.buyer-picker-overlay .buyer-profile-grid textarea{
  min-height:48px;
  padding:10px 12px;
  border:1px solid #b8cfe2;
  border-radius:10px;
  background:#fff;
  color:#1f2937;
  font-size:16px;
  box-shadow:none;
}
.buyer-picker-overlay .buyer-profile-grid textarea{min-height:92px}
.buyer-picker-overlay .buyer-team-note-panel{
  background:rgba(255,255,255,.76);
  border-top-color:#d5e2ec;
}
.buyer-picker-overlay .buyer-team-note-head button,
.buyer-picker-overlay .buyer-detail-note-form button,
.buyer-picker-overlay .buyer-picker-foot button{
  background:#fff;
  border:1px solid #b8cfe2;
  color:#285f8d;
  box-shadow:none;
}
.buyer-picker-overlay .buyer-detail-note-form button.primary,
.buyer-picker-overlay .buyer-picker-foot button.primary{
  background:#eef6fd;
  border-color:#8fb4d2;
  color:#285f8d;
}
.buyer-picker-overlay .buyer-picker-foot{
  background:#f7fbff;
}


/* 2026-10-02 — Lead source cleanup.
   Lead internals are neutral. Workflow identity labels may retain their workflow color. */
.lead-core-screen{
  --lead-neutral-ink:#46504b;
  --lead-neutral-text:#59625d;
  --lead-neutral-muted:#747c78;
  --lead-neutral-border:#cbd2ce;
  --lead-neutral-soft:#f4f5f4;
  --lead-neutral-soft-2:#f8f9f8;
}
.lead-core-screen .lead-detail-back,
.lead-core-screen .lead-detail-contact-actions a,
.lead-core-screen .lead-detail-contact-actions button,
.lead-core-screen .lead-core-actions-grid button,
.lead-core-screen .lead-core-inline-save button,
.lead-core-screen .lead-core-workflow-actions button,
.lead-core-screen .lead-note-save,
.lead-core-screen .lead-note-update,
.lead-core-screen .lead-note-update-menu button,
.lead-core-screen .lead-more-group button,
.lead-core-screen .lead-more-group a,
.lead-core-screen .reputation-card button,
.lead-core-screen .reputation-card a,
.lead-core-screen .attachments-panel button,
.lead-core-screen .attachments-panel a,
.lead-core-screen .buyer-action,
.lead-core-screen .buyer-details-button{
  background:var(--lead-neutral-soft);
  border-color:var(--lead-neutral-border);
  color:var(--lead-neutral-ink);
  -webkit-text-fill-color:var(--lead-neutral-ink);
  box-shadow:none;
}
.lead-core-screen .lead-core-inline-save button,
.lead-core-screen .lead-note-save,
.lead-core-screen .primary{
  background:#eceeed;
  border-color:#bdc5c1;
  color:#3e4742;
  -webkit-text-fill-color:#3e4742;
}
.lead-core-screen .lead-core-disclosure-toggle,
.lead-core-screen .lead-core-disclosure-chevron,
.lead-core-screen .lead-core-stack-head,
.lead-core-screen .lead-more-heading,
.lead-core-screen .lead-core-id,
.lead-core-screen .lead-core-op-item strong,
.lead-core-screen .reputation-title,
.lead-core-screen .attachment-card strong{
  color:var(--lead-neutral-ink);
}
.lead-core-screen .lead-core-stack-head::before{background:#9ca39f}
.lead-core-screen .lead-core-stack-head::after{background:#c7cdca}
.lead-core-screen .lead-core-disclosure-body,
.lead-core-screen .lead-more-group,
.lead-core-screen .lead-original-note,
.lead-core-screen .lead-note-item,
.lead-core-screen .buyer-inline-summary div{
  background:var(--lead-neutral-soft-2);
  border-color:#d7dcda;
}
.lead-core-screen input,
.lead-core-screen select,
.lead-core-screen textarea{
  border-color:var(--lead-neutral-border);
  box-shadow:none;
}
.lead-core-screen input:focus,
.lead-core-screen select:focus,
.lead-core-screen textarea:focus{
  outline:2px solid rgba(92,101,96,.14);
  border-color:#9da6a1;
}
.lead-core-screen .buyer-inline-summary span{color:var(--lead-neutral-muted)}
.lead-core-screen .buyer-inline-summary strong{color:var(--lead-neutral-ink)}

/* Identity exception: Buyer title/placard remains blue. */
.lead-core-screen .lead-core-buyer>.lead-core-disclosure-toggle{
  border-left:4px solid #4d86b8;
  color:#285f8d;
}
.lead-core-screen .lead-core-buyer>.lead-core-disclosure-toggle .lead-core-disclosure-title,
.lead-core-screen .lead-core-buyer>.lead-core-disclosure-toggle .lead-core-disclosure-chevron{
  color:#285f8d;
}

/* Step 28 — Lead second-layer simplification. Normal detail has three contact actions; review UI appears only when explicitly launched from a card action. */
.lead-detail-contact-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
.lead-core-focused-tool{margin-top:0}

/* Reopen closed Lead — uses the existing Lead action styling. */
.lead-reopen-actions .lead-reopen-button{grid-column:1/-1;width:100%}

/* 2026-10-08 — compact lifecycle Dates row + 2x2 date editor. */
#app .lead-dates-toggle{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) 22px;
  gap:10px;
  align-items:center;
  text-align:left;
}
#app .lead-dates-toggle-left,
#app .lead-dates-toggle-right{display:grid;gap:3px;min-width:0}
#app .lead-dates-toggle-right{text-align:right}
#app .lead-dates-toggle small{
  color:#4f5a54;
  font-size:14px;
  line-height:1.1;
  font-weight:900;
  letter-spacing:.035em;
  text-transform:uppercase;
}
#app .lead-dates-toggle strong{
  color:#68736e;
  font-size:12px;
  line-height:1.2;
  font-weight:900;
  text-transform:uppercase;
  white-space:nowrap;
}
#app .lead-dates-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
#app .lead-dates-grid .lead-core-field input[type="date"]{
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  height:48px;
  min-height:48px;
  max-height:48px;
  box-sizing:border-box;
  padding:8px 7px;
  text-align:center;
  -webkit-appearance:none;
  appearance:none;
  font-size:15px;
}
#app .lead-dates-grid .lead-core-field input[type="date"]::-webkit-date-and-time-value{
  width:100%;
  margin:0;
  text-align:center;
}
@media(max-width:390px){
  #app .lead-dates-toggle{gap:7px;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 20px}
  #app .lead-dates-toggle small{font-size:13px}
  #app .lead-dates-toggle strong{font-size:11px}
  #app .lead-dates-grid{gap:8px}
  #app .lead-dates-grid .lead-core-field input[type="date"]{font-size:14px;padding:7px 5px}
}

/* 2026-10-08 Buyer cleanup: operational notes stay on the Buyer card; original intake is secondary. */
#app .buyer-intake-details{margin-top:2px;border:1px solid #d5e2ec;border-radius:10px;background:rgba(255,255,255,.68);overflow:hidden}
#app .buyer-intake-details>summary{display:flex;align-items:center;justify-content:space-between;min-height:46px;padding:10px 12px;cursor:pointer;list-style:none;color:#285f8d;font-size:12px;font-weight:900;text-transform:none}
#app .buyer-intake-details>summary::-webkit-details-marker{display:none}
#app .buyer-intake-details>summary::after{content:'⌄';font-size:16px;line-height:1}
#app .buyer-intake-details[open]>summary::after{content:'⌃'}
#app .buyer-intake-details .buyer-notes-field{display:grid;padding:0 12px 12px;border-top:1px solid #d5e2ec}
#app .buyer-intake-details .buyer-notes-field>span{padding-top:10px}

/* 2026-10-08 — Buyer Details is now a normal in-app detail screen, not a body overlay. */
.buyer-detail-screen{width:100%;max-width:760px;margin:0 auto;padding:0 0 18px;box-sizing:border-box}
.buyer-detail-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.buyer-detail-toolbar strong{min-width:0;color:#285f8d;font-size:18px;font-weight:900}
.buyer-detail-back{min-height:38px;padding:7px 10px;border:1px solid #c7d2cc;border-radius:8px;background:#fff;color:#4b5550;font-size:12px;font-weight:900}
#app .buyer-detail-screen .buyer-picker-modal{width:100%;max-width:none;max-height:none;overflow:visible;padding:14px;box-sizing:border-box;border-radius:12px;background:#f7fbff;border:1px solid #cbddeb;box-shadow:none}
#app .buyer-detail-screen .buyer-type-select>span,
#app .buyer-detail-screen .buyer-profile-grid label>span{color:#66737f;font-size:11px;font-weight:900}
#app .buyer-detail-screen .buyer-type-select select,
#app .buyer-detail-screen .buyer-profile-grid input,
#app .buyer-detail-screen .buyer-profile-grid select,
#app .buyer-detail-screen .buyer-profile-grid textarea{min-height:48px;padding:10px 12px;border:1px solid #b8cfe2;border-radius:10px;background:#fff;color:#1f2937;font-size:16px;box-shadow:none}
#app .buyer-detail-screen .buyer-profile-grid textarea{min-height:92px}
#app .buyer-detail-screen .buyer-cart-grid{gap:10px}
#app .buyer-detail-screen .buyer-cart-card{min-height:104px;border:1px solid #cbddeb;border-radius:10px;background:#fff;color:#1f2937;box-shadow:none}
#app .buyer-detail-screen .buyer-cart-card.selected{border:1px solid #8fb4d2;background:#eef6fd;box-shadow:none}
#app .buyer-detail-screen .buyer-cart-check{background:#4d86b8}
#app .buyer-detail-screen .buyer-cart-copy span{color:#285f8d}
#app .buyer-detail-screen .buyer-cart-copy em{background:#e9f3fc;color:#285f8d;border-color:#b8cfe2}
#app .buyer-detail-screen .buyer-profile-grid{border-top-color:#d5e2ec}
#app .buyer-detail-screen .buyer-picker-foot{position:static;bottom:auto;background:transparent;padding:12px 0 0;margin-top:8px;grid-template-columns:1fr 1fr}
#app .buyer-detail-screen .buyer-picker-foot button{min-height:48px;border-radius:10px;background:#fff;border:1px solid #b8cfe2;color:#285f8d;font-size:16px;font-weight:900;box-shadow:none}
#app .buyer-detail-screen .buyer-picker-foot button.primary{background:#eef6fd;border-color:#8fb4d2;color:#285f8d}
@media(min-width:701px){.buyer-detail-screen .buyer-cart-grid{grid-template-columns:1fr 1fr}}
