/* Protótipos navegáveis das fichas (assets/js/prototipos/*.js). Prefixo pt-. */
.pt-app {
  overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  background: #fff; box-shadow: var(--shadow-lg); font-size: 14px; color: var(--text);
}
.pt-app .icon { width: 15px; height: 15px; flex-shrink: 0; }
.pt-bar-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink); }
.pt-dots { display: flex; gap: 6px; }
.pt-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.pt-flag { margin-left: auto; padding: 2px 10px; border: 1px dashed var(--line-strong); border-radius: var(--pill); font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }

.pt-shell { position: relative; display: grid; grid-template-columns: 168px minmax(0, 1fr); min-height: 560px; }
.pt-nav { display: grid; align-content: start; gap: 2px; padding: 12px 8px; border-right: 1px solid var(--line); background: #FBFBFA; }
.pt-nav button {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 9px;
  background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); text-align: left; cursor: pointer;
}
.pt-nav button:hover { background: var(--surface-2); color: var(--ink); }
.pt-nav button[aria-current="true"] { background: var(--ink); color: #fff; }
.pt-nav em { margin-left: auto; padding: 0 7px; border-radius: var(--pill); background: #F59E0B; color: #fff; font-size: 11px; font-style: normal; font-weight: 700; }
.pt-main { min-width: 0; padding: 18px 20px 20px; }
.pt-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pt-head h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.pt-head__tools { display: flex; gap: 8px; }

.pt-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px;
  border: 1px solid var(--line-strong); border-radius: 9px; background: #fff;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.pt-btn:hover { border-color: var(--ink); }
.pt-btn--primary { border-color: var(--ink); background: var(--ink); color: #fff; }
.pt-btn--ok { border-color: var(--success); color: var(--success); }
.pt-btn--sm { min-height: 28px; padding: 3px 9px; font-size: 12px; }
.pt-link { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pt-select { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--muted); }
.pt-select select { min-height: 32px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink); }

.pt-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.pt-kpi { display: grid; gap: 1px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.pt-kpi span { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.pt-kpi b { font-size: 18px; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.pt-kpi small { font-size: 11.5px; color: var(--subtle); }

.pt-board { display: grid; grid-template-columns: repeat(5, minmax(176px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.pt-col { display: flex; flex-direction: column; min-height: 320px; padding: 8px; border-radius: 12px; background: var(--surface); transition: box-shadow .15s, background-color .15s; }
.pt-col.is-over { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--ink); }
.pt-col header { display: flex; align-items: baseline; gap: 6px; padding: 4px 4px 10px; }
.pt-col header b { font-size: 13px; color: var(--ink); }
.pt-col header span { padding: 0 6px; border-radius: var(--pill); background: #fff; font-size: 11px; font-weight: 700; color: var(--muted); }
.pt-col header small { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pt-col__cards { display: grid; align-content: start; gap: 8px; flex: 1; }
.pt-empty { padding: 18px 8px; border: 1px dashed var(--line-strong); border-radius: 10px; font-size: 12px; text-align: center; color: var(--subtle); }
.pt-card {
  display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  cursor: grab; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.pt-card:hover, .pt-card:focus-visible { border-color: var(--ink); box-shadow: var(--shadow-sm); outline: none; }
.pt-card.is-drag { opacity: .45; }
.pt-card.is-late { border-left: 3px solid #F59E0B; }
.pt-card b { font-size: 13.5px; color: var(--ink); }
.pt-card__t { font-size: 12px; line-height: 1.4; color: var(--muted); }
.pt-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.pt-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.pt-card__foot strong { font-size: 13px; color: var(--ink); }
.pt-card__foot span { display: inline-flex; align-items: center; gap: 3px; }
.pt-card__foot .icon { width: 12px; height: 12px; }
.pt-card.is-late .pt-card__foot span { color: #A35A00; }
.pt-tag { display: inline-block; padding: 1px 7px; border-radius: var(--pill); background: var(--surface-2); font-size: 10.5px; font-weight: 700; color: var(--muted); }
.pt-tag--reativacao, .pt-tag--retencao { background: #FEF3C7; color: #A35A00; }
.pt-tag--novo, .pt-tag--indicacao { background: #E7F0FF; color: #1D4ED8; }
.pt-tag--recompra, .pt-tag--servicoadicional { background: var(--success-bg); color: var(--success); }
.pt-av { display: inline-grid; place-items: center; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 10px; font-weight: 700; }
.pt-lost { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }

.pt-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-chips button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: #fff; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.pt-chips button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.pt-chips button span { opacity: .7; }
.pt-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--subtle); }
.pt-dot--ativo { background: #16A34A; }
.pt-dot--esfriando { background: #F59E0B; }
.pt-dot--sumido { background: #DC2626; }
.pt-search { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--muted); }
.pt-search input { width: 160px; min-height: 32px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink); outline: none; }
.pt-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.pt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pt-table th { padding: 9px 12px; background: var(--surface); font-size: 11.5px; font-weight: 600; text-align: left; color: var(--muted); white-space: nowrap; }
.pt-table td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.pt-table td b { display: block; color: var(--ink); }
.pt-table td small { display: block; font-size: 11.5px; color: var(--subtle); }
.pt-seg { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pt-muted { font-size: 12px; color: var(--subtle); }
.pt-hint { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 12.5px; color: var(--muted); }

.pt-group { margin-bottom: 16px; }
.pt-group h4 { margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pt-group h4 span { color: var(--subtle); }
.pt-task { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; cursor: pointer; }
.pt-task input { width: 17px; height: 17px; accent-color: var(--ink); flex-shrink: 0; }
.pt-task > span:nth-child(2) { flex: 1; min-width: 0; }
.pt-task b { display: block; font-size: 13.5px; color: var(--ink); }
.pt-task small { font-size: 12px; color: var(--muted); }
.pt-task em { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-weight: 600; color: var(--ink); }
.pt-task em .icon { width: 12px; height: 12px; }
.pt-task__when { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pt-task.is-done b { text-decoration: line-through; color: var(--subtle); }

.pt-dash { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; gap: 10px; }
.pt-panel { padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.pt-panel h4 { margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.pt-bar { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; }
.pt-bar > span { display: flex; align-items: center; gap: 6px; overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.pt-bar > span .pt-av { width: 20px; height: 20px; font-size: 9px; }
.pt-track { display: flex; overflow: hidden; height: 10px; border-radius: 5px; background: var(--surface); }
.pt-bar i { display: block; flex-shrink: 0; height: 10px; width: var(--w); background: var(--line-strong); }
.pt-bar i.is-won { background: var(--ink); }
.pt-bar b { font-size: 12px; color: var(--ink); white-space: nowrap; }
.pt-legend { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.pt-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--line-strong); }
.pt-legend i.is-won { background: var(--ink); }
.pt-donut { display: grid; gap: 8px; margin-bottom: 12px; }
.pt-donut div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.pt-donut b { font-size: 18px; color: var(--ink); }

.pt-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 2; width: min(360px, 100%); overflow-y: auto;
  padding: 18px; border-left: 1px solid var(--line); background: #fff; box-shadow: -18px 0 40px -24px rgba(0, 0, 0, .3);
}
.pt-drawer__head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pt-drawer h4 { margin-top: 6px; font-size: 18px; color: var(--ink); }
.pt-drawer p { font-size: 13px; color: var(--muted); }
.pt-drawer h5 { margin: 18px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pt-x { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.pt-dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 12px; }
.pt-dl div { padding: 8px; border-radius: 8px; background: var(--surface); }
.pt-dl dt { font-size: 11px; color: var(--muted); }
.pt-dl dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.pt-field { display: grid; gap: 4px; margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.pt-field input, .pt-field select { min-height: 36px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; font: inherit; font-size: 13.5px; font-weight: 400; color: var(--ink); }
.pt-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pt-hist { margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); list-style: none; }
.pt-hist li { position: relative; margin-bottom: 10px; font-size: 13px; color: var(--text); }
.pt-hist li::before { content: ""; position: absolute; left: -19px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.pt-hist span { display: block; font-size: 11px; color: var(--subtle); }

.pt-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--muted); }
.pt-foot > span { display: flex; align-items: center; gap: 6px; }

@media (max-width: 860px) {
  .pt-shell { grid-template-columns: 1fr; }
  .pt-nav { display: flex; overflow-x: auto; gap: 4px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .pt-nav button { flex-shrink: 0; padding: 7px 11px; }
  .pt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-dash { grid-template-columns: 1fr; }
  .pt-main { padding: 14px; }
  .pt-board { grid-template-columns: repeat(5, 210px); }
  .pt-search input { width: 120px; }
}

/* Tela pronta do protótipo (prototipo.tela na ficha): um HTML em prototipos/, num quadro */
.proto-tela { margin-top: 32px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: #fff; overflow: hidden; }
.proto-tela__head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.proto-tela__head b { display: block; font-size: 16px; color: var(--ink); }
.proto-tela__head span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.proto-tela__head .btn { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.proto-tela__head .icon { width: 15px; height: 15px; margin-left: 6px; }
.proto-tela__frame { display: block; width: 100%; height: min(720px, 80vh); border: 0; background: #f8fafc; }
@media (max-width: 640px) {
  .proto-tela__head .btn { flex: 1 1 100%; justify-content: center; }
  .proto-tela__frame { height: 640px; }
}
