/* ============================================================================
   IDENTIDADE VISUAL V2 — MEUS CONTATOS (rota workspace) · Versão 5 preservada
   Escopo: html[data-screen="workspace"] — nunca data-route na raiz (delegado de clique).
============================================================================ */

html[data-screen="workspace"] .wrap{padding:var(--v2-r-3) 28px var(--v2-r-6)}
html[data-screen="workspace"] .workspace-opening{padding:0}
html[data-screen="workspace"] .workspace-title .eyebrow{display:none}
html[data-screen="workspace"] h1{
  margin:0;max-width:24ch;color:var(--v2-ink-hi);
  font:600 clamp(30px,2.9vw,40px)/1.1 var(--type-font,'Manrope Variable',sans-serif);letter-spacing:-.025em;
}
html[data-screen="workspace"] .work-rhythm{
  display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 0;margin:10px 0 0;max-width:72ch;
  font-size:15px;line-height:1.5;color:var(--v2-ink-2);font-weight:var(--v2-w-body);
}
html[data-screen="workspace"] .work-rhythm strong{font-weight:var(--v2-w-label);color:var(--v2-ink);font-variant-numeric:tabular-nums}
html[data-screen="workspace"] .work-rhythm span{font-variant-numeric:tabular-nums}
html[data-screen="workspace"] .work-rhythm span::before{content:"·";margin:0 10px;color:var(--v2-ink-3)}

html[data-screen="workspace"] .workspace-opening .tabs{
  display:flex;flex-wrap:nowrap;gap:28px;margin:var(--v2-r-3) 0 0;padding:0;
  border:0;border-bottom:1px solid var(--v2-hairline);border-radius:0;background:transparent;box-shadow:none;
  max-width:100%;overflow-x:auto;scrollbar-width:none;
}
html[data-screen="workspace"] .tabs::-webkit-scrollbar{display:none}
html[data-screen="workspace"] .workspace-opening .tabs button{
  position:relative;flex:none;min-height:44px;margin-bottom:-1px;padding:10px 0 14px;border:0;border-radius:0;background:transparent;box-shadow:none;
  color:var(--v2-ink-3);font-size:14px;font-weight:var(--v2-w-label);white-space:nowrap;
}
html[data-screen="workspace"] .workspace-opening .tabs button::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;border-radius:2px;background:transparent}
html[data-screen="workspace"] .workspace-opening .tabs button:hover{color:var(--v2-ink);background:transparent;border:0}
html[data-screen="workspace"] .workspace-opening .tabs .active,
html[data-screen="workspace"] .workspace-opening .tabs .active:hover{color:var(--v2-ink);font-weight:var(--v2-w-strong);border:0;background:transparent;box-shadow:none}
html[data-screen="workspace"] .workspace-opening .tabs .active::after{background:var(--v2-blue)}
html[data-screen="workspace"] .stack{display:block;gap:0;margin-top:var(--v2-r-3)}

