/*! Selvar — the revenue desk of a commercial solar company — © 2026 Hasib (OVERSHOOT). All rights reserved. Licensed to gusttavo.gimenis@byotti.com.br (order INS-959E4F60), not sold: see LICENSE.md. */
/* Contacts — people list, company cards, the two drawers. */

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip--select { position: relative; padding-right: 8px; }
.chip--select select { appearance: none; border: 0; background: none; font: inherit; font-weight: 600; padding-right: 4px; cursor: pointer; }

/* people */
.people .bar { margin-bottom: 8px; }
.plist { display: grid; }
.plist li + li { border-top: 1px solid var(--line); }
.prow {
  width: calc(100% + 12px); margin: 0 -6px; padding: 10px 6px; border-radius: 12px; text-align: left;
  display: grid; grid-template-columns: 40px minmax(0, 1.3fr) minmax(0, 1.2fr) 130px 90px 96px; align-items: center; gap: 14px;
}
.prow:hover { background: var(--well); }
.prow b { font-weight: 600; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow__who, .prow__co { min-width: 0; display: grid; line-height: 1.3; }
.prow__star { width: 14px; height: 14px; color: var(--c-amber); fill: var(--c-amber); }
.prow__deals { display: grid; text-align: right; line-height: 1.3; }
.prow__deals b { justify-content: flex-end; }
.prow__touch { text-align: right; color: var(--muted); font-size: var(--fs-sm); }

/* companies */
.cogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap); }
.cocard {
  display: grid; gap: 14px; text-align: left; padding: 18px; border-radius: var(--r-card);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0;
}
.cocard:hover { border-color: var(--line-2); }
.cocard header { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cocard__logo { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--av-sky); color: var(--av-sky-t); font-weight: 700; font-size: var(--fs-sm); }
.cocard:nth-child(3n+2) .cocard__logo { background: var(--av-amber); color: var(--av-amber-t); }
.cocard:nth-child(3n+3) .cocard__logo { background: var(--av-teal); color: var(--av-teal-t); }
.cocard__name { display: grid; min-width: 0; line-height: 1.3; }
.cocard__name b { font-weight: 600; font-size: var(--fs-lg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cocard__name small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cocard__stats { display: grid; grid-template-columns: 1.2fr 1fr .6fr; gap: 8px; }
.cocard__stats dt { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.cocard__stats dd { font-weight: 600; font-size: var(--fs-xl); letter-spacing: -.01em; display: grid; line-height: 1.25; }
.cocard__stats dd small { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; letter-spacing: 0; }
.cocard footer { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.cocard footer small { flex: 1; color: var(--muted); font-weight: 600; }
.cocard footer .ico { width: 16px; height: 16px; color: var(--muted); }
.cocard:hover footer .ico { color: var(--primary); }

/* drawers */
.cx { display: grid; gap: 20px; }
.cx__head { display: flex; gap: 16px; align-items: center; padding-right: 44px; }
.cx__head p.muted { margin-top: 2px; }
.cx__pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.cx__logo { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c-cobalt) var(--tint), var(--card)); color: var(--t-cobalt); }
.cx__logo .ico { width: 28px; height: 28px; }
.cx__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.cx__acts .btn[aria-pressed="true"] .ico { color: var(--c-amber); fill: var(--c-amber); }
.cx__owner { display: flex !important; align-items: center; gap: 7px; }
.cx-none { font-size: var(--fs-md); }
.cx-deals, .cx-people { display: grid; gap: 2px; }
.cx-deal, .cx-person { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; text-align: left; }
.cx-deal:hover, .cx-person:hover { background: var(--well); }
.cx-deal__body, .cx-person > span:nth-child(2) { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.cx-deal__body b, .cx-person b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-deal__body small, .cx-person small { color: var(--muted); }
.cx-deal__v { display: grid; justify-items: end; gap: 4px; }
.cx-deal__v b { font-weight: 600; }
.cx-bars { display: grid; gap: 10px; }
.cx-bars li { display: grid; grid-template-columns: 120px 1fr 64px; align-items: center; gap: 12px; font-size: var(--fs-md); font-weight: 600; }
.cx-bars .meter { height: 10px; }
.cx-bars b { text-align: right; font-weight: 600; }

@media (max-width: 1279px) {
  .prow { grid-template-columns: 40px minmax(0, 1.3fr) minmax(0, 1fr) 120px 84px; }
  .prow__touch { display: none; }
}
@media (max-width: 999px) {
  .prow { grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 84px; }
  .prow__role { display: none; }
}
@media (max-width: 760px) {
  .chips { width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; width: calc(100% + 32px); }
  .chips::-webkit-scrollbar { display: none; }
  .prow { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 12px; }
  .prow > .av { grid-row: span 2; }
  .prow__co { grid-column: 2; grid-row: 2; }
  .prow__co b { font-weight: 500; font-size: var(--fs-sm); }
  .prow__co small { display: none; }
  .prow__deals { grid-row: span 2; grid-column: 3; grid-row-start: 1; }
  .cogrid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cx__head { padding-right: 40px; }
  .cx-bars li { grid-template-columns: 96px 1fr 56px; }
}
