/* PRTY OS — Artists screen + shared profile layout (prof-*), used by Artist and Venue profiles.
   Tokens only. Components come from components.css; this file handles screen layout. */

/* ==========================================================================
   Shared profile kit (Artist + Venue)
   ========================================================================== */

.prof-page { padding-bottom: calc(var(--s-10) + var(--s-4)); }

/* ---------- Header ---------- */
.prof-head { padding: var(--s-6) 0 0; }
.prof-head__top { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.prof-head__id { display: flex; align-items: center; gap: var(--s-4); min-width: 0; }
.prof-mark {
  width: 56px; height: 56px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: var(--r-3);
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--text-2);
  font: 600 var(--fs-16)/1 var(--mono); letter-spacing: 0.02em;
}
.prof-mark .icon { width: 22px; height: 22px; color: var(--text-2); }
.prof-head__text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.prof-head__eyebrow { font-size: var(--fs-11); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.prof-head__title { font-size: var(--fs-32); line-height: 1.1; font-weight: 600; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.prof-head__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); font-size: var(--fs-13); margin-top: 4px; }
.prof-head__meta .icon { color: var(--text-3); }
.prof-head__actions { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }

/* ---------- Facts strip (5 cells on both profiles) ---------- */
.prof-facts {
  margin: var(--s-5) 0 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  overflow: hidden;
}
.prof-fact { min-width: 0; padding: 12px var(--s-4); border-left: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 4px; margin: 0; }
.prof-fact:first-child { border-left: 0; }
.prof-fact__label { font-size: var(--fs-11); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 500; white-space: nowrap; }
.prof-fact__value { margin: 0; min-height: 22px; display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-14); font-weight: 500; color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.prof-fact__value > .icon { color: var(--text-3); }
.prof-fact__value .t-truncate { display: block; }
.prof-fact__sub { margin: 0; font-size: var(--fs-12); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-fact__contact { display: flex; align-items: center; gap: 4px; min-width: 0; width: 100%; }
.prof-fact__contact > .t-truncate { flex: 0 1 auto; margin-right: 2px; }
.prof-fact__contact .prof-cact { margin: -4px 0; }

@media (max-width: 1100px) {
  .prof-facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .prof-fact:nth-child(-n+3) { grid-column: span 2; }
  .prof-fact:nth-child(n+4) { grid-column: span 3; border-top: 1px solid var(--line-soft); }
  .prof-fact:nth-child(4) { border-left: 0; }
}
@media (max-width: 720px) {
  .prof-head { padding-top: var(--s-5); }
  .prof-mark { width: 44px; height: 44px; font-size: var(--fs-14); }
  .prof-head__title { font-size: var(--fs-24); }
  .prof-head__actions { width: 100%; }
  .prof-head__actions > .btn--primary { flex: 1; }
  /* Visual order: primary contact (full width) · 1 | 2 · 4 | 5 */
  .prof-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prof-fact, .prof-fact:nth-child(-n+3), .prof-fact:nth-child(n+4) { grid-column: auto; border-left: 0; border-top: 1px solid var(--line-soft); }
  .prof-fact:nth-child(2), .prof-fact:nth-child(5) { border-left: 1px solid var(--line-soft); }
  .prof-fact--contact, .prof-fact--contact:nth-child(3) { grid-column: 1 / -1; order: -1; border-top: 0; }
  .prof-fact--contact .prof-fact__value { min-height: 40px; }
  .prof-fact--contact .prof-cact { margin: 0 0 0 auto; }
  .prof-fact--contact .prof-cact .btn { --btn-h: 40px; }
  .prof-fact--contact .prof-cact .btn .icon { width: 18px; height: 18px; }
}

/* ---------- Tabs + body ---------- */
.prof-tabs { margin-top: var(--s-6); position: sticky; top: 0; z-index: 5; background: var(--bg); }
.prof-body { padding-top: var(--s-6); animation: fade-in var(--dur-2) var(--ease); }
.prof-stack { display: flex; flex-direction: column; gap: var(--s-6); min-width: 0; }
.prof-pair { gap: var(--s-4); align-items: stretch; }
.prof-summary { font-size: var(--fs-14); line-height: 1.6; color: var(--text-2); max-width: 88ch; }
.prof-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; min-height: var(--h-ctl); }
.prof-note { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-12); color: var(--text-3); line-height: 1.5; margin-top: calc(var(--s-3) - var(--s-6)); }
.prof-note .icon { margin-top: 2px; color: var(--text-3); }
.prof-note--flat { margin-top: 0; max-width: 78ch; }
@media (max-width: 720px) { .prof-stack { gap: var(--s-5); } .prof-note { margin-top: calc(var(--s-2) - var(--s-5)); } .prof-note--flat { margin-top: 0; } }

