/* Customer portal — invite-only diagnostic of public profile.
   Paper surface · tokens loaded via /static/tokens.css (already linked).
   Source: .claude/skills/operforma-design/ui_kits/customer/customer.css */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-top: 58px;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }

/* ── NAV ── */
.cp-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 58px;
  background: rgba(247,244,239,.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ash);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
}
.cp-wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  letter-spacing: var(--track-wordmark);
  text-transform: lowercase;
  color: var(--ink);
  cursor: pointer;
}
.cp-nav-links { display: flex; gap: 24px; list-style: none; }
.cp-nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--soft);
  cursor: pointer;
}
.cp-nav-links a:hover { color: var(--ink); }

/* ── WRAP ── */
.cp-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 32px 80px;
}
.cp-wrap-form { max-width: 640px; }

/* ── PAGE HEADER ── */
.cp-page-header {
  padding: 0 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.cp-page-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.cp-page-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
}
.cp-page-h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.cp-page-sub {
  font-size: 16px;
  color: var(--soft);
  margin-top: 14px;
  max-width: 580px;
  line-height: 1.7;
}

/* ── BUTTON ── */
.cp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 11px 22px;
  min-height: 44px;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.cp-btn-accent { background: var(--accent); color: var(--paper); }
.cp-btn-accent:hover { background: #2D2B50; }
.cp-btn-ghost  { background: transparent; color: var(--ink); border: 1px solid var(--ash); }
.cp-btn-ghost:hover { border-color: var(--mid); }
.cp-btn-sm     { font-size: 13px; padding: 7px 14px; min-height: 44px; }
.cp-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── CARD ── */
.cp-card {
  background: var(--paper);
  border: 1px solid var(--ash);
  border-radius: 2px;
  padding: 28px 32px;
  margin-top: 16px;
}
.cp-card.is-accent { border-color: var(--accent); background: rgba(59,56,104,0.03); }
.cp-card-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

/* ── FORM ── */
.cp-form { display: flex; flex-direction: column; gap: 22px; }
.cp-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cp-form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.cp-fg { display: flex; flex-direction: column; gap: 6px; }
.cp-fg label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--soft);
}
.cp-fg input, .cp-fg select, .cp-fg textarea {
  background: var(--paper);
  border: 1px solid var(--ash);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 14px;
  border-radius: 4px;
  outline: none;
  transition: border-color .15s;
}
.cp-fg input:focus, .cp-fg select:focus, .cp-fg textarea:focus { border-color: var(--accent); }
.cp-fg input::placeholder, .cp-fg textarea::placeholder { color: var(--mid); }
.cp-fg input[type="number"] { font-family: var(--font-mono); }
.cp-fg-hint {
  font-size: 13px;
  color: var(--soft);
  margin-top: 2px;
  line-height: 1.55;
}

/* ── LGPD CONSENT BLOCK (signup) ── */
.cp-consent {
  display: flex; flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--ash);
  border-radius: 2px;
  background: rgba(59,56,104,0.015);
}
.cp-consent-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 14px;
  align-items: start;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
}
.cp-consent-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1px solid var(--mid);
  background: var(--paper);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: background .15s, border-color .15s;
}
.cp-consent-row input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.cp-consent-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border-right: 1.5px solid var(--paper);
  border-bottom: 1.5px solid var(--paper);
  transform: rotate(45deg);
}
.cp-consent-row input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.cp-consent-text strong { font-weight: 500; color: var(--ink); }
.cp-consent-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cp-consent-text--optional { color: var(--soft); font-weight: 300; }
.cp-consent-optional {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(59,56,104,0.06);
  padding: 1px 6px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}

/* ── ERROR ── */
.cp-error {
  padding: 12px 16px;
  border: 1px solid var(--ink);
  border-left: 3px solid var(--ink);
  background: rgba(26,24,20,0.03);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.55;
}

/* ── 3-STEP EXPLAINER (expectations page) ── */
.cp-explainer {
  display: flex; flex-direction: column;
  gap: 28px;
  margin-top: 8px;
}
.cp-explainer-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  align-items: start;
}
.cp-explainer-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--accent);
  padding-top: 4px;
}
.cp-explainer-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 6px;
}
.cp-explainer-body {
  font-size: 14px;
  color: var(--soft);
  line-height: 1.75;
  max-width: 540px;
}
.cp-explainer-body strong { color: var(--ink); font-weight: 500; }

