/* ==========================================================================
   Square Ibis — platform console (companies, plans, invoices, leads, admins)
   ========================================================================== */

/* overview */
.pl-status-list { display: flex; flex-direction: column; gap: 2px; }
.pl-status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 11px; color: inherit; text-decoration: none; transition: background .2s; }
.pl-status-row:hover { background: var(--surface-2); text-decoration: none; }
.pl-status-row b { font-size: 15px; font-weight: 500; }
.alert-item .chip { margin-inline-start: 6px; vertical-align: middle; }

/* company detail */
.pl-detail { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pl-detail > .stack { gap: 14px; }
.pl-sub .form-actions { padding-top: 4px; }
.pl-invoices .table-scroll { border-top: 1px solid var(--border); }
.pl-invoices .empty-state { padding: 28px 20px; }

/* plans editor */
.pl-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.pl-plan { gap: 14px; }
.pl-plan.is-hot { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: linear-gradient(170deg, rgba(var(--a1-rgb), .1), var(--surface) 50%); }
.pl-plan.is-off { opacity: .72; }
.pl-plan.is-off:hover { opacity: 1; }
.pl-plan-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pl-plan-head .chip svg { width: 12px; height: 12px; }
.pl-limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.pl-limits .field-label { font-size: 11.5px; }
.pl-limits .input { height: 34px; font-size: 13px; }

/* leads board */
.pl-board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.pl-col { --h: 230; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); min-height: 160px; }
.pl-col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 6px; font-size: 13px; }
.pl-col-head i { width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h) 80% 62%); box-shadow: 0 0 8px hsl(var(--h) 80% 62% / .8); }
.pl-col.h-gray .pl-col-head i { background: var(--gray); box-shadow: none; }
.pl-col-head b { flex: 1; }
.pl-col-empty { padding: 18px 8px; text-align: center; font-size: 12.5px; color: var(--text-3); border: 1px dashed var(--border-strong); border-radius: 14px; }
.pl-lead { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--border); box-shadow: inset 0 1px 0 var(--highlight); animation: fieldIn .4s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); transition: border-color .2s; }
.pl-lead:hover { border-color: var(--border-strong); }
.pl-lead-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pl-lead-head b { font-size: 14px; }
.pl-lead-head span { font-size: 11.5px; white-space: nowrap; }
.pl-lead-who { font-size: 12.5px; color: var(--text-2); margin-top: -4px; }
.pl-lead-msg { font-size: 12.5px; color: var(--text-2); line-height: 1.5; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pl-lead-contact { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; min-width: 0; }
.pl-lead-actions { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding-top: 6px; border-top: 1px dashed var(--border-strong); }

@media (max-width: 1100px) {
  .pl-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .pl-plans { grid-template-columns: minmax(0, 1fr); }
  .pl-limits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-board { grid-template-columns: repeat(4, minmax(250px, 82vw)); }
}