html[data-screen="workspace"] .relations{margin:0}
html[data-screen="workspace"] .relation{
  position:relative;display:grid;grid-template-columns:76px minmax(0,270px) minmax(0,1fr) 208px;column-gap:26px;align-items:start;
  margin:0 0 14px;padding:20px 22px;border:1px solid var(--v2-hairline);border-radius:var(--v2-radius);background:var(--v2-surface);
  transition:background var(--motion-fast),border-color var(--motion-fast);
}
html[data-screen="workspace"] .relation::before{
  content:"";position:absolute;left:-1px;top:-1px;bottom:-1px;width:3px;border-radius:var(--v2-radius) 0 0 var(--v2-radius);background:transparent;
  transition:background var(--motion-fast);
}
html[data-screen="workspace"] .relation:hover,
html[data-screen="workspace"] .relation:focus-within{background:var(--v2-tint);border-color:var(--v2-hairline-active)}
html[data-screen="workspace"] .relation:hover::before,
html[data-screen="workspace"] .relation:focus-within::before{background:var(--v2-blue)}
html[data-screen="workspace"] .relation-pair{display:flex;align-items:center;padding-top:2px}
html[data-screen="workspace"] .relation-pair .contact-avatar{width:44px;height:44px;font-size:14px;box-shadow:0 0 0 2px var(--v2-surface)}
html[data-screen="workspace"] .relation:hover .relation-pair .contact-avatar,
html[data-screen="workspace"] .relation:focus-within .relation-pair .contact-avatar{box-shadow:0 0 0 2px var(--v2-tint)}
html[data-screen="workspace"] .relation-pair .relation-self{margin-left:-8px;background:var(--v2-ink);color:#EAF1FB}
html[data-screen="workspace"] .relation-pair img.contact-avatar{object-fit:cover;display:block}
html[data-screen="workspace"] .relation-who{min-width:0;display:flex;flex-direction:column;gap:8px}
html[data-screen="workspace"] .relation-status{display:flex;margin:0}
html[data-screen="workspace"] .relation-name{margin:2px 0 0;font-size:19px;font-weight:var(--v2-w-strong);letter-spacing:-.015em;line-height:1.3;color:var(--v2-ink);overflow-wrap:anywhere}
html[data-screen="workspace"] .relation-state{display:flex;flex-direction:column;gap:6px;margin:0}
html[data-screen="workspace"] .relation-state>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px}
html[data-screen="workspace"] .relation-state dt{font-size:13px;color:var(--v2-ink-3);font-weight:var(--v2-w-label)}
html[data-screen="workspace"] .relation-state dd{margin:0;font-size:13.5px;color:var(--v2-ink);font-weight:var(--v2-w-body);font-variant-numeric:tabular-nums}
html[data-screen="workspace"] .relation .tag{
  align-self:flex-start;padding:0;border:0;border-radius:0;background:transparent;gap:7px;
  color:var(--v2-ink-2);font-size:13px;font-weight:var(--v2-w-label);letter-spacing:0;
}
html[data-screen="workspace"] .relation .tag::before{width:6px;height:6px;background:#8FA5C2}
html[data-screen="workspace"] .relation .tag.status-negotiating{color:var(--v2-amber-text)}
html[data-screen="workspace"] .relation .tag.status-negotiating::before{background:var(--v2-amber-dot)}
html[data-screen="workspace"] .relation .tag.status-closed,html[data-screen="workspace"] .relation .tag.status-cancelled{color:var(--v2-ink-3)}
html[data-screen="workspace"] .relation .tag.closure-approved{color:var(--v2-green-text)}
html[data-screen="workspace"] .relation .tag.closure-approved::before{background:var(--v2-green-dot)}
html[data-screen="workspace"] .relation .tag.closure-pending{color:var(--v2-amber-text)}
html[data-screen="workspace"] .relation .tag.closure-pending::before{background:var(--v2-amber-dot)}
html[data-screen="workspace"] .relation .tag.closure-rejected{color:var(--v2-red-text)}
html[data-screen="workspace"] .relation .tag.closure-rejected::before{background:var(--v2-red-dot)}
html[data-screen="workspace"] .relation-work{display:flex;flex-direction:column;min-width:0}
html[data-screen="workspace"] .relation-project{margin:4px 0 4px;font-size:16px;font-weight:var(--v2-w-label);letter-spacing:-.005em;line-height:1.4;color:var(--v2-ink)}
html[data-screen="workspace"] .relation-context{margin:0;max-width:58ch;font-size:14.5px;line-height:1.55;color:var(--v2-ink-2);font-weight:var(--v2-w-body)}
html[data-screen="workspace"] .relation-budget{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 10px;margin:12px 0 0}
html[data-screen="workspace"] .relation-budget small{font-size:13px;color:var(--v2-ink-3);font-weight:var(--v2-w-label)}
html[data-screen="workspace"] .relation-budget strong{font-size:16px;font-weight:var(--v2-w-label);letter-spacing:-.005em;color:var(--v2-ink);font-variant-numeric:tabular-nums}
html[data-screen="workspace"] .relation-next{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding-top:4px}
html[data-screen="workspace"] .contact-whatsapp{
  display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px 9px;min-height:auto;padding:0;border:0;border-radius:0;background:transparent;
  color:var(--v2-ink);font-size:14px;font-weight:var(--v2-w-label);font-variant-numeric:tabular-nums;letter-spacing:.01em;white-space:nowrap;
}
html[data-screen="workspace"] .contact-whatsapp::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--v2-green-dot);box-shadow:none;flex:none}
html[data-screen="workspace"] .contact-whatsapp b{font-size:13px;font-weight:var(--v2-w-label);letter-spacing:0;text-transform:none;color:var(--v2-green-text)}
html[data-screen="workspace"] button.relation-cta{
  display:inline-flex;align-items:center;gap:8px;min-height:44px;margin:0 0 0 -10px;padding:10px 12px 10px 10px;
  border:0;border-radius:8px;background:transparent;box-shadow:none;
  color:var(--v2-blue);font-size:15px;font-weight:var(--v2-w-strong);letter-spacing:-.005em;
  transition:color var(--motion-fast),background var(--motion-fast);
}
html[data-screen="workspace"] button.relation-cta .next-arrow{width:15px;height:15px;flex:none;transition:transform var(--motion-fast)}
html[data-screen="workspace"] button.relation-cta:hover{background:rgba(13,82,201,.08);border:0;color:var(--v2-blue-hover)}
html[data-screen="workspace"] button.relation-cta:hover .next-arrow{transform:translateX(3px)}
html[data-screen="workspace"] button.relation-cta:active{background:rgba(13,82,201,.14);color:var(--v2-blue-hover);transform:none}