/* ---------- Show cards (next / last) ---------- */
.prof-show { display: flex; flex-direction: column; }
.prof-show > .panel__body { flex: 1; display: flex; flex-direction: column; gap: var(--s-4); }
.prof-show__head { display: flex; align-items: center; gap: var(--s-3); min-width: 0; border-radius: var(--r-2); margin: -6px -8px 0; padding: 6px 8px; transition: background var(--dur-1); }
.prof-show__head:hover { background: var(--hover); }
.prof-show__id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.prof-show__title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--fs-14); font-weight: 600; }
.prof-show__sub { font-size: var(--fs-12); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-show__status { flex-shrink: 0; }
.prof-show__links { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.prof-show__links a { color: var(--text-2); }
.prof-show__empty { flex: 1; min-height: 132px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-3); font-size: var(--fs-13); text-align: center; }
.prof-show__empty .icon { color: var(--text-4); }

.prof-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); padding-top: var(--s-3); gap: var(--s-3); }
.prof-mini__cell { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.prof-mini__label { font-size: var(--fs-11); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 500; white-space: nowrap; }
.prof-mini__value { min-height: 22px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1px; font-weight: 500; min-width: 0; white-space: nowrap; }
.prof-mini__sub { font-size: var(--fs-11); color: var(--text-3); font-weight: 400; }
@media (max-width: 720px) {
  .prof-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-4); }
  .prof-show__status { display: none; }
}

.prof-keycontacts .contact:first-child { padding-top: 0; }
.prof-keycontacts .contact:last-child { padding-bottom: 0; }

/* ---------- Inline proportional bar ---------- */
.prof-ibar { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 72px; }
.prof-ibar__track { width: 72px; height: 3px; border-radius: 3px; background: var(--surface-4); overflow: hidden; }
.prof-ibar__fill { display: block; height: 100%; background: var(--text-3); border-radius: 3px; transition: width var(--dur-3) var(--ease); }