/* ── LGPD RIGHTS LIST ── */
.cp-rights {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.cp-rights li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
}
.cp-rights li::before {
  content: '';
  display: block;
  width: 14px;
  height: 1px;
  background: var(--accent);
  margin-top: 11px;
}

/* ── PROGRESS BAR (review page) ── */
.cp-progress-wrap { margin: 32px 0; }
.cp-progress-head {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 10px;
}
.cp-progress-head .is-complete { color: var(--accent); font-weight: 500; }
.cp-progress-track {
  height: 1px;
  background: var(--ash);
  position: relative;
}
.cp-progress-track::before,
.cp-progress-track::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 1px;
  height: 7px;
  background: var(--mid);
}
.cp-progress-track::before { left: 0; }
.cp-progress-track::after  { right: 0; }
.cp-progress-fill {
  height: 1px;
  background: var(--accent);
  transition: width .3s ease;
  position: relative;
}
.cp-progress-fill::after {
  content: '';
  position: absolute;
  top: -3px;
  right: 0;
  width: 1px;
  height: 7px;
  background: var(--accent);
}

/* ── FACT CARD ── */
.cp-fact {
  background: var(--paper);
  border: 1px solid var(--ash);
  border-left: 3px solid var(--ash);
  border-radius: 2px;
  padding: 22px 26px;
  margin-bottom: 14px;
  transition: opacity .2s;
}
.cp-fact.is-pending  { border-left-color: var(--accent); }
.cp-fact.is-accepted { border-left-color: var(--accent); opacity: 0.7; }
.cp-fact.is-declined { border-left-color: var(--mid); opacity: 0.55; }

.cp-fact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.cp-fact-main { flex: 1; min-width: 0; }
.cp-fact-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 9px;
  margin-bottom: 10px;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.cp-fact-badge.is-verified { color: var(--accent); }
.cp-fact-badge.is-unverified { color: var(--soft); }

.cp-fact-claim {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 8px;
}
.cp-fact-source {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.02em;
  word-break: break-all;
  text-decoration: none;
}
.cp-fact-source:hover { text-decoration: underline; text-underline-offset: 3px; }
.cp-fact-source.is-self {
  color: var(--soft);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0;
}

.cp-fact-actions {
  display: flex; flex-direction: column; gap: 8px;
  flex-shrink: 0;
}
.cp-fact-resolved {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-top: 6px;
}
.cp-fact-resolved.is-confirmed {
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
}
.cp-fact-resolved.is-confirmed::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--accent);
}
.cp-fact-resolved.is-declined { color: var(--soft); }

.cp-fact-correction {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--ash);
}
.cp-fact-correction-summary {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft);
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.cp-fact-correction-summary::-webkit-details-marker { display: none; }
.cp-fact-correction-summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  margin-left: auto;
}
.cp-fact-correction[open] .cp-fact-correction-summary::after { content: '−'; }
.cp-fact-correction-form {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 14px;
}
.cp-fact-correction-form textarea {
  resize: vertical;
  min-height: 60px;
  font-family: var(--font-body);
}

/* ── REVIEW PAGE CONCLUDE ── */
.cp-conclude {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.cp-conclude-note {
  font-size: 13px;
  color: var(--soft);
  margin-top: 12px;
  line-height: 1.65;
}

/* ── BULLET LIST (status page) ── */
.cp-bullets {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.cp-bullets li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.65;
}
.cp-bullets li::before {
  content: '';
  display: block;
  width: 14px;
  height: 1px;
  background: var(--accent);
  margin-top: 11px;
}

/* ── ORDERED LIST (landing) ── */
.cp-flow {
  list-style: none;
  counter-reset: cp-flow;
  display: flex; flex-direction: column;
  margin-top: 6px;
}
.cp-flow li {
  counter-increment: cp-flow;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink);
  line-height: 1.55;
}
.cp-flow li:last-child { border-bottom: none; }
.cp-flow li::before {
  content: counter(cp-flow, upper-roman);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
}

/* ── CHECKBOX LABEL ── */
.cp-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.6;
  color: var(--soft);
}
.cp-check input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.cp-check span a { color: var(--accent); }

/* ── DEFINITION LIST ── */
.cp-def-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}
.cp-def-list dt {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}
.cp-def-list dd {
  font-size: 14px;
  color: var(--soft);
  line-height: 1.65;
}

