#crm-view{--crm-accent:#9468d9;--crm-line:rgba(155,164,187,.23)}
#crm-view .section-head{align-items:flex-start}#crm-view h2{margin-bottom:6px}
.crm-actions,.crm-toolbar,.crm-filters,#crm-tabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.crm-toolbar{justify-content:space-between;margin:20px 0 12px}.crm-actions label{margin:0}.crm-actions select{min-width:170px}
.crm-actions button,#crm-tabs button,#crm-audit{border:1px solid rgba(155,164,187,.3);border-radius:7px;background:#182130;color:var(--ink,#f6fbff);padding:9px 12px;line-height:1.3;min-height:38px}.crm-actions button:hover,#crm-tabs button:hover,#crm-audit:hover{background:#28334a;border-color:#a186d0}.crm-actions button.primary{background:#9973db;color:#100c19;border-color:#bfa1ee;font-weight:650}.crm-actions button:disabled{opacity:.5;cursor:not-allowed}#crm-view button:focus-visible,#crm-dialog button:focus-visible{outline:2px solid #cdb3f5;outline-offset:3px}
#crm-tabs{gap:4px}#crm-tabs button[aria-current=page]{background:#7554ae;color:#fff;border-color:#a186d0}
.crm-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}.crm-metric{border:1px solid var(--crm-line);border-radius:12px;padding:16px;background:rgba(131,104,185,.06)}.crm-metric strong{display:block;font-size:28px}.crm-metric span{font-size:13px;opacity:.8}
.crm-filters{padding:12px 0 18px;align-items:flex-end}.crm-filters label:first-child{flex:1;min-width:220px}.crm-filters label:last-child{display:flex;gap:8px;align-items:center;padding:10px}.crm-filters input[type=checkbox]{width:auto}
.crm-layout{display:grid;grid-template-columns:minmax(270px, .85fr) minmax(0,1.5fr);gap:18px;align-items:start}.crm-layout>article{border:1px solid var(--crm-line);border-radius:12px;padding:22px;min-height:260px;overflow-wrap:anywhere}
.crm-row{display:block;width:100%;text-align:left;margin-bottom:8px;padding:14px;border:1px solid var(--crm-line);border-radius:10px;background:rgba(127,137,160,.04);color:inherit}.crm-row:hover,.crm-row[aria-current=true]{border-color:#a186d0;background:rgba(131,104,185,.13)}.crm-row strong,.crm-row span,.crm-row small{display:block}.crm-row span{margin-top:5px;opacity:.8}.crm-row small{margin-top:7px;font-size:12px;opacity:.7}
.crm-pill{display:inline-block;padding:3px 8px;border:1px solid var(--crm-line);border-radius:20px;font-size:12px;margin-right:5px}.crm-alert{color:#e6b77a}.crm-note{white-space:pre-wrap;line-height:1.6}.crm-section{border-top:1px solid var(--crm-line);padding-top:14px;margin-top:20px}.crm-link{background:none;border:none;color:#bca2ec;text-align:left;text-decoration:underline;padding:4px 0;cursor:pointer}.crm-history-item{border-left:2px solid #7554ae;padding:4px 0 10px 14px;margin:10px 0}.crm-empty{opacity:.75;padding:20px 0}.crm-muted{font-size:13px;opacity:.7}.crm-detail-actions{margin:12px 0}
.crm-dialog{width:min(760px,95vw);max-height:90vh;border-radius:14px;padding:24px}.crm-dialog form{display:block}.crm-dialog #crm-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.crm-dialog label{display:flex;flex-direction:column;gap:6px}.crm-dialog label.crm-wide{grid-column:1/-1}.crm-dialog input,.crm-dialog select,.crm-dialog textarea{width:100%;box-sizing:border-box}.crm-dialog select[multiple]{min-height:95px}.crm-dialog small{font-size:12px;opacity:.75}.crm-dialog .crm-actions{justify-content:flex-end;margin-top:16px}.crm-dialog::backdrop{background:rgba(5,8,16,.7)}
#crm-dialog{max-height:calc(100dvh - 32px);overflow:auto;background:var(--panel,#0b1320);color:var(--ink,#f6fbff);border:1px solid #43506a}#crm-dialog .section-head{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}#crm-close{flex:0 0 34px;width:34px;height:34px;min-height:34px;padding:0;border:1px solid #43506a;background:#182130;color:var(--ink,#f6fbff);border-radius:7px;font-size:24px}#crm-dialog h3{margin:0}body:has(#crm-dialog[open]){overflow:hidden}
@media(max-width:800px){.crm-layout{grid-template-columns:1fr}.crm-metrics{grid-template-columns:repeat(2,1fr)}.crm-dialog #crm-fields{grid-template-columns:1fr}.crm-dialog label.crm-wide{grid-column:auto}.crm-actions{align-items:stretch}#crm-view .section-head{flex-direction:column}}
.crm-card-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-top:16px}.crm-card-gallery figure{margin:0;border:1px solid rgba(155,164,187,.3);padding:10px;border-radius:8px;min-width:0}.crm-card-gallery img{display:block;width:100%;max-height:220px;object-fit:contain;background:#101824;border-radius:5px}.crm-card-gallery figcaption{font-size:12px;overflow-wrap:anywhere;line-height:1.6;margin-top:8px}.crm-card-gallery a:not([href]){opacity:.6;cursor:wait}.crm-card-review{grid-column:1/-1;padding:14px;border:1px solid #596b8b;border-radius:10px;background:rgba(127,137,160,.07)}.crm-card-review-layout{display:grid;grid-template-columns:1fr 1fr;gap:16px}.crm-card-review-layout img{width:100%;max-height:220px;object-fit:contain;background:#101824;border-radius:6px}.crm-card-review h4{margin:0 0 10px}.crm-card-review p{font-size:13px;line-height:1.5}.crm-card-review label{margin:12px 0}.crm-card-review pre{font:12px/1.5 inherit;white-space:pre-wrap;overflow-wrap:anywhere;max-height:180px;overflow:auto}.crm-card-review small{line-height:1.5}.crm-card-review [hidden]{display:none!important}@media(max-width:550px){.crm-card-review-layout{grid-template-columns:1fr}}

#crm-camera-dialog{width:min(780px,95vw);background:var(--panel,#0b1320);color:var(--ink,#f6fbff);border:1px solid #43506a}.crm-camera-stage{background:#03070d;min-height:180px;border:1px solid #43506a;border-radius:8px;overflow:hidden}.crm-camera-stage video,.crm-camera-stage img{display:block;width:100%;max-height:55dvh;object-fit:contain}.crm-camera-stage [hidden],#crm-camera-dialog [hidden]{display:none!important}#crm-camera-dialog .crm-actions{justify-content:flex-end;gap:10px}#crm-camera-dialog p{line-height:1.5}#crm-camera-dialog .section-head{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:16px}#crm-camera-dialog h3{margin:0}.crm-camera-icon{flex:0 0 34px;width:34px;height:34px;padding:0;border:1px solid #43506a;border-radius:7px;background:#182130;color:inherit;font-size:24px}body:has(#crm-camera-dialog[open]){overflow:hidden}

.crm-card-key-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.crm-card-key-fields label{margin:0}.crm-card-key-fields .crm-wide{grid-column:1/-1}.crm-card-update{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;margin:12px 0}.crm-card-update input{width:auto!important}.crm-contact-details{border:1px solid rgba(155,164,187,.3);border-radius:8px;padding:14px;margin:16px 0}.crm-contact-details h4{margin-top:0}.crm-contact-details dl{display:grid;grid-template-columns:110px 1fr;gap:10px;margin:0}.crm-contact-details dt{color:var(--muted,#a8b8c8);font-size:13px}.crm-contact-details dd{margin:0;overflow-wrap:anywhere}@media(max-width:550px){.crm-card-key-fields{grid-template-columns:1fr}.crm-contact-details dl{grid-template-columns:1fr;gap:4px}.crm-contact-details dd{margin-bottom:8px}}

.crm-camera-stage{position:relative;padding-bottom:76px}
#crm-camera-capture{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);min-height:48px;min-width:154px;border-radius:28px;border:2px solid #fff;background:#e9fbff;color:#102532;font-weight:700;box-shadow:0 2px 12px #0008;touch-action:manipulation}
#crm-camera-capture:disabled{opacity:.5}
.crm-camera-stage:has(#crm-camera-preview:not([hidden])){padding-bottom:0}

.crm-upload-feedback{margin:14px 0;padding:16px;border:2px solid #49b7c9;border-radius:10px;background:#102b37;color:#f0fbff;overflow-wrap:anywhere}.crm-upload-feedback[hidden],.crm-upload-feedback [hidden]{display:none!important}.crm-upload-feedback strong{display:block;font-size:16px}.crm-upload-feedback p{margin:10px 0;line-height:1.5}.crm-upload-feedback progress{display:block;width:100%;margin-top:12px}.crm-upload-feedback[data-phase="Not uploaded"]{border-color:#ed9b81;background:#392321}.crm-upload-feedback[data-phase="Saved"]{border-color:#62ca9c}.crm-upload-mode .crm-camera-stage,.crm-upload-mode #crm-camera-status{display:none}.crm-upload-feedback button{min-height:42px;padding:9px 14px;border:1px solid #49b7c9;border-radius:7px;background:#173d4b;color:#f0fbff;cursor:pointer}.crm-upload-mode #crm-camera-switch,.crm-upload-mode #crm-camera-retry,.crm-upload-mode #crm-camera-retake,.crm-upload-mode #crm-camera-use{display:none!important}

.crm-metrics{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.crm-lead-details dl{display:grid;grid-template-columns:140px 1fr;gap:10px}.crm-lead-details dd{margin:0;overflow-wrap:anywhere}.crm-lead-details dt{opacity:.7}.crm-lead-import-dialog{width:min(1100px,96vw);max-height:92dvh;background:var(--panel,#0b1320);color:var(--ink,#fff);overflow:auto}.crm-lead-import-dialog .section-head{display:flex;justify-content:space-between;gap:12px}.crm-lead-import-dialog label{display:flex;flex-direction:column;gap:6px;margin:10px 0}.crm-lead-import-dialog input,.crm-lead-import-dialog textarea,.crm-lead-import-dialog select{max-width:100%;box-sizing:border-box;width:100%;background:#142232;color:inherit;border:1px solid #536174;border-radius:6px;padding:9px}.crm-lead-import-options{display:flex;flex-wrap:wrap;gap:16px;align-items:end}.crm-lead-import-options label{flex:1;min-width:180px}.crm-lead-import-row{border:1px solid #4d5368;border-radius:10px;padding:12px;margin:12px 0}.crm-lead-import-row summary{cursor:pointer;font-weight:600}.crm-lead-import-row>label{flex-direction:row;align-items:center}.crm-lead-import-row input[type=checkbox]{width:auto}.crm-lead-import-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.crm-lead-import-grid .crm-wide{grid-column:1/-1}.crm-lead-import-dialog progress{width:100%}.crm-lead-import-dialog [hidden]{display:none!important}#crm-lead-import-warnings{white-space:pre-wrap;color:#f1d69f}#crm-lead-import-status{white-space:pre-wrap;font-weight:600}@media(max-width:650px){.crm-lead-import-grid{grid-template-columns:1fr}.crm-lead-details dl{grid-template-columns:1fr}.crm-lead-details dd{margin-bottom:10px}}
.crm-filters [hidden]{display:none!important}

