/* TeamAct CRM — Member Lead Drawer V13.4.6
   STRICT SCOPE: Basic Information + Custom Fields only. Header/Action/Activity styling is intentionally untouched.

   Based on V13.4.5
   Scope: compact Basic Information + Custom Fields, inline Custom Field editing.
   Neutral structural surfaces only; no blue/teal cards. */

/* ---- Basic Information: adaptive two-column grid ---- */
#mlv2DrawerLayer #mlv6BasicInfo .mlv5-info-list{padding:7px 14px 10px!important}
#mlv2DrawerLayer .mlv7-section-tools{display:flex;justify-content:flex-end;align-items:center;min-height:22px;margin:0 0 3px}
#mlv2DrawerLayer .mlv7-empty-toggle{display:inline-flex;align-items:center;min-height:22px;padding:0 2px;color:#64748b;font-size:10px;font-weight:600;cursor:pointer;user-select:none;text-decoration:none}
#mlv2DrawerLayer .mlv7-empty-toggle:hover{color:#4338ca;text-decoration:underline}
#mlv2DrawerLayer .mlv7-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px;background:#fff}
#mlv2DrawerLayer .mlv7-info-item{display:grid!important;grid-template-columns:104px minmax(0,1fr)!important;column-gap:9px!important;align-items:center!important;min-height:30px!important;padding:5px 0!important;border-bottom:1px solid #f0f3f6!important;background:#fff!important}
#mlv2DrawerLayer .mlv7-info-item.is-full{grid-column:1 / -1;grid-template-columns:104px minmax(0,1fr)!important}
#mlv2DrawerLayer .mlv7-info-item.is-empty{display:none!important}
#mlv2DrawerLayer #mlv6BasicInfo.mlv7-show-empty .mlv7-info-item.is-empty{display:grid!important}
#mlv2DrawerLayer .mlv7-info-item .mlv5-info-label{font-size:10.5px!important;line-height:1.35!important;color:#64748b!important}
#mlv2DrawerLayer .mlv7-info-item .mlv5-info-value{font-size:12px!important;line-height:1.35!important;color:#111827!important}
#mlv2DrawerLayer .mlv7-info-item .mlv5-inline-input{min-height:24px!important;padding:2px 4px!important}
#mlv2DrawerLayer .mlv7-info-item .mlv5-inline-input:focus{padding:3px 6px!important;border-color:#b8b6c9!important;box-shadow:0 0 0 2px rgba(79,70,229,.08)!important}

/* ---- Custom Fields: same compact rhythm, no per-field Edit buttons ---- */
#mlv2DrawerLayer .mlv6-custom-body{padding-bottom:6px!important}
#mlv2DrawerLayer .mlv6-custom-note{padding-bottom:2px!important}
#mlv2DrawerLayer .mlv4-cf-group{padding:0 14px 8px!important}
#mlv2DrawerLayer .mlv4-cf-group h4{margin:7px 0 3px!important;font-size:10px!important}
#mlv2DrawerLayer .mlv7-cf-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:0 20px!important}
#mlv2DrawerLayer .mlv7-cf-item{display:grid!important;grid-template-columns:104px minmax(0,1fr)!important;gap:9px!important;align-items:center!important;min-height:32px!important;padding:5px 0!important;border-bottom:1px solid #eef2f6!important;background:#fff!important}
#mlv2DrawerLayer .mlv7-cf-item.is-full{grid-column:1 / -1!important}
#mlv2DrawerLayer .mlv7-cf-item.is-empty{display:none!important}
#mlv2DrawerLayer #mlv6CustomFields.mlv7-show-empty .mlv7-cf-item.is-empty{display:grid!important}
#mlv2DrawerLayer .mlv7-cf-label{font-size:10.5px!important;line-height:1.35!important;color:#64748b!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
#mlv2DrawerLayer .mlv7-cf-value{min-width:0;position:relative}
#mlv2DrawerLayer .mlv7-cf-display{min-height:20px;display:flex;align-items:center;font-size:12px;line-height:1.35;font-weight:600;color:#111827;overflow-wrap:anywhere}
#mlv2DrawerLayer .mlv7-cf-item.is-editable{cursor:text}
#mlv2DrawerLayer .mlv7-cf-item.is-editable:hover .mlv7-cf-display{background:#f8fafc;border-radius:5px;box-shadow:inset 0 0 0 1px #e5e7eb;padding:2px 5px;margin:-2px -5px}
#mlv2DrawerLayer .mlv7-cf-editor{display:flex;align-items:center;gap:6px;min-width:0}
#mlv2DrawerLayer .mlv7-cf-editor[hidden]{display:none!important}
#mlv2DrawerLayer .mlv7-cf-input{width:100%!important;min-width:0!important;min-height:27px!important;margin:0!important;padding:4px 7px!important;border:1px solid #cbd5e1!important;border-radius:6px!important;background:#fff!important;color:#111827!important;box-shadow:none!important;font:inherit!important;font-size:12px!important;line-height:1.35!important}
#mlv2DrawerLayer .mlv7-cf-input:focus{outline:none!important;border-color:#a7a3bd!important;box-shadow:0 0 0 2px rgba(79,70,229,.08)!important}
#mlv2DrawerLayer textarea.mlv7-cf-input{resize:vertical;min-height:48px!important}
#mlv2DrawerLayer .mlv7-cf-save-state{flex:0 0 auto;font-size:9px;color:#94a3b8;white-space:nowrap}
#mlv2DrawerLayer .mlv7-cf-save-state.saving{color:#64748b}
#mlv2DrawerLayer .mlv7-cf-save-state.saved{color:#15803d}
#mlv2DrawerLayer .mlv7-cf-save-state.error{color:#b91c1c}

/* Hide obsolete V13.4 per-field buttons if stale markup ever remains cached. */
#mlv2DrawerLayer .mlv4-cf-edit{display:none!important}

/* Keep structural surfaces neutral. */
#mlv2DrawerLayer .mlv7-info-grid,
#mlv2DrawerLayer .mlv7-info-item,
#mlv2DrawerLayer .mlv7-cf-grid,
#mlv2DrawerLayer .mlv7-cf-item,
#mlv2DrawerLayer .mlv7-cf-value,
#mlv2DrawerLayer .mlv7-cf-editor{background:#fff!important}

@media(max-width:1050px){
  #mlv2DrawerLayer .mlv7-info-grid,#mlv2DrawerLayer .mlv7-cf-grid{gap:0 14px!important}
  #mlv2DrawerLayer .mlv7-info-item,#mlv2DrawerLayer .mlv7-cf-item{grid-template-columns:92px minmax(0,1fr)!important}
  #mlv2DrawerLayer .mlv7-info-item.is-full{grid-template-columns:92px minmax(0,1fr)!important}
}
@media(max-width:760px){
  #mlv2DrawerLayer .mlv7-info-grid,#mlv2DrawerLayer .mlv7-cf-grid{grid-template-columns:1fr!important}
  #mlv2DrawerLayer .mlv7-info-item.is-full,#mlv2DrawerLayer .mlv7-cf-item.is-full{grid-column:auto!important}
}