html[data-screen="workspace"] .empty{margin:var(--v2-r-2) 0 0;padding:6px 0 6px 18px;border:0;border-left:2px solid var(--v2-blue);border-radius:0;background:transparent}
html[data-screen="workspace"] .empty p{margin:0;max-width:52ch;font-size:16px;line-height:1.55;color:var(--v2-ink-2)}
html[data-screen="workspace"] .stack>.empty+button.relation-cta{margin:10px 0 0 10px}

html[data-screen="workspace"] .split{margin-top:0}
html[data-screen="workspace"] #profileForm{padding:22px 24px}
html[data-screen="workspace"] .editor-card{padding:20px 22px}
html[data-screen="workspace"] .editor-card:hover{background:var(--v2-surface);border-color:var(--v2-hairline);box-shadow:none}

html[data-screen="workspace"] dialog#modal .contact-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
html[data-screen="workspace"] dialog#modal .contact-actions .whatsapp-link{
  display:inline-flex;align-items:center;min-height:44px;padding:10px 18px;border-radius:8px;
  background:var(--v2-blue);color:#fff;font-weight:var(--v2-w-strong);font-size:14px;text-decoration:none;
}
html[data-screen="workspace"] dialog#modal .contact-actions .whatsapp-link:hover{background:var(--v2-blue-hover);color:#fff}
html[data-screen="workspace"] dialog#modal .contact-actions button.secondary{min-height:44px;padding:10px 18px;font-size:14px;border-color:transparent;color:var(--v2-ink-2);background:transparent}
html[data-screen="workspace"] dialog#modal .contact-actions button.secondary:hover{background:var(--v2-tint);color:var(--v2-ink)}
html[data-screen="workspace"] dialog#modal .contact button.primary[data-action="declare"]{background:var(--v2-surface);border:1px solid var(--v2-hairline-active);color:var(--v2-blue);font-weight:var(--v2-w-strong)}
html[data-screen="workspace"] dialog#modal .contact button.primary[data-action="declare"]:hover{background:var(--v2-tint);color:var(--v2-blue-hover)}