/* ── MULTI-SELECT TILES (formato_cobranca) ── */
.cp-tile-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.cp-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--ash);
  border-radius: 4px;
  font-size: 14px;
  color: var(--soft);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.cp-tile input[type="checkbox"] {
  display: none;
}
.cp-tile:hover { border-color: var(--accent); color: var(--ink); }
.cp-tile-selected {
  border-color: var(--accent);
  background: rgba(59,56,104,0.06);
  color: var(--ink);
  font-weight: 500;
}

/* ── RADIO TILES (demand_proxy) ── */
.cp-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.cp-radio-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--ash);
  border-radius: 4px;
  font-size: 14px;
  color: var(--soft);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
  line-height: 1.5;
}
.cp-radio-tile input[type="radio"] {
  flex-shrink: 0;
  accent-color: var(--accent);
}
.cp-radio-tile:hover { border-color: var(--accent); color: var(--ink); }
.cp-radio-selected {
  border-color: var(--accent);
  background: rgba(59,56,104,0.06);
  color: var(--ink);
}

/* ── ACTION ROW (button/link row used across landing, expectations, status) ── */
.cp-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── PAGE NOTE (small muted note below actions) ── */
.cp-page-note {
  margin-top: 24px;
  font-size: 14px;
  color: var(--soft);
  line-height: 1.65;
}
.cp-page-note--card { margin-top: 8px; }

/* ── STATUS — DIAGNOSTIC READY ── */
.cp-stat-headline {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.15;
  margin-bottom: 6px;
}
.cp-stat-headline-arrow { color: var(--accent); }
.cp-stat-delta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.cp-status-link-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--soft);
  letter-spacing: 0.04em;
}

/* ── CONSECUTIVE CARD SPACING ── */
.cp-card + .cp-card { margin-top: 16px; }

/* ── GHOST BUTTON ── */
.cp-btn-ghost {
  background: transparent;
  border: 1px solid var(--ash);
  color: var(--soft);
}
.cp-btn-ghost:hover { border-color: var(--accent); color: var(--ink); }

/* ── FOOTER ── */
.cp-footer {
  border-top: 1px solid var(--line);
  padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 80px;
  background: var(--paper);
}
.cp-footer-left {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: var(--track-wordmark);
  text-transform: lowercase;
  color: var(--ink);
}
.cp-footer-tag {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--soft);
}

/* ── Responsive · customer portal ──────────────────────────────────────── */

@media (max-width: 960px) {
  .cp-nav { padding: 0 24px; }
  .cp-wrap, .cp-wrap-form { padding: 56px 24px 72px; }
  .cp-form-grid-3 { grid-template-columns: 1fr 1fr; }
  .cp-explainer-row { gap: 16px; }
}

@media (max-width: 640px) {
  body { padding-top: 52px; }
  .cp-nav { height: 52px; padding: 0 20px; }
  .cp-wordmark { font-size: 14px; gap: 10px; }
  .cp-nav-links { gap: 14px; }
  .cp-nav-links a { font-size: 13px; }

  .cp-wrap { padding: 40px 20px 60px; }
  .cp-wrap-form { padding: 40px 20px 60px; }

  .cp-page-header { margin-bottom: 28px; padding-bottom: 18px; }
  .cp-page-h1 { font-size: 28px; }
  .cp-page-sub { font-size: 15px; margin-top: 12px; }

  .cp-form-grid-2,
  .cp-form-grid-3 { grid-template-columns: 1fr; gap: 18px; }
  .cp-fg input, .cp-fg select, .cp-fg textarea { font-size: 16px; }

  .cp-card { padding: 22px 20px; }

  .cp-explainer { gap: 22px; }
  .cp-explainer-row { grid-template-columns: 32px 1fr; gap: 12px; }

  .cp-rights li, .cp-bullets li { grid-template-columns: 14px 1fr; gap: 10px; }

  .cp-fact { padding: 18px 20px; }
  .cp-fact-head { flex-direction: column; gap: 14px; }
  .cp-fact-actions { flex-direction: row; align-self: flex-start; gap: 10px; }
  .cp-fact-resolved { padding-top: 0; }

  .cp-footer { padding: 22px 20px; flex-direction: column; gap: 10px; align-items: flex-start; text-align: left; margin-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