/* ---------- Contact groups ---------- */
.prof-cgroup .panel__head { min-height: 42px; }
.prof-ctable-wrap { overflow: visible; min-width: 0; }
.prof-ctbl { table-layout: fixed; }
.prof-ctbl th { position: static; }
/* Wide screens: aligned table. Narrower: ContactCard list (menus never clipped, big tap targets on phones). */
@media (max-width: 1279px) { .prof-ctable-wrap { display: none; } }
@media (min-width: 1280px) { .prof-clist { display: none; } }
.prof-ctbl td { height: 52px; padding-top: 6px; padding-bottom: 6px; }
.prof-ctbl tbody tr:last-child td { border-bottom: 0; }
.prof-td-trunc { overflow: hidden; text-overflow: ellipsis; }
.prof-td-note { line-height: 1.45; }
.prof-trunc { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof-cname { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prof-cname__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.prof-cname__sub { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--fs-12); color: var(--text-3); }
.prof-also { flex-shrink: 0; height: 17px; display: inline-flex; align-items: center; padding: 0 5px; border-radius: 3px; border: 1px solid var(--line-strong); color: var(--text-2); font-size: var(--fs-10); font-weight: 500; white-space: nowrap; }
.prof-phone { display: inline-flex; align-items: center; gap: 6px; }
.prof-phone .icon { color: var(--text-3); }
.prof-cact { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.prof-cact-row { display: inline-flex; align-items: center; gap: 2px; }
.prof-addrow {
  display: flex; align-items: center; gap: 8px; width: 100%;
  min-height: 48px; padding: 0 var(--s-4);
  color: var(--text-3); font-size: var(--fs-13); text-align: left;
  transition: color var(--dur-1), background var(--dur-1);
}
.prof-addrow:hover { color: var(--text); background: var(--hover); }
.prof-addrow .icon { color: var(--text-4); }
.prof-addrow:hover .icon { color: var(--text-2); }
.prof-missing { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; min-height: 40px; padding: 6px var(--s-4); border-top: 1px solid var(--line-soft); }
.prof-missing__add { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; font-size: var(--fs-12); color: var(--text-3); border-radius: var(--r-1); padding: 0 4px; transition: color var(--dur-1), background var(--dur-1); }
.prof-missing__add:hover { color: var(--text); background: var(--hover); }
.prof-missing__add .icon { color: var(--text-4); }
.prof-clist { padding: 0 var(--s-4); }
.prof-crow { display: flex; align-items: flex-start; gap: 4px; border-bottom: 1px solid var(--line-soft); }
.prof-crow:last-child { border-bottom: 0; }
.prof-crow > .contact { flex: 1; min-width: 0; border-bottom: 0; }
.prof-crow > div:last-child { padding-top: 14px; }
@media (max-width: 720px) {
  .prof-crow .contact__actions { gap: 6px; }
  .prof-crow .contact__actions .btn { width: 40px; background: var(--surface-2); border-color: var(--line); }
  .prof-crow .contact__actions .btn .icon { width: 17px; height: 17px; }
}

/* ---------- Forms in drawers ---------- */
.prof-form-grid { gap: var(--s-4); }
.prof-check { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); cursor: pointer; min-height: 22px; }
.prof-danger { color: var(--red); }
.prof-danger .icon { color: var(--red); }
.prof-danger:hover { color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }

/* ---------- Documents ---------- */
.prof-dtbl { table-layout: fixed; min-width: 820px; }
.prof-dtbl .group-row td { background: var(--bg-2); }
.prof-mgroup { padding: 10px var(--s-4) 6px; font-size: var(--fs-11); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; background: var(--bg-2); border-bottom: 1px solid var(--line-soft); }

/* ==========================================================================
   Artists list
   ========================================================================== */

.art-toolbar { gap: var(--s-3); }
.art-search { width: 300px; max-width: 100%; }
.art-search .input { height: var(--h-ctl); padding-right: 30px; }
.art-search__clear { position: absolute; right: 6px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: var(--r-1); color: var(--text-3); }
.art-search__clear:hover { background: var(--hover); color: var(--text); }
@media (max-width: 720px) { .art-search { width: 100%; } .art-toolbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; } }

.art-name { font-weight: 600; letter-spacing: 0.01em; }
.art-namecell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.art-namecell__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; max-width: 260px; }
.art-tbl td { height: 52px; }
.art-td-agency { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.art-td-cities { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.art-showcell { display: flex; flex-direction: column; gap: 1px; min-width: 0; max-width: 150px; }
.art-listfoot { margin-top: var(--s-3); }

/* Add artist drawer */
.art-dupe {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-2);
  background: color-mix(in srgb, var(--amber) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--amber) 24%, transparent);
}
.art-dupe > .icon { color: var(--amber); margin-top: 2px; }
.art-dupe > div { display: flex; flex-direction: column; gap: 3px; }
.art-dupe.is-blocking { background: color-mix(in srgb, var(--amber) 11%, var(--surface)); }
.art-dupe__confirm { margin-top: 8px; font-size: var(--fs-12); }
.art-matches { border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.art-match { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); transition: background var(--dur-1); }
.art-match:last-child { border-bottom: 0; }
.art-match:hover { background: var(--hover); }
.art-match__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.art-match__fuzzy { font-weight: 400; margin-left: 8px; }
.art-match__go { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); }
.art-match:hover .art-match__go { color: var(--text); }

/* ==========================================================================
   Artist profile
   ========================================================================== */

