/* Square Ibis — partners (inter-company subcontracting) */

.pt-body { gap: 16px; }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.pt-grid > .empty-state, .pt-grid > .skel-rows { grid-column: 1 / -1; }

.pt-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm), inset 0 1px 0 var(--highlight);
  animation: fieldIn .5s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: border-color .3s;
}
.pt-card:hover { border-color: var(--border-strong); }

.pt-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pt-head > .grow { min-width: 0; }
.pt-name { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-block-start: 3px; font-size: 12px; color: var(--text-3); }
.pt-sub > span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.pt-sub svg { width: 13px; height: 13px; }

.pt-label { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.pt-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.pt-chips .chip b { font-family: var(--mono); font-weight: 600; opacity: .8; }

.pt-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-radius: 14px; overflow: hidden; background: var(--border); border: 1px solid var(--border); }
.pt-stat { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; background: var(--surface-2); min-width: 0; }
.pt-stat > span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-stat > b { font-size: 15px; font-weight: 600; color: var(--text); }
.pt-stat.good > b { color: hsl(152 70% var(--chip-l)); }
.pt-stat.bad > b { color: hsl(350 80% var(--chip-l)); }
.pt-stat.warn > b { color: hsl(40 90% var(--chip-l)); }

.pt-contact { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.pt-contact a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.pt-contact svg { width: 14px; height: 14px; flex: none; }
.pt-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-block-start: auto; }
.pt-foot { font-size: 11.5px; color: var(--text-3); }
.pt-note { margin: 0; padding: 8px 12px; border-inline-start: 3px solid hsl(262 85% 62% / .6); border-radius: 0 10px 10px 0; background: var(--surface-2); font-size: 13px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
[dir="rtl"] .pt-note { border-radius: 10px 0 0 10px; }

.pt-section { display: flex; align-items: center; gap: 8px; margin-block-start: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.pt-section svg { width: 16px; height: 16px; }

/* how it works */
.pt-how .card-title { margin-block-end: 2px; }
.pt-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pt-step { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.pt-step b { display: block; font-size: 13.5px; }
.pt-step p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }

/* history */
.pt-history > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--text-2); list-style: none; }
.pt-history > summary::-webkit-details-marker { display: none; }
.pt-history > summary svg { width: 15px; height: 15px; }
.pt-history[open] > summary { margin-block-end: 10px; }
.pt-row { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; }
.pt-row .dim { white-space: nowrap; font-size: 12px; }

/* wilaya chooser */
.pt-chooser { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pt-count { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.pt-wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: min(52vh, 420px); overflow-y: auto; padding: 2px; }
.pt-wbtn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 34px;
  padding-inline: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  text-align: start;
  transition: background .2s, border-color .2s, color .2s;
}
.pt-wbtn b { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.pt-wbtn:hover { border-color: var(--border-strong); color: var(--text); }
.pt-wbtn.is-gap { border-style: dashed; }
.pt-wbtn[aria-pressed="true"] { --h: 262; color: hsl(var(--h) 85% var(--chip-l)); background: hsl(var(--h) 85% 60% / var(--chip-bg-a)); border-color: hsl(var(--h) 85% 62% / var(--chip-bd-a)); border-style: solid; }
.pt-wbtn[aria-pressed="true"] b { color: inherit; }
.pt-wbtn:focus-visible { outline: 2px solid hsl(262 85% 62%); outline-offset: 1px; }

/* hand over + parcels */
.pt-handinfo { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.pt-table { padding: 0; overflow: hidden; }
.pt-table .table-foot { padding: 10px 14px; }
.pt-cash { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.pt-fails { margin: 0; padding-inline-start: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.pt-body .filters-row > .dim { font-size: 12.5px; white-space: nowrap; }

@media (max-width: 640px) {
  .pt-grid { grid-template-columns: minmax(0, 1fr); }
  .pt-card { padding: 14px; border-radius: 18px; }
  .pt-wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-hide-sm { display: none; }
  .pt-body .filters-row > .select { flex: 1 1 140px; }
}

/* v2.3 — directory: company logos, own listing status */
.avatar.pt-logo { padding: 5px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.avatar.pt-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.avatar.pt-logo.bg-light { background: #fff; }
.avatar.pt-logo.bg-dark { background: #0d0f18; }
.avatar.pt-logo.bg-brand { background: var(--grad); border-color: transparent; }
.pt-listed { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: 13px; color: var(--text-2); }
.pt-listed svg { width: 16px; height: 16px; color: var(--green); }
.pt-listed.off svg { color: var(--amber); }
