/* ECR Connect — the Clients screen (2026-10-04). ECR's site only; Sam's site never loads this.
   The Leads screen's layout and pieces (ecr-leads.css, always loaded with it): the list in the
   middle, the client open on the right. */

#clientsApp[hidden] { display: none; }
#clientsApp { max-width: 1600px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start;
  min-height: calc(100vh - 220px); font-size: 14px; }
/* THE CLIENT FLIES OUT OVER THE LIST, as a lead does (Thomas, 2026-10-08: "On the clients tab it
   should have the same flyout effect"): fixed to the right edge at every width, the list keeping
   its full width underneath; Escape or the close button puts it away. */
#clPanel { position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--lv-panel-w, 560px), 100%); max-height: none; z-index: 50;
  box-shadow: -10px 0 30px rgba(15,61,92,0.18); animation: lvFlyOut 0.18s ease-out; }
#clPanel.lv-panel-idle { display: none; }
/* The same width as a lead, the same edge to drag and the same full window (Thomas, 2026-10-08). */
#clPanel.lv-panel-full { width: 100%; border-left: 0; padding-left: max(22px, calc((100vw - 1000px) / 2));
  padding-right: max(22px, calc((100vw - 1000px) / 2)); }
#clPanel.lv-panel-idle ~ .lv-resizer, #clPanel.lv-panel-full ~ .lv-resizer { display: none; }
#clPanel .lv-p-head { position: sticky; top: -20px; margin-top: -20px; padding: 20px 0 2px; background: var(--dk-surface, #fff); z-index: 2; }
#clPanel #clFacts { margin-top: -10px; }
/* The buttons spread across the panel (Thomas: "The buttons on the client tab should be wider so it fills the gap"). */
#clPanel .cl-actions .lv-btn, #clPanel .cl-more .lv-btn { width: 100%; box-sizing: border-box; text-align: center; }
@media (prefers-reduced-motion: reduce) { #clPanel { animation: none; } }

.cl-cols, .cl-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) 130px 90px; }
/* Its name, email and phone can be selected and copied; a click still opens it. */
.cl-row, .cl-row * { -webkit-user-select: text; user-select: text; }
/* A sub-client sits under its corporate account or referrer, indented, with a joining line. */
.cl-row.cl-sub { padding-left: 38px; position: relative; background: var(--dk-tint, #fcfcfe); }
.cl-row.cl-sub::before { content: ''; position: absolute; left: 22px; top: 0; height: 50%; width: 10px;
  border-left: 2px solid var(--dk-line, #d5dde0); border-bottom: 2px solid var(--dk-line, #d5dde0); border-bottom-left-radius: 4px; }
.cl-row.cl-sub .lv-who b { font-weight: 700; }
.cl-row .lv-price { text-align: right; }

.cl-parent { background: var(--dk-tint-accent, #f6f4fb); border: 1px solid var(--dk-accent-line-soft, #ddd6ef); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; }
.cl-item { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid var(--dk-line, #e7ecee); background: var(--dk-surface, #fff); border-radius: 8px;
  padding: 8px 10px; cursor: pointer; font: 13.5px Helvetica, Arial, sans-serif; color: var(--dk-ink, #1a1a1a); }
.cl-item:hover { border-color: var(--dk-accent-line, var(--purple)); }
.cl-item span { font-size: 12.5px; color: var(--dk-ink-2, var(--gray)); }
.cl-none { margin: 0; color: var(--dk-ink-2, var(--gray)); font-size: 13px; }

.cl-tx { display: grid; grid-template-columns: 70px minmax(0, 1fr) 80px 90px; gap: 8px; align-items: baseline; padding: 6px 2px;
  border-bottom: 1px solid var(--dk-line, #eef2f3); font-size: 13.5px; color: var(--dk-ink, #1a1a1a); text-decoration: none; }
a.cl-tx:hover { background: var(--dk-tint-accent, #faf9fd); }
.cl-tx span:first-child { font-weight: 700; color: var(--dk-accent-text, var(--purple)); }
.cl-tx span:nth-child(2) { color: var(--dk-ink-2, var(--gray)); }
.cl-tx span:nth-child(3), .cl-tx span:nth-child(4) { text-align: right; }
.cl-tx .cl-due { color: var(--dk-warn-text, #7a4f00); font-weight: 700; }

.cl-form { display: flex; flex-direction: column; gap: 10px; }
.cl-form-title { margin: 0 0 4px; font: 800 20px Raleway, Helvetica, Arial, sans-serif; overflow-wrap: anywhere; }
.cl-input { width: 100%; box-sizing: border-box; padding: 9px 12px; font: 14px Helvetica, Arial, sans-serif; border: 1.5px solid var(--dk-line, var(--border));
  border-radius: 8px; background: var(--dk-surface, #fff); }
.cl-input:focus { outline: none; border-color: var(--dk-accent-line, var(--purple)); }
.cl-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.cl-check[hidden] { display: none; }

/* The same line as a lead's, between the contact details and what follows (2026-10-09). */
#clPanel #clFacts { padding-bottom: 14px; border-bottom: 1px solid var(--dk-line, var(--border)); }