@media(max-width:1120px){
  html[data-screen="workspace"] .wrap{padding:var(--v2-r-3) 24px var(--v2-r-5)}
  html[data-screen="workspace"] .relation{grid-template-columns:76px minmax(0,220px) minmax(0,1fr) 196px;column-gap:20px}
}
@media(max-width:900px){
  html[data-screen="workspace"] .relation{grid-template-columns:76px minmax(0,1fr);row-gap:14px}
  html[data-screen="workspace"] .relation-work{grid-column:2}
  html[data-screen="workspace"] .relation-next{grid-column:2;padding-top:0}
  html[data-screen="workspace"] .relation-project{margin-top:0}
}
@media(max-width:760px){
  html[data-screen="workspace"] .wrap{padding:var(--v2-r-2) 18px var(--v2-r-5)}
  html[data-screen="workspace"] h1{font-size:28px;letter-spacing:-.024em}
  html[data-screen="workspace"] .work-rhythm{flex-direction:column;align-items:flex-start;gap:2px;font-size:14px;margin-top:10px}
  html[data-screen="workspace"] .work-rhythm span::before{content:none}
  html[data-screen="workspace"] .workspace-opening .tabs{width:calc(100% + 36px);max-width:none;gap:22px;margin:var(--v2-r-2) -18px 0;padding:0 18px}
  html[data-screen="workspace"] .workspace-opening .tabs button{padding:10px 0 12px;font-size:13.5px}
  html[data-screen="workspace"] .stack{margin-top:var(--v2-r-2)}
  html[data-screen="workspace"] .relation{grid-template-columns:68px minmax(0,1fr);column-gap:12px;row-gap:12px;margin-bottom:12px;padding:16px 16px 14px}
  html[data-screen="workspace"] .relation-pair .contact-avatar{width:40px;height:40px;font-size:13px}
  html[data-screen="workspace"] .relation-pair .relation-self{margin-left:-6px}
  html[data-screen="workspace"] .relation-who{gap:6px}
  html[data-screen="workspace"] .relation-name{font-size:18px;margin-top:0}
  html[data-screen="workspace"] .relation-work{grid-column:1/-1}
  html[data-screen="workspace"] .relation-project{font-size:15.5px}
  html[data-screen="workspace"] .relation-context{font-size:14px;max-width:none}
  html[data-screen="workspace"] .relation-budget{margin-top:10px}
  html[data-screen="workspace"] .relation-next{grid-column:1/-1;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 16px}
  html[data-screen="workspace"] button.relation-cta{min-height:48px;margin-left:-10px}
  html[data-screen="workspace"] .relation:hover{background:var(--v2-surface);border-color:var(--v2-hairline)}
  html[data-screen="workspace"] .relation:hover::before{background:transparent}
  html[data-screen="workspace"] .relation:focus-within{background:var(--v2-tint);border-color:var(--v2-hairline-active)}
  html[data-screen="workspace"] .relation:focus-within::before{background:var(--v2-blue)}
}
@media(max-width:380px){
  html[data-screen="workspace"] h1{font-size:26px}
  html[data-screen="workspace"] .relation{grid-template-columns:62px minmax(0,1fr);column-gap:10px;padding:14px 14px 12px}
  html[data-screen="workspace"] .relation-pair .contact-avatar{width:38px;height:38px;font-size:12.5px}
  html[data-screen="workspace"] .relation-pair .relation-self{margin-left:-8px}
}
@media(prefers-reduced-motion:reduce){
  html[data-screen="workspace"] .relation,html[data-screen="workspace"] .relation::before,html[data-screen="workspace"] .relation-cta,html[data-screen="workspace"] button.relation-cta .next-arrow{transition:none}
  html[data-screen="workspace"] button.relation-cta:hover .next-arrow{transform:none}
}
