/* Cerquito Autopilot screen. Uses the shared tokens; no new colors except the status tints. */
.ap-hero { background: linear-gradient(135deg, var(--brand), #164f42); color: #fff; border-radius: var(--radius); padding: 26px 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.ap-hero h1 { color: #fff; font-size: 28px; margin: 0 0 6px; }
.ap-hero p { margin: 0 0 16px; opacity: .92; max-width: 56ch; }
.ap-hero .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.ap-demo { font-size: 13px; opacity: .9; margin-top: 10px; }

.apbar { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; counter-reset: ap; }
.apbar li { position: relative; text-align: center; font-size: 12px; color: var(--ink-2); padding-top: 34px; font-weight: 600; }
.apbar li::before { counter-increment: ap; content: counter(ap); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--line); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.apbar li::after { content: ""; position: absolute; top: 13px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--line); }
.apbar li:last-child::after { display: none; }
.apbar li.approved::before { background: var(--brand); color: #fff; content: "✓"; } .apbar li.approved::after { background: var(--brand); }
.apbar li.needs_approval::before { background: var(--accent); color: var(--ink); } .apbar li.needs_approval { color: var(--ink); }
.apbar li.running::before { background: var(--accent); animation: apPulse 1s ease-in-out infinite; }
.apbar li.failed::before, .apbar li.rejected::before { background: var(--bad); color: #fff; }
.apbar small { display: block; font-weight: 400; font-size: 11px; }
@keyframes apPulse { 50% { opacity: .45; } }

.ap-card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.ap-card header { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.ap-card header h3 { margin: 0; }
.ap-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ap-busy { display: flex; gap: 10px; align-items: center; color: var(--ink-2); padding: 14px 4px; }
.ap-busy .spinner { margin: 0; width: 22px; height: 22px; border-width: 3px; }

.ap-brand { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; }
.ap-logo { width: 120px; height: 120px; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; background: #fff; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.swatch { width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(0,0,0,.15); padding: 0; cursor: pointer; }
.swatch-in { width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: none; cursor: pointer; }
.ap-card textarea { width: 100%; min-height: 64px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }
.ap-card input[type=text], .ap-card input[type=number] { width: 100%; }
.ap-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ap-chip { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: 13px; }

.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ba figure { margin: 0; text-align: center; font-size: 13px; color: var(--ink-2); }
.ba img { width: 100%; max-width: 180px; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0/16px 16px; }
.ba .tag { display: inline-block; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.ap-ops { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.ap-ops li::before { content: "✓ "; color: var(--ok); font-weight: 700; }

.ap-draft .count { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; } .ap-draft .count.over { color: var(--bad); font-weight: 700; }
.ap-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.ap-fields .wide { grid-column: 1 / -1; }
.ap-issues { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ap-issues li { background: #fde8e6; border: 1px solid #f0c9c5; color: var(--bad); border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.ap-issues li.warning { background: #fff7e0; border-color: #f2dca0; color: var(--warn); }
.ap-draft.rejected { opacity: .55; }
.ap-ok { color: var(--ok); font-weight: 700; }

.ap-sku-ok { display: flex; gap: 10px; align-items: center; font-size: 18px; font-weight: 700; color: var(--ok); }
.ap-pub { text-align: center; padding: 10px 0; }
.ap-pub .btn { min-height: 52px; font-size: 18px; padding: 0 28px; }

@media (prefers-reduced-motion: reduce) { .apbar li.running::before { animation: none; } }
@media (max-width: 800px) {
  .ap-hero { padding: 20px 16px; } .ap-hero h1 { font-size: 22px; }
  .apbar { gap: 2px; } .apbar li { font-size: 10px; } .apbar small { display: none; }
  .ap-brand { grid-template-columns: 1fr; } .ap-fields { grid-template-columns: 1fr; }
}
