.crm-root{display:grid;gap:18px}.crm-hero{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;background:linear-gradient(125deg,#fffdf8,#f1e5d3);border:1px solid #e5d6c0;border-radius:22px;padding:22px}.crm-hero h2{font:normal 28px Georgia,serif;color:#49382a;margin:6px 0}.crm-hero p{color:#85715b;margin:0}.crm-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.crm-stats>div{background:#fffdf9;border:1px solid #eadfcf;border-radius:16px;padding:16px;display:grid;gap:4px}.crm-stats b{font-size:21px;color:#82623f}.crm-stats small{color:#85715b}.crm-tools{display:flex;gap:9px;flex-wrap:wrap}.crm-tools input{flex:2 1 260px}.crm-tools select{flex:1 1 135px}.crm-tools input,.crm-tools select{min-height:42px;border:1px solid #d8c6ad;background:#fffdf9;border-radius:11px;padding:9px;color:#49382a}.crm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}.crm-card{background:#fffdf9;border:1px solid #e8d9c5;border-radius:20px;padding:18px;box-shadow:0 8px 24px #8769420d}.crm-head{display:flex;align-items:center;gap:10px}.crm-avatar{display:grid;place-items:center;background:#efe0c9;color:#88673e;border-radius:50%;height:44px;width:44px;font:24px Georgia,serif;flex:none}.crm-head>div:nth-child(2){min-width:0;flex:1}.crm-head h3{margin:0 0 4px;font:20px Georgia,serif;overflow-wrap:anywhere}.crm-head small{color:#8b7762}.crm-tier{background:#f3e8d8;color:#87633e;padding:5px 8px;border-radius:99px;font-size:11px}.crm-metrics{display:flex;justify-content:space-between;border-top:1px solid #eee2d3;border-bottom:1px solid #eee2d3;padding:14px 0;margin:15px 0;gap:8px}.crm-metrics span{display:grid;gap:5px}.crm-metrics b{color:#725132}.crm-metrics small{font-size:11px;color:#917d69}.crm-actions,.crm-buttons{display:flex;flex-wrap:wrap;gap:8px}.crm-backdrop:not([hidden]){position:fixed;inset:0;z-index:99999;background:#30231999;display:flex;align-items:center;justify-content:center;padding:16px}.crm-modal{position:relative;width:min(700px,100%);max-height:90dvh;overflow:auto;border-radius:22px;background:#fffdf8;border:1px solid #dfc9ac;box-shadow:0 24px 80px #1e160f55;padding:26px;color:#49382a}.crm-modal h2{font:normal 27px Georgia,serif;margin:0 40px 10px 0}.crm-modal>p{color:#85715b}.crm-close{position:absolute;right:14px;top:12px;border:0;background:#f3e8d9;border-radius:50%;width:34px;height:34px;cursor:pointer;font-size:23px;color:#765635}.crm-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.crm-form label{display:grid;gap:6px;font-size:13px;color:#6f5944}.crm-form label.wide,.crm-buttons{grid-column:1/-1}.crm-form input:not([type=checkbox]),.crm-form textarea{width:100%;border:1px solid #dbc8af;border-radius:10px;padding:10px;background:white;min-height:42px;color:#49382a}.crm-form textarea{min-height:85px}.crm-form .crm-consent{display:flex;align-items:center}.crm-profile{display:grid;grid-template-columns:1fr 1fr;gap:0 15px;margin:14px 0}.crm-profile p{overflow-wrap:anywhere}.crm-modal .crm-stats{margin:16px 0}@media(max-width:650px){.crm-stats{grid-template-columns:repeat(2,1fr)}.crm-form,.crm-profile{grid-template-columns:1fr}.crm-modal{padding:18px}.crm-tools>*{flex:1 1 100%}.crm-hero{padding:16px}}

.crm-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.crm-channels .smallbtn { min-height: 38px; }
.crm-channels [aria-pressed="true"] {
  background: #513247;
  border-color: #513247;
  color: #fff8ef;
}

.crm-client-view > .crm-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
.crm-client-view > p { color: #77634d; }
.crm-client-layout { display: grid; gap: 14px; }
.crm-client-panel {
  min-width: 0; padding: 16px; border: 1px solid #e7d8c2;
  border-radius: 16px; background: #faf6ed; overflow-wrap: anywhere;
}
.crm-client-panel h3 { margin: 0 0 12px; font: 22px/1.2 Georgia,serif; }
.crm-client-panel .crm-profile { grid-template-columns: minmax(0,1fr); gap: 8px; margin: 0; }
.crm-client-panel .crm-profile p { margin: 0; }
.crm-client-panel .admin-table-wrap { overflow-x: auto; }
.crm-client-actions { margin-top: 14px; justify-content: flex-end; }
.crm-client-actions [data-crm-close] { background: #765632; color: #fffdfa; }
@media (min-width: 950px) {
  .crm-modal:has(.crm-client-view) { box-sizing: border-box; width: min(1120px,100%); }
  .crm-client-layout { grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); align-items: start; }
}
@media (max-width: 480px) {
  .crm-client-view > .crm-stats { grid-template-columns: minmax(0,1fr); }
}