.art-shows td { height: 44px; }
.art-evcell { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.art-evcell:hover .t-strong { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.art-rel { white-space: nowrap; }
@media (max-width: 1280px) { .art-rel { display: none; } }
.art-mside { flex-direction: column; align-items: flex-end; gap: 4px; }
.art-cancelled { background: transparent; }
.art-cancelled .list-row__title { text-decoration: line-through; text-decoration-color: var(--text-4); }
.art-cdate { width: 96px; flex-shrink: 0; }
@media (max-width: 720px) { .art-cdate { width: auto; } }

.art-adv { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.art-adv .progress { width: 48px; }
.art-adv:hover { color: var(--text); }

/* Content tiles (Drive links) */
.art-pack .panel__title { font-size: var(--fs-14); }
.art-packhead { display: flex; flex-direction: column; gap: 2px; }
.art-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s-3); }
.art-tiles--compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-2); }
.art-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 12px; min-width: 0;
  border: 1px solid var(--line-soft); border-radius: var(--r-2);
  background: var(--bg-2);
}
.art-tiles--compact .art-tile { padding: 10px; gap: 8px; }
.art-tile__head { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.art-tile__head .icon { color: var(--text-3); }
.art-tile__label { font-weight: 500; }
.art-tile__count { margin-left: auto; font-size: var(--fs-11); color: var(--text-3); white-space: nowrap; }
.art-tile .linkout { height: 28px; max-width: 100%; overflow: hidden; }
@media (max-width: 720px) { .art-tiles, .art-tiles--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } .art-tile .linkout { width: 100%; justify-content: center; height: 36px; } }

/* Fee chart */
.art-chartwrap { display: flex; justify-content: center; }
.art-feechart { width: 100%; height: auto; display: block; }
.art-legend { display: inline-flex; align-items: center; gap: 6px; }
.art-legend__solid, .art-legend__dash { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.art-legend__solid { background: var(--text-2); }
.art-legend__dash { margin-left: 8px; box-shadow: inset 0 0 0 1px var(--text-3); }

/* ---------- Revision 2: six-cell facts strip (Artist adds Management), fees, venues played, placeholders ---------- */
.prof-facts--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .prof-facts--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prof-facts--6 .prof-fact, .prof-facts--6 .prof-fact:nth-child(-n+3), .prof-facts--6 .prof-fact:nth-child(n+4) { grid-column: auto; border-left: 1px solid var(--line-soft); border-top: 0; }
  .prof-facts--6 .prof-fact:nth-child(3n+1) { border-left: 0; }
  .prof-facts--6 .prof-fact:nth-child(n+4) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 720px) {
  /* Primary contact full width first, then Agency | Agent · Management | Last · Next */
  .prof-facts--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prof-facts--6 .prof-fact, .prof-facts--6 .prof-fact:nth-child(-n+3), .prof-facts--6 .prof-fact:nth-child(n+4) { grid-column: auto; border-left: 0; border-top: 1px solid var(--line-soft); }
  .prof-facts--6 .prof-fact:nth-child(2), .prof-facts--6 .prof-fact:nth-child(5) { border-left: 1px solid var(--line-soft); }
  .prof-facts--6 .prof-fact:nth-child(3) { border-left: 0; }
  .prof-facts--6 .prof-fact:nth-child(6) { grid-column: 1 / -1; border-left: 0; }
  .prof-facts--6 .prof-fact--contact, .prof-facts--6 .prof-fact--contact:nth-child(4) { grid-column: 1 / -1; order: -1; border-top: 0; border-left: 0; }
}

.art-fee { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; white-space: nowrap; }
.art-fee__bf { font-size: var(--fs-11); color: var(--text-3); font-variant-numeric: tabular-nums; }

.art-venues--flush .tbl th:first-child, .art-venues--flush .tbl td:first-child { padding-left: var(--s-4); }
.art-venues--flush .tbl th:last-child, .art-venues--flush .tbl td:last-child { padding-right: var(--s-4); }
.art-vtbl td { height: 42px; }
.art-vtbl tbody tr:last-child td { border-bottom: 0; }

.art-brow { align-items: center; }
.art-brow__date { width: 64px; flex-shrink: 0; font-size: var(--fs-12); white-space: nowrap; }
.art-brow .list-row__title { min-width: 0; }

.art-later {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px var(--s-4);
  border: 1px dashed var(--line-strong); border-radius: var(--r-3);
  color: var(--text-3);
}
.art-later > .icon { color: var(--text-4); margin-top: 2px; }
