/* Build screens — Prompt editor + Cost and usage.
   Only what app-window.css does not already cover. */

.aw-pill.lilac { background: rgba(205,130,255,.14); color: var(--aw-lilac); }
/* the shared shell puts name and sub on one line; the real app stacks them */
.aw-ws-name, .aw-ws-sub { display: block; }


/* ---------- Prompt editor ---------- */
.m-pe-head { padding-top: 12px; }
.m-pe-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.m-pe-crumb { font-size: 10.5px; color: var(--aw-t3); }
.m-pe-crumb b { color: var(--aw-t2); font-weight: 500; }
.m-pe-ver {
  display: inline-block; vertical-align: 3px; margin-left: 6px;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(205,130,255,.14); color: var(--aw-lilac);
  font-size: 10px; font-weight: 650; letter-spacing: .02em;
}
.m-pe-saved { font-size: 10px; color: var(--aw-t3); }
.m-pe-saved span { color: var(--aw-t2); }

.m-pe-split {
  display: grid; grid-template-columns: minmax(0, 1fr) 262px;
  gap: 12px; padding: 12px 16px 16px; align-items: start;
}
.m-pe-col { min-width: 0; }
.m-pe-split .aw-card { margin: 0 0 12px; }
.m-pe-split .m-pe-try { margin: 0; }
.m-pe-sub { font-size: 9.5px; color: var(--aw-t3); font-weight: 400; }

.m-pe-msgs { padding: 4px 12px 10px; }
.m-pe-msg { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 9px; padding-top: 9px; }
.m-pe-msg + .m-pe-msg { margin-top: 9px; border-top: 1px solid #1e1934; }
.m-pe-role { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.m-pe-text {
  background: #0f0b1f; border: 1px solid var(--aw-divider); border-radius: 6px;
  padding: 7px 9px; font-size: 10.5px; line-height: 1.6; color: var(--aw-t2);
}
.m-pe-vars { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.m-pe-var {
  padding: 1px 5px; border-radius: 4px;
  background: rgba(205,130,255,.14); color: var(--aw-lilac);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 9.5px;
}

.m-pe-fields { grid-template-columns: 88px minmax(0, 1fr); align-items: center; }
.m-pe-fields dd {
  padding: 4px 8px; border: 1px solid var(--aw-border); border-radius: 6px;
  background: #0f0b1f; font-size: 10.5px;
}

.m-pe-trybody { display: flex; flex-direction: column; gap: 7px; }
.m-pe-label { font-size: 9.5px; color: var(--aw-t3); }
.m-pe-pick {
  display: flex; justify-content: space-between; gap: 6px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 9.5px;
}
.m-pe-pick span { font-family: var(--font-sans, "Outfit", system-ui, sans-serif); color: var(--aw-t3); white-space: nowrap; }
.m-pe-sends { padding-top: 7px; border-top: 1px solid var(--aw-divider); font-size: 10px; color: var(--aw-t3); }
.m-pe-run { display: block; text-align: center; padding: 7px 8px; }
.m-pe-trybody small { font-size: 9px; color: var(--aw-t3); line-height: 1.45; }

/* ---------- Cost and usage ---------- */
.m-cost-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px 16px 0; }
.m-cost-kpis .aw-card { margin: 0; }
.m-cost-kpi.on { border-color: rgba(114,70,245,.7); box-shadow: inset 0 0 0 1px rgba(114,70,245,.3); }
.m-cost-label { display: block; margin-bottom: 7px; font-size: 9.5px; color: var(--aw-t3); }
.m-cost-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-cost-pair span { font-size: 9.5px; color: var(--aw-t3); }
.m-cost-pair i { display: inline-block; width: 6px; height: 6px; border-radius: 2px; margin-right: 4px; vertical-align: 1px; }
.m-cost-pair b { display: block; margin-top: 3px; font-size: 14px; font-weight: 600; color: var(--aw-t1); }

.m-cost-chart { margin-bottom: 0; }
.m-chart { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; height: 96px; }
.m-chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 9px; color: var(--aw-t3); text-align: right; line-height: 1; }
.m-chart-bars {
  display: flex; align-items: flex-end; gap: 2px;
  border-bottom: 1px solid var(--aw-border);
  /* one dashed midline, no chart library */
  background-image: repeating-linear-gradient(to right, var(--aw-divider) 0 4px, transparent 4px 8px);
  background-size: 100% 1px; background-position: 0 50%; background-repeat: no-repeat;
}
.m-chart-bars i { flex: 1; min-width: 0; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, #b07bff, #7246f5); }
.m-chart-x { display: flex; justify-content: space-between; margin: 5px 0 0 36px; font-size: 9px; color: var(--aw-t3); }

.m-cost-row { grid-template-columns: minmax(92px, 1fr) 20px minmax(80px, 1.05fr) 60px 82px 62px 56px; }
.m-cost-share { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 33px; gap: 6px; align-items: center; }
.m-cost-share::before {
  content: ""; position: absolute; left: 0; right: 39px; top: 50%; height: 5px; margin-top: -2.5px;
  border-radius: 2px; background: var(--aw-low);
}
.m-cost-share i { position: relative; height: 5px; border-radius: 2px; background: linear-gradient(90deg, #7246f5, #cd82ff); }
.m-cost-share b { font-size: 9.5px; font-weight: 600; color: var(--aw-t2); text-align: right; font-variant-numeric: tabular-nums; }
.m-cost-total { border-top: 1px solid var(--aw-border); background: rgba(255,255,255,.02); font-weight: 600; color: var(--aw-t1); }
.m-cost-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; border-top: 1px solid var(--aw-divider); font-size: 9.5px; color: var(--aw-t3); }

@media (max-width: 700px) {
  .m-pe-split { grid-template-columns: 1fr; }
  .m-cost-kpis { grid-template-columns: 1fr; }
}
