/* Scoped additions; ARIX supplies colors, typography, forms, badges, stats and dialogs. */
body.crm-visible #arix-main > :not(.arix-topbar):not(header):not(#crm-workspace):not(#shared-sync){display:none!important}
body.crm-visible #parc-navigation,body.crm-visible #task-sidebar{display:none!important}
#crm-workspace{min-width:0}#crm-workspace .stats{margin:24px 0}.crm-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0}.crm-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px;align-items:end;margin:20px 0}.crm-grid label,#crm-dialog label{display:flex;flex-direction:column;gap:7px}.crm-grid input,.crm-grid select,#crm-dialog input,#crm-dialog select,#crm-dialog textarea{width:100%;min-width:0}#crm-dialog .check{flex-direction:row;align-items:center}#crm-dialog .check input{width:auto}#crm-dialog{width:min(850px,94vw);max-height:90dvh;overflow:auto}#crm-dialog .dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.crm-table{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--ari-panel)}.crm-table table{border-collapse:collapse;width:100%;min-width:800px}.crm-table th,.crm-table td{text-align:left;padding:14px;border-bottom:1px solid var(--line);font-size:14px}.crm-table th{color:var(--muted);font-weight:600}.crm-event{border-bottom:1px solid var(--line);padding:12px 0}.crm-pre,#crm-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere}#crm-dialog pre{font-size:12px}#crm-message,#crm-form-error{color:var(--arix-gold-ink);overflow-wrap:anywhere}#crm-workspace details{margin:20px 0}#crm-dialog button{max-width:100%}@media(max-width:600px){.crm-grid{grid-template-columns:1fr}#crm-dialog{padding:16px}.crm-actions{align-items:stretch}.crm-actions button{flex:1}}
.crm-followup{margin:14px 0;padding:16px;border:1px solid var(--line);border-left:4px solid var(--arix-gold-ink);border-radius:10px;background:var(--ari-panel)}.crm-followup-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px;margin:16px 0 0;padding:14px;border:1px solid var(--line);border-radius:8px}.crm-followup-fields legend{padding:0 6px;font-weight:600}.crm-followup-fields [data-followup-error]{grid-column:1/-1;color:var(--arix-gold-ink)}.crm-followup-fields button{align-self:end}
.arix-app #module-crm{--arix-nav-icon: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.6'%3E%3Ccircle cx='9' cy='7' r='3'/%3E%3Cpath d='M3 21v-3a6 6 0 0 1 12 0v3M16 4a3 3 0 0 1 0 6M18 13a5 5 0 0 1 3 5v3'/%3E%3C/svg%3E")}

.vehicle .crm-seller-link{border:0;background:transparent;color:inherit;font:inherit;padding:4px 0;text-align:left;text-decoration:underline;text-underline-offset:3px;cursor:pointer;max-width:100%;overflow-wrap:anywhere}.vehicle .crm-seller-link:hover{color:#8a641a}.vehicle .crm-seller-link:focus-visible{outline:2px solid #b18b45;outline-offset:3px}.vehicle .crm-seller-link:disabled{opacity:.6;cursor:wait}

/* Readable CRM surfaces, independently of the compact application theme. */
#crm-workspace, #crm-dialog {
  --muted: #505963;
  --line: #d6dbe0;
  color: #242a30;
  font-size: 16px;
  line-height: 1.55;
}
#crm-dialog { background: #fff; padding: 28px; }
#crm-dialog p { color: #424b55; font-size: 16px; line-height: 1.6; margin: 12px 0; }
#crm-dialog small, #crm-workspace small { color: #505963; font-size: 14px; line-height: 1.5; }
#crm-dialog h2 { font-size: 24px; line-height: 1.25; overflow-wrap: anywhere; }
#crm-dialog h3 { font-size: 18px; margin: 24px 0 12px; color: #242a30; }
#crm-dialog .dialog-heading { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
#crm-dialog .dialog-heading button { flex-shrink: 0; min-width: 44px; }
#crm-dialog .crm-contact-details {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0; margin: 24px 0; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; background: #f6f8fa;
}
#crm-dialog .crm-detail-field { min-width: 0; padding: 14px 18px; border-bottom: 1px solid var(--line); }
#crm-dialog .crm-detail-field dt { color: #505963; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
#crm-dialog .crm-detail-field dd { color: #242a30; font-size: 16px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
#crm-dialog .crm-contact-notes { padding: 0 18px; border-left: 3px solid #947335; }
#crm-dialog .crm-actions { padding: 8px 0 20px; border-bottom: 1px solid var(--line); }
#crm-dialog .crm-event { padding: 18px 0; }
#crm-dialog label, #crm-workspace label { font-size: 15px; font-weight: 600; color: #424b55; }
#crm-dialog input, #crm-dialog select, #crm-dialog textarea,
#crm-workspace input, #crm-workspace select { font-size: 16px; line-height: 1.5; min-height: 44px; }
#crm-dialog input::placeholder, #crm-dialog textarea::placeholder,
#crm-workspace input::placeholder { color: #606973; opacity: 1; }
#crm-dialog button, #crm-workspace button { font-size: 15px; min-height: 44px; }
#crm-workspace .crm-table th { color: #424b55; background: #f1f4f6; font-weight: 600; }
#crm-workspace .crm-table td { font-size: 15px; line-height: 1.5; }
#crm-workspace .crm-table tbody tr:hover { background: #f6f8fa; }
#crm-workspace #crm-filters { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
#crm-dialog summary { cursor: pointer; padding: 10px 0; font-size: 15px; }
#crm-dialog #crm-form-error, #crm-workspace #crm-message { color: #826326; }
@media (max-width: 600px) {
  #crm-dialog { padding: 18px; }
  #crm-dialog .crm-contact-details { grid-template-columns: 1fr; }
  #crm-dialog .crm-detail-field { padding: 12px 14px; }
  #crm-dialog .crm-actions button { flex: 1 1 180px; }
}

#crm-workspace .crm-list-nav { display:flex; flex-wrap:wrap; gap:10px; margin:24px 0 12px; }
#crm-workspace .crm-list-nav button { padding:12px 20px; border:1px solid #cbd2d9; font-weight:600; }
#crm-workspace .crm-list-nav button[aria-pressed="true"] { color:#fff; background:#242a30; border-color:#242a30; box-shadow:inset 0 -3px #c8a961; }
@media(max-width:600px) { #crm-workspace .crm-list-nav button { flex:1 1 140px; } }
