/* ALOKE — THE ALOKE CRM. A working console on verify.css's shell and
   primitives; these are the CRM's own shapes: the board, the 360 page, the
   timeline, the mapping grid. Tokens from console-theme.css. */

.crm-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crm-row.between { justify-content: space-between; }
.crm-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.crm-num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.crm-name { font-weight: 600; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.crm-link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: start; }
.crm-link:hover { text-decoration: underline; }
.crm-sub { font-size: var(--t-xs); color: var(--muted); }

/* ── the board ── */
.crm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.crm-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-card); min-height: 240px; display: flex; flex-direction: column; }
.crm-col.over { outline: 2px dashed var(--accent); outline-offset: -4px; }
.crm-col-head { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.crm-col-head .t { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.crm-col-head .s { font-size: var(--t-xs); color: var(--muted); margin-top: 2px; }
.crm-col.won .crm-col-head { box-shadow: inset 0 3px 0 var(--ok); }
.crm-col.lost .crm-col-head { box-shadow: inset 0 3px 0 var(--danger); }
.crm-cards { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.crm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn); padding: 9px 10px; cursor: grab; font-size: var(--t-sm); }
.crm-card:active { cursor: grabbing; }
.crm-card.stale { border-inline-start: 3px solid var(--warn); }
.crm-card .amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.crm-card .meta { display: flex; justify-content: space-between; gap: 6px; font-size: var(--t-xs); color: var(--muted); margin-top: 4px; }
.crm-card select { margin-top: 6px; width: 100%; }

/* ── the 360 page ── */
.crm-hero { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.crm-hero h2 { margin: 0 0 6px; font-size: var(--t-2xl); overflow-wrap: anywhere; unicode-bidi: plaintext; }
.crm-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.crm-tab { border: 0; background: none; font: inherit; padding: 9px 12px; cursor: pointer; color: var(--ink-2); border-bottom: 2px solid transparent; }
.crm-tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.crm-tl { list-style: none; margin: 0; padding: 0; }
.crm-tl li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.crm-tl .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; }
.crm-tl .dot.system { background: var(--surface-2); color: var(--muted); }
.crm-tl .dot.support { background: var(--warn-weak); color: var(--warn); }
.crm-tl .dot.money { background: var(--ok-weak); color: var(--ok); }
.crm-tl .what { font-size: var(--t-sm); }
.crm-tl .body { white-space: pre-wrap; overflow-wrap: anywhere; unicode-bidi: plaintext; font-size: var(--t-sm); color: var(--ink-2); margin-top: 2px; }
.crm-tl .when { font-size: 11px; color: var(--muted); }
.crm-contact { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.crm-consent { display: flex; gap: 10px; flex-wrap: wrap; font-size: var(--t-xs); }
.crm-consent label { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }

/* ── tasks ── */
.crm-task { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-start; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn); margin-bottom: 8px; }
.crm-task > div:first-of-type { flex: 1 1 200px; min-width: 0; }
.crm-task > .vf-actions { margin-inline-start: auto; flex-wrap: wrap; }
.crm-task .crm-sub { overflow-wrap: anywhere; }
.crm-task.overdue { border-inline-start: 3px solid var(--danger); }
.crm-task .t { font-weight: 600; }

/* ── marketing ── */
.crm-filters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.crm-map { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(130px, 1fr) minmax(160px, 1.4fr); gap: 8px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.crm-map code { font-family: "Inter", monospace; direction: ltr; unicode-bidi: isolate; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
@media (max-width: 700px) { .crm-map { grid-template-columns: 1fr; } }
.crm-preview { white-space: pre-wrap; background: var(--surface-2); border-radius: var(--r-btn); padding: 10px 12px; font-size: var(--t-sm); unicode-bidi: plaintext; }

/* ── bars ── */
.crm-bars { display: flex; flex-direction: column; gap: 6px; }
.crm-bar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 8px; align-items: center; font-size: var(--t-sm); }
.crm-bar .track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.crm-bar .fill { height: 100%; background: var(--accent); border-radius: 999px; }
.crm-bar .fill.w { background: var(--ok); }

/* ── the sheet (forms over the page) ── */
.crm-sheet { position: fixed; inset: 0; z-index: 70; background: rgba(15, 8, 30, .45); display: grid; place-items: center; padding: 16px; }
.crm-sheet-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--e-float); width: min(620px, 100%); max-height: calc(100vh - 32px);
  overflow: auto; padding: 18px; box-sizing: border-box; }
.crm-sheet-card h3 { margin: 0 0 12px; }
.crm-sheet-card .vf-input, .crm-sheet-card .vf-select, .crm-sheet-card .vf-textarea { width: 100%; }
.dk-check { display: inline-flex; gap: 6px; align-items: center; font-size: var(--t-sm); cursor: pointer; }
.crm-sheet-card h4 { margin: 14px 0 8px; font-size: var(--t-sm); color: var(--ink-2); }
.crm-sub a, .crm-tl a, .vf-table a { color: var(--accent); text-decoration: none; }
.crm-sub a:hover, .crm-tl a:hover, .vf-table a:hover { text-decoration: underline; }

/* ── the selling tools (2026-10-08): calculator, guides, insights ── */
.crm-guide-modal { z-index: 80; }
.crm-h4 { margin: 14px 0 6px; font-size: var(--t-sm); color: var(--ink-2); }
.crm-list { margin: 0; padding-inline-start: 20px; font-size: var(--t-sm); line-height: 1.8; }
.crm-notes li { color: var(--warn); }
.crm-qa { border: 1px solid var(--line); border-radius: var(--r-btn); padding: 6px 10px; margin-bottom: 6px; font-size: var(--t-sm); }
.crm-qa summary { cursor: pointer; font-weight: 600; min-height: 28px; display: flex; align-items: center; }
.crm-qa p { margin: 6px 0 2px; line-height: 1.7; }
.crm-prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.crm-price { border: 1px solid var(--line); border-radius: var(--r-btn); padding: 10px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; font-size: var(--t-sm); }
.crm-qgrid { align-items: start; }
.crm-qres { margin-top: 12px; }
.crm-qtotal { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: var(--t-lg); }
.crm-qtotal b { font-size: 1.4em; }
.crm-compare { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: var(--t-sm); }
.crm-kb { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 14px; align-items: start; }
.crm-kb .crm-pills .vf-chip { border: 0; cursor: pointer; font: inherit; font-size: 11px; font-weight: 600; min-height: 28px; }
.crm-kb-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: start; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-btn); padding: 9px 12px; margin-bottom: 6px; font-size: var(--t-sm); }
.crm-kb-item:hover, .crm-kb-item:focus-visible { border-color: var(--accent); outline: none; }
.crm-kb-item.on { border-color: var(--accent); }
.crm-kb-open { position: sticky; top: 12px; }
@media (max-width: 900px) { .crm-kb { grid-template-columns: 1fr; } .crm-kb-open { position: static; } }
.crm-actions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.crm-actions li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; padding: 9px 12px;
  border: 1px solid var(--line); border-inline-start: 4px solid var(--line-strong); border-radius: var(--r-btn); background: var(--surface); font-size: var(--t-sm); }
.crm-actions li.pr-high { border-inline-start-color: var(--danger); }
.crm-actions li.pr-medium { border-inline-start-color: var(--warn); }
.crm-actions li.pr-low { border-inline-start-color: var(--info); }
.crm-meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 4px 0 10px; }
.crm-meter span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.crm-deal-tools { margin: 4px 0 6px; }
#dlCalcOut { margin-bottom: 8px; unicode-bidi: plaintext; }
