/*!
 * Meraki Admin Dashboard - CRM module styles (crm/*.html, rendered by assets/js/crm.js).
 * Load after meraki.css; uses only the tokens in tokens.css.
 */

/* Priority and task-status badges (deal stages live in meraki.css, profile.html uses them) */
.badge.high { background: var(--bad-tint); color: var(--bad-ink); }
.badge.medium { background: var(--warn-tint); color: var(--warn-ink); }
.badge.low, .badge.completed { background: var(--good-tint); color: var(--good-ink); }
.badge.in_progress, .badge.upcoming { background: var(--accent-tint); color: var(--accent); }
.badge.pending { background: var(--surface-2); color: var(--text-2); }

/* Deals board */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(233px, 1fr)); gap: var(--s-3); padding-block: var(--s-4); padding-inline: var(--pad-inline); align-content: start; background: var(--bg); flex: 1; }
.deal { padding: var(--s-3); display: grid; gap: var(--s-3); }
.deal-top { display: flex; justify-content: space-between; align-items: center; }
.deal-who { display: flex; gap: var(--s-2); align-items: center; }
.deal-who b { display: block; font-weight: 600; }
.deal-who span { display: block; font-size: var(--fs-1); color: var(--text-3); }
.deal-amt { font: 600 var(--fs-4)/1 var(--font-mono); letter-spacing: -0.02em; }
.deal-meta { display: grid; gap: var(--s-1); color: var(--text-2); }
.deal-meta div { display: flex; align-items: center; gap: var(--s-2); }
.deal-meta .ki { color: var(--text-3); }
.deal-row { display: flex; justify-content: space-between; align-items: center; padding-top: var(--s-2); border-top: 1px dashed var(--border); color: var(--text-3); font-size: var(--fs-1); }
.deal-row span { display: inline-flex; align-items: center; gap: var(--s-1); }
.deal-row.flush { border-top: 0; padding-top: 0; }
.deal-tags { display: flex; gap: var(--s-1); align-items: center; }
.deals-empty { grid-column: 1 / -1; }

/* Notes: favourites strip */
.section-title { font-size: var(--fs-2); font-weight: 600; padding-top: var(--s-3); padding-inline: var(--pad-inline); background: var(--surface); }
.fav-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(233px, 1fr)); gap: var(--s-3); padding-block: var(--s-3) var(--s-4); padding-inline: var(--pad-inline); background: var(--surface); }
.note-card { padding: var(--s-3); display: grid; gap: var(--s-1); }
.note-card .co { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-1); color: var(--text-3); }
.note-card b { font-size: var(--fs-2); font-weight: 600; }
.note-card p { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-card .foot { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-1); color: var(--text-3); margin-top: var(--s-1); }

/* Company detail */
.co-layout { display: grid; grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); flex: 1; }
.co-left { border-right: 1px solid var(--border); min-width: 0; display: flex; flex-direction: column; }
.co-right { min-width: 0; display: flex; flex-direction: column; background: var(--surface); }
.co-pane { padding-block: var(--s-4); padding-inline: var(--pad-inline); display: grid; gap: var(--s-4); align-content: start; }
/* Connection strength dot */
.conn i.very_weak { background: var(--bad); }
.conn i.weak { background: var(--hi); }
.conn i.medium { background: var(--series-3); }
.conn i.strong { background: var(--good); }
.conn i.very_strong { background: var(--accent); }
.sub-head.divided { border-top: 1px solid var(--border); padding-top: var(--s-4); }
.hl { padding: var(--s-3); display: grid; gap: var(--s-2); }
.hl .row { display: flex; align-items: center; gap: var(--s-2); color: var(--text-2); }
.hl .row .ki { color: var(--text-3); }
.feed { display: grid; border: 1px solid var(--border); border-radius: var(--r-3); overflow: hidden; }
.feed-item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); min-height: var(--ctl-lg); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item .txt b { font-weight: 600; }
.feed-item .txt.done { text-decoration: line-through; color: var(--text-3); }
.feed-item .when { color: var(--text-3); font-size: var(--fs-1); white-space: nowrap; }
.tl-day { padding: var(--s-2) 0; }
.composer { display: grid; gap: var(--s-2); }
.composer textarea { width: 100%; min-height: 55px; border: 1px solid var(--border); border-radius: var(--r-2); background: var(--surface); padding: var(--s-2) var(--s-3); resize: vertical; font-size: var(--fs-2); line-height: 1.618; }
.composer .row { display: flex; justify-content: flex-end; gap: var(--s-2); }
.comment { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: var(--s-3); }
.comment .meta { display: flex; gap: var(--s-2); align-items: baseline; }
.comment .meta b { font-weight: 600; }
.comment .meta span { font-size: var(--fs-1); color: var(--text-3); }
.comment p { color: var(--text-2); }
.file { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); min-height: var(--ctl-lg); }
.file:last-child { border-bottom: 0; }
.file .ft { width: 34px; height: 34px; border-radius: var(--r-2); display: grid; place-items: center; font: 600 var(--fs-1)/1 var(--font-mono); text-transform: uppercase; flex: none; }
.file .nm { flex: 1; min-width: 0; }
.file .nm b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .nm span { font-size: var(--fs-1); color: var(--text-3); }
@media (max-width: 987px) {
  .co-layout { grid-template-columns: minmax(0, 1fr); }
  .co-left { border-right: 0; border-bottom: 1px solid var(--border); }
}
