/* ── FornoCloud CRM — customer.css ── */

/* Workspace layout */
.crm-wrap { display:flex; flex:1; overflow:hidden; }

.crm-left {
  width:220px; flex-shrink:0; background:var(--graphite);
  border-right:1px solid var(--graphite-lt);
  display:flex; flex-direction:column; padding:16px 12px; gap:8px; overflow-y:auto;
}
.crm-center {
  flex:1; overflow-y:auto; background:var(--black); min-width:0;
}
.crm-profile {
  width:380px; flex-shrink:0; border-left:1px solid var(--graphite-lt);
  background:var(--graphite); overflow-y:auto;
}
.crm-profile-placeholder {
  display:flex; flex-direction:column; align-items:center;
  justify-content:center; height:100%; color:#6B6B78; font-size:14px; gap:10px;
}

/* Left panel */
.crm-search-row { margin-bottom:4px; }
.crm-srch-inp {
  width:100%; background:#0D0D0F; border:1.5px solid #2A2A30; border-radius:8px;
  padding:9px 12px; color:#F5F5F7; font-size:13px; font-family:'Inter',sans-serif;
  outline:none; box-sizing:border-box;
}
.crm-srch-inp:focus { border-color:#4F7BE8; }
.crm-filter-lbl {
  font-size:9px; font-weight:700; color:#6B6B78; letter-spacing:.6px; margin-top:4px;
}
.crm-tag-flt { display:flex; flex-direction:column; gap:4px; }
.crm-flt-btn {
  padding:5px 10px; border-radius:6px; font-size:11px; font-weight:700;
  cursor:pointer; font-family:'Inter',sans-serif; background:transparent;
  border:1px solid #3D3D45; text-align:left; transition:all .15s;
}
.crm-new-btn {
  width:100%; padding:9px; background:#D42B2B; border:none; border-radius:9px;
  color:#fff; font-size:13px; font-weight:700; cursor:pointer; font-family:'Inter',sans-serif;
  margin-top:4px;
}
.crm-new-btn:hover { background:#B82424; }
.crm-count { font-size:11px; color:#6B6B78; text-align:center; padding-top:4px; }

/* List */
.crm-list { display:flex; flex-direction:column; gap:0; padding:0; }
.crm-card {
  padding:14px 20px; border-bottom:1px solid #16161E; cursor:pointer; transition:background .12s;
}
.crm-card:hover { background:#0F0F16; }
.crm-card-sel { background:#0D1828 !important; border-left:3px solid #4F7BE8; }
.crm-card-row      { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.crm-card-left     { flex:1; min-width:0; }
.crm-card-right    { text-align:right; flex-shrink:0; }
.crm-card-name     { font-weight:700; color:#EDEDF0; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.crm-card-meta     { font-size:12px; color:#6B6B78; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.crm-card-amt      { font-size:13px; font-weight:700; color:#EDEDF0; }
.crm-card-orders   { font-size:11px; color:#6B6B78; }
.crm-empty {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:14px; padding:60px 20px; text-align:center; min-height:200px;
}
.crm-empty-icon { font-size:44px; opacity:.3; }
.crm-empty-title { font-size:15px; font-weight:700; color:#555; }
.crm-empty-sub { font-size:13px; color:#3E3E4E; max-width:240px; line-height:1.5; }
.crm-spinner       { padding:32px; text-align:center; color:#6B6B78; font-size:13px; }
.crm-more-btn {
  background:#2A2A30; border:1px solid #3D3D45; color:#EDEDF0; border-radius:8px;
  padding:10px 24px; font-size:13px; cursor:pointer; font-family:'Inter',sans-serif;
}

/* Profile panel */
.crm-ph {
  display:flex; align-items:flex-start; gap:12px; padding:20px 20px 14px;
  border-bottom:1px solid var(--graphite-lt); position:sticky; top:0;
  background:var(--graphite); z-index:1;
}
.crm-ph-avatar {
  width:44px; height:44px; border-radius:50%; background:#2D6BE4;
  display:flex; align-items:center; justify-content:center;
  font-size:18px; font-weight:800; color:#fff; flex-shrink:0;
}
.crm-ph-info { flex:1; min-width:0; }
.crm-ph-name { font-size:17px; font-weight:800; color:#F5F5F7; letter-spacing:-.2px; }
.crm-ph-meta { font-size:12px; color:#6B6B78; margin-top:2px; overflow:hidden; text-overflow:ellipsis; }
.crm-ph-badge {
  display:inline-block; font-size:10px; font-weight:700;
  padding:2px 8px; border-radius:4px; margin-top:5px;
}
.crm-close-btn {
  background:transparent; border:1px solid #3D3D45; color:#8E8E9A;
  border-radius:6px; padding:6px 10px; font-size:13px; cursor:pointer; flex-shrink:0;
}
.crm-metrics {
  display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:16px 20px;
  border-bottom:1px solid var(--graphite-lt);
}
.crm-met {
  background:#0D0D14; border:1px solid #1E1E2E; border-radius:10px; padding:12px 14px;
  transition:border-color .15s;
}
.crm-met:hover { border-color:#2A2A3E; }
.crm-met-l { font-size:10px; font-weight:700; color:#8A8A9A; letter-spacing:.07em; text-transform:uppercase; margin-bottom:4px; }
.crm-met-v { font-size:18px; font-weight:800; color:#F5F5F7; letter-spacing:-.2px; }

/* Profile sections */
.crm-sec { padding:14px 20px; border-bottom:1px solid #1A1A20; }
.crm-sec-lbl { font-size:9px; font-weight:700; color:#6B6B78; letter-spacing:.6px; margin-bottom:8px; }
.crm-dg { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.crm-di { display:flex; flex-direction:column; gap:2px; }
.crm-dl { font-size:10px; color:#6B6B78; }
.crm-dv { font-size:13px; color:#EDEDF0; overflow:hidden; text-overflow:ellipsis; }
.crm-notes, .crm-addr {
  width:100%; background:#1E1E26; border:1.5px solid #3D3D45; border-radius:8px;
  padding:9px 12px; color:#F5F5F7; font-size:13px; font-family:'Inter',sans-serif;
  outline:none; box-sizing:border-box; resize:none;
}
.crm-notes:focus, .crm-addr:focus { border-color:#4F7BE8; }
.crm-save-btn {
  width:100%; padding:10px; margin-top:10px; background:#2D6BE4; border:none;
  border-radius:9px; color:#fff; font-size:13px; font-weight:700;
  cursor:pointer; font-family:'Inter',sans-serif;
}

/* Order cards in profile */
.crm-oc {
  padding:11px; border:1px solid #2A2A30; border-radius:9px; margin-bottom:8px;
}
.crm-oc-num { font-weight:700; color:#EDEDF0; font-size:13px; }
.crm-oc-amt { font-weight:700; color:#F5F5F7; font-size:13px; }
.crm-ord-btn {
  flex:1; padding:7px; background:#1A1A20; border:1px solid #3D3D45;
  border-radius:7px; color:#8E8E9A; font-size:12px; font-weight:700;
  cursor:pointer; font-family:'Inter',sans-serif;
}
.crm-rep-btn { border-color:#4F7BE8; color:#7BA8F5; background:#0F1A35; }

/* Tags */
.crm-tag-editor { display:flex; flex-wrap:wrap; gap:6px; }
.crm-tag-btn {
  padding:5px 12px; border-radius:20px; font-size:12px; font-weight:700;
  cursor:pointer; font-family:'Inter',sans-serif; border-width:1.5px; border-style:solid;
  transition:all .12s;
}

/* Responsive */
@media(max-width:900px){
  .crm-left { width:180px; }
  .crm-profile { width:320px; }
}
@media(max-width:700px){
  .crm-left { display:none; }
  .crm-profile { width:100%; border-left:none; }
}


/* ── Phase 6.6 additions ─────────────────────────────────────────────────── */

/* Segments */
.crm-segs { display:flex; flex-wrap:wrap; gap:6px; padding:10px 16px; border-bottom:1px solid #1A1A24; }
.crm-seg-badge { font-size:11px; font-weight:700; padding:3px 10px; border-radius:12px; border:1px solid transparent; }

/* Quick Actions bar */
.crm-qa-bar { display:flex; flex-wrap:wrap; gap:6px; padding:10px 16px; border-bottom:1px solid #1A1A24; background:#0D0D14; }
.crm-qa-btn { font-size:11px; font-weight:600; padding:5px 10px; border-radius:6px;
  border:1px solid #2A2A38; background:#1A1A24; color:#EDEDF0; cursor:pointer; white-space:nowrap; }
.crm-qa-btn:hover { background:#2A2A38; border-color:#4F7BE8; }

/* Tabs */
.crm-tabs { display:flex; border-bottom:1px solid #1E1E2E; padding:0 16px; overflow-x:auto; scrollbar-width:none; }
.crm-tabs::-webkit-scrollbar { display:none; }
.crm-tab { flex:1; padding:10px 4px; font-size:11px; font-weight:600; color:#6B6B7E;
  border:none; border-bottom:2px solid transparent; background:none; cursor:pointer;
  transition:color .15s; font-family:inherit; white-space:nowrap; min-width:40px; }
.crm-tab:hover { color:#EDEDF0; }
.crm-tab-active { color:#EDEDF0; border-bottom-color:#D42B2B; }
.crm-tab-body { overflow-y:auto; flex:1; padding:0; }

/* Timeline */
.crm-timeline { display:flex; flex-direction:column; gap:0; padding:8px 0; }
.crm-tl-row { display:flex; gap:10px; padding:10px 16px; border-bottom:1px solid #12121A; }
.crm-tl-icon { font-size:18px; flex-shrink:0; width:24px; text-align:center; }
.crm-tl-body { flex:1; min-width:0; }
.crm-tl-label { font-size:12px; font-weight:600; color:#EDEDF0; }
.crm-tl-ts { font-size:10px; color:#6B6B78; margin-top:2px; }

/* Channel badge on orders */
.crm-chan-badge { font-size:9px; font-weight:800; padding:2px 7px; border-radius:8px; }

/* Favorites tab */
.crm-fav-list { display:flex; flex-direction:column; gap:6px; }
.crm-fav-row { display:flex; align-items:center; gap:10px; }
.crm-fav-rank { font-size:11px; font-weight:700; color:#6B6B78; width:16px; text-align:right; flex-shrink:0; }
.crm-fav-body { flex:1; min-width:0; }
.crm-fav-name { font-size:12px; font-weight:600; color:#EDEDF0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:3px; }
.crm-fav-bar { height:4px; background:#1A1A24; border-radius:2px; }
.crm-fav-fill { height:4px; background:#4F7BE8; border-radius:2px; }
.crm-fav-cnt { font-size:11px; color:#6B6B78; flex-shrink:0; }
