/* ============================================================
   Perfil Comportamental Corporativo — INAED Design System v5
   Paleta: Azul Escuro #004b90 (dominante 80%+) + Laranja #e15612 (acento)
   Light/Dark Mode · Glassmorphism · Full Width · Mobile-First · WCAG 2.1 AA
   Breakpoints: 320px · 768px · 1024px · 1440px
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Azul Escuro (dominante) */
  --pcc-primary: #004b90;
  --pcc-primary-600: #003a73;
  --pcc-primary-700: #002d5c;
  --pcc-primary-foreground: #ffffff;

  /* Laranja (acento) */
  --pcc-accent: #e15612;
  --pcc-accent-600: #c74a0e;
  --pcc-accent-foreground: #ffffff;

  /* Superfícies */
  --pcc-background: #f4f7fc;
  --pcc-surface: #ffffff;
  --pcc-card: rgba(255, 255, 255, 0.92);
  --pcc-border: rgba(0, 75, 144, 0.16);

  /* Texto */
  --pcc-text: #1a2b3c;
  --pcc-text-muted: #5b6472;

  /* Estados */
  --pcc-danger: #b91c1c;
  --pcc-danger-bg: #fef2f2;
  --pcc-danger-border: #fecaca;
  --pcc-warn: #b45309;
  --pcc-warn-bg: #fffbeb;
  --pcc-warn-border: #fde68a;
  --pcc-ok: #166534;
  --pcc-ok-bg: #f0fdf4;
  --pcc-ok-border: #bbf7d0;

  /* Gradientes lineares (profundidade) */
  --pcc-grad-primary: linear-gradient(135deg, #004b90 0%, #003a73 100%);
  --pcc-grad-primary-deep: linear-gradient(135deg, #003a73 0%, #002d5c 100%);
  --pcc-grad-accent: linear-gradient(135deg, #e15612 0%, #c74a0e 100%);
  --pcc-grad-track: linear-gradient(90deg, #004b90 0%, #e15612 100%);

  /* Glass & sombras */
  --pcc-glass-blur: 12px;
  --pcc-shadow: 0 8px 32px rgba(0, 45, 92, 0.12);
  --pcc-shadow-lg: 0 16px 48px rgba(0, 45, 92, 0.18);
  --pcc-focus-ring: 0 0 0 3px rgba(0, 75, 144, 0.25);

  /* Tipografia & geometria */
  --pcc-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --pcc-radius: 14px;
  --pcc-radius-sm: 10px;
  --pcc-touch: 44px;
}

[data-theme="dark"] {
  --pcc-primary: #3b8fd4;
  --pcc-primary-600: #2b7fd4;
  --pcc-primary-700: #6db3e8;
  --pcc-primary-foreground: #ffffff;

  --pcc-accent: #ff7a3d;
  --pcc-accent-600: #e15612;
  --pcc-accent-foreground: #ffffff;

  --pcc-background: #0a1a2e;
  --pcc-surface: #0f2440;
  --pcc-card: rgba(15, 36, 64, 0.78);
  --pcc-border: rgba(59, 143, 212, 0.22);

  --pcc-text: #f0f5fa;
  --pcc-text-muted: #9db4cc;

  --pcc-danger: #f87171;
  --pcc-danger-bg: rgba(248, 113, 113, 0.15);
  --pcc-danger-border: rgba(248, 113, 113, 0.35);
  --pcc-warn: #fbbf24;
  --pcc-warn-bg: rgba(251, 191, 36, 0.15);
  --pcc-warn-border: rgba(251, 191, 36, 0.35);
  --pcc-ok: #4ade80;
  --pcc-ok-bg: rgba(74, 222, 128, 0.15);
  --pcc-ok-border: rgba(74, 222, 128, 0.35);

  --pcc-grad-primary: linear-gradient(135deg, #004b90 0%, #003a73 100%);
  --pcc-grad-primary-deep: linear-gradient(135deg, #003a73 0%, #002d5c 100%);
  --pcc-grad-accent: linear-gradient(135deg, #e15612 0%, #c74a0e 100%);
  --pcc-grad-track: linear-gradient(90deg, #004b90 0%, #e15612 100%);

  --pcc-glass-blur: 16px;
  --pcc-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --pcc-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
  --pcc-focus-ring: 0 0 0 3px rgba(59, 143, 212, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
}

/* ── Base / Reset ──────────────────────────────────────────── */
#pcc-wrapper,
#pcc-wrapper *,
#pcc-wrapper *::before,
#pcc-wrapper *::after { box-sizing: border-box; }

#pcc-wrapper {
  font-family: var(--pcc-font-sans);
  color: var(--pcc-text);
  line-height: 1.6;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: clamp(16px, 4vw, 64px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#pcc-wrapper h2, #pcc-wrapper h3, #pcc-wrapper h4 {
  margin: 0 0 0.6em;
  line-height: 1.25;
  color: var(--pcc-text);
  letter-spacing: -0.01em;
}

#pcc-wrapper img, #pcc-wrapper svg { max-width: 100%; height: auto; }

/* ── Página standalone (full width, sem tema) ──────────────── */
body.pcc-standalone {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(0, 75, 144, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(225, 86, 18, 0.16) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(0, 75, 144, 0.25) 0%, transparent 60%),
    linear-gradient(160deg, #f4f7fc 0%, #e8eef5 100%);
  background-attachment: fixed;
}

[data-theme="dark"] body.pcc-standalone {
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(0, 75, 144, 0.5) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(225, 86, 18, 0.2) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(0, 75, 144, 0.4) 0%, transparent 60%),
    linear-gradient(160deg, #0a1a2e 0%, #0f2440 100%);
  background-attachment: fixed;
}

/* ── Topbar ────────────────────────────────────────────────── */
#pcc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--pcc-grad-primary);
  color: var(--pcc-primary-foreground);
  border-radius: var(--pcc-radius);
  padding: 18px 22px;
  margin-bottom: 24px;
  box-shadow: var(--pcc-shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#pcc-brand-wrap { display: flex; align-items: center; gap: 14px; min-width: 0; }
#pcc-logo-wrap { flex: 0 0 auto; }
#pcc-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  color: var(--pcc-primary-700);
  font-weight: 800;
  letter-spacing: 1px;
  border-radius: var(--pcc-radius-sm);
  padding: 8px 12px;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
#pcc-header-title-wrap { min-width: 0; }
#pcc-header-kicker {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  font-weight: 600;
}
#pcc-header-title { display: block; font-size: 17px; font-weight: 700; }

#pcc-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--pcc-primary-foreground);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
#pcc-theme-toggle:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-1px); }
#pcc-theme-toggle svg { width: 20px; height: 20px; }

#pcc-wrapper *:focus-visible { outline: none; }

/* ── Cards / Glassmorphism ─────────────────────────────────── */
.pcc-card {
  background: var(--pcc-card);
  border: 1px solid var(--pcc-border);
  border-radius: var(--pcc-radius);
  padding: 28px;
  box-shadow: var(--pcc-shadow);
  -webkit-backdrop-filter: blur(var(--pcc-glass-blur));
  backdrop-filter: blur(var(--pcc-glass-blur));
  margin-bottom: 20px;
}
.pcc-section-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--pcc-primary-700);
  font-weight: 700;
  margin-bottom: 6px;
}
[data-theme="dark"] .pcc-section-label { color: var(--pcc-primary); }
.pcc-section-title { margin: 0 0 10px; font-size: 24px; }
.pcc-intro { color: var(--pcc-text-muted); font-size: 14px; margin: 0 0 20px; }
.pcc-required { color: var(--pcc-danger); }

/* ── Formulário ────────────────────────────────────────────── */
.pcc-field-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.pcc-field { flex: 1 1 220px; display: flex; flex-direction: column; min-width: 0; }
.pcc-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.pcc-field input {
  width: 100%;
  min-height: var(--pcc-touch);
  padding: 11px 14px;
  border: 1px solid var(--pcc-border);
  border-radius: var(--pcc-radius-sm);
  font-size: 14px;
  background: var(--pcc-surface);
  color: var(--pcc-text);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.pcc-field input:focus-visible { border-color: var(--pcc-primary-600); box-shadow: var(--pcc-focus-ring); }

.pcc-lgpd-row { margin: 18px 0; }
.pcc-checkbox-label {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--pcc-text-muted);
  align-items: flex-start;
  cursor: pointer;
}
.pcc-checkbox-label input {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--pcc-accent);
  cursor: pointer;
}
.pcc-checkbox-label input:focus-visible { box-shadow: var(--pcc-focus-ring); }
.pcc-lgpd-link { color: var(--pcc-accent); font-weight: 600; }

.pcc-error-msg {
  background: var(--pcc-danger-bg);
  border: 1px solid var(--pcc-danger-border);
  color: var(--pcc-danger);
  padding: 12px 16px;
  border-radius: var(--pcc-radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

/* ── Botões ────────────────────────────────────────────────── */
.pcc-btn-primary, .pcc-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  border-radius: var(--pcc-radius-sm);
  min-height: var(--pcc-touch);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  text-decoration: none;
}
.pcc-btn-primary {
  background: var(--pcc-grad-primary);
  color: var(--pcc-primary-foreground);
  box-shadow: 0 4px 14px rgba(0, 45, 92, 0.35);
}
.pcc-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 45, 92, 0.45); }
.pcc-btn-secondary {
  background: var(--pcc-surface);
  color: var(--pcc-text);
  border: 1px solid var(--pcc-border);
  box-shadow: 0 2px 6px rgba(0, 45, 92, 0.06);
}
.pcc-btn-secondary:hover { background: var(--pcc-background); transform: translateY(-2px); }
.pcc-btn-primary:disabled, .pcc-btn-secondary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; box-shadow: none; }
.pcc-btn-submit-wrap { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

/* ── Quiz ──────────────────────────────────────────────────── */
.pcc-quiz-header { margin-bottom: 4px; }
.pcc-progress-bar-wrap { display: flex; align-items: center; gap: 12px; margin: 16px 0 24px; }
.pcc-progress-bar-track { flex: 1; background: var(--pcc-border); border-radius: 999px; height: 10px; overflow: hidden; }
.pcc-progress-bar-fill {
  background: var(--pcc-grad-track);
  height: 10px;
  border-radius: 999px;
  transition: width 0.3s ease;
  width: 0%;
}
#pcc-counter-a, #pcc-counter-b { font-size: 13px; font-weight: 700; color: var(--pcc-primary-700); white-space: nowrap; }
[data-theme="dark"] #pcc-counter-a, [data-theme="dark"] #pcc-counter-b { color: var(--pcc-primary); }

.pcc-question { display: none; animation: pccFade 0.25s ease; }
.pcc-question.is-active { display: block; }
@keyframes pccFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pcc-q-number { font-size: 12px; color: var(--pcc-text-muted); text-transform: uppercase; letter-spacing: 1px; margin: 0 0 8px; }
.pcc-q-text { font-size: 17px; font-weight: 600; margin: 0 0 18px; line-height: 1.45; }

.pcc-options { display: grid; gap: 10px; }
.pcc-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border: 1px solid var(--pcc-border);
  border-radius: var(--pcc-radius-sm);
  padding: 14px 16px;
  background: var(--pcc-surface);
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.pcc-opt:hover { border-color: var(--pcc-primary-600); background: var(--pcc-background); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 45, 92, 0.06); }
.pcc-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.pcc-opt-letter {
  flex: 0 0 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pcc-background);
  color: var(--pcc-text-muted);
  font-weight: 700;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.pcc-opt-text { font-size: 14px; color: var(--pcc-text); line-height: 1.45; }
.pcc-opt input:checked + .pcc-opt-letter { background: var(--pcc-grad-primary); color: var(--pcc-primary-foreground); }
.pcc-opt.pcc-opt-checked { border-color: var(--pcc-primary-600); background: var(--pcc-background); box-shadow: 0 0 0 1px var(--pcc-primary-600); }
.pcc-opt:focus-within { box-shadow: var(--pcc-focus-ring); }

.pcc-quiz-nav { display: flex; justify-content: space-between; margin-top: 22px; gap: 12px; }

/* Hooks de navegação (sempre combinados com .pcc-btn-primary / .pcc-btn-secondary) */
.pcc-next-btn, .pcc-prev-btn { white-space: nowrap; }


/* ── Competências ──────────────────────────────────────────── */
.pcc-comp-list { display: grid; gap: 12px; }
.pcc-comp-item {
  border: 1px solid var(--pcc-border);
  border-radius: var(--pcc-radius-sm);
  padding: 16px;
  background: var(--pcc-surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pcc-comp-item.pcc-comp-missing { border-color: var(--pcc-danger); background: var(--pcc-danger-bg); box-shadow: 0 0 0 1px var(--pcc-danger-border); }
.pcc-comp-head { margin-bottom: 10px; }
.pcc-comp-name { display: block; font-size: 15px; font-weight: 600; }
.pcc-comp-def { display: block; font-size: 13px; color: var(--pcc-text-muted); margin-top: 2px; }
.pcc-comp-scale { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.pcc-scale-opt { cursor: pointer; position: relative; }
.pcc-scale-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.pcc-scale-opt span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: var(--pcc-touch);
  min-height: var(--pcc-touch);
  border: 1px solid var(--pcc-border);
  border-radius: var(--pcc-radius-sm);
  font-weight: 700;
  color: var(--pcc-text-muted);
  transition: all 0.15s;
  background: var(--pcc-surface);
}
.pcc-scale-opt:hover span { border-color: var(--pcc-primary-600); background: var(--pcc-background); }
.pcc-scale-opt input:checked + span { background: var(--pcc-grad-primary); color: var(--pcc-primary-foreground); border-color: var(--pcc-primary-700); box-shadow: 0 4px 10px rgba(0, 45, 92, 0.25); }
.pcc-scale-opt:focus-within { box-shadow: var(--pcc-focus-ring); border-radius: var(--pcc-radius-sm); }
.pcc-evidence {
  width: 100%;
  min-height: var(--pcc-touch);
  padding: 9px 12px;
  border: 1px solid var(--pcc-border);
  border-radius: var(--pcc-radius-sm);
  font-size: 13px;
  color: var(--pcc-text);
  background: var(--pcc-surface);
}
.pcc-evidence:focus-visible { border-color: var(--pcc-primary-600); box-shadow: var(--pcc-focus-ring); }

/* ── Resultado ─────────────────────────────────────────────── */
.pcc-result-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.pcc-hero-card {
  background: var(--pcc-grad-primary);
  color: var(--pcc-primary-foreground);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--pcc-radius);
  padding: 18px;
  text-align: center;
  box-shadow: var(--pcc-shadow);
}
.pcc-hero-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255, 255, 255, 0.85); margin-bottom: 8px; font-weight: 600; }
.pcc-hero-value { display: block; font-size: 20px; font-weight: 800; line-height: 1.2; }

.pcc-result-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.pcc-metric { background: var(--pcc-surface); border: 1px solid var(--pcc-border); border-radius: var(--pcc-radius); padding: 16px; text-align: center; box-shadow: var(--pcc-shadow); }
.pcc-metric-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--pcc-text-muted); margin-bottom: 8px; font-weight: 600; }
.pcc-metric-value { display: block; font-size: 22px; font-weight: 800; color: var(--pcc-text); line-height: 1.2; }
.pcc-metric-sm { font-size: 14px; font-weight: 600; line-height: 1.4; }

.pcc-status-row { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.pcc-status-pill {
  border: 1px solid var(--pcc-border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  background: var(--pcc-surface);
}
.pcc-status-pill.pcc-status-ok { color: var(--pcc-ok); background: var(--pcc-ok-bg); border-color: var(--pcc-ok-border); }
.pcc-status-pill.pcc-status-warn { color: var(--pcc-warn); background: var(--pcc-warn-bg); border-color: var(--pcc-warn-border); }
.pcc-status-pill.pcc-status-danger { color: var(--pcc-danger); background: var(--pcc-danger-bg); border-color: var(--pcc-danger-border); }

.pcc-table-block { margin-bottom: 24px; }
.pcc-block-title { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; color: var(--pcc-text); margin: 0 0 12px; font-weight: 700; }
.pcc-table-wrap { width: 100%; overflow-x: auto; border-radius: var(--pcc-radius-sm); border: 1px solid var(--pcc-border); -webkit-overflow-scrolling: touch; }
.pcc-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.pcc-table th { background: var(--pcc-grad-primary); color: var(--pcc-primary-foreground); text-align: left; padding: 12px 14px; font-weight: 600; }
.pcc-table th:first-child { border-radius: 8px 0 0 0; }
.pcc-table th:last-child { border-radius: 0 8px 0 0; }
.pcc-table td { padding: 12px 14px; border-bottom: 1px solid var(--pcc-border); color: var(--pcc-text); vertical-align: top; }
.pcc-table tr:nth-child(even) td { background: var(--pcc-background); }
.pcc-table tr:last-child td { border-bottom: none; }

.pcc-insight-block { margin-bottom: 24px; }
.pcc-insight-box {
  background: var(--pcc-background);
  border-left: 4px solid var(--pcc-accent);
  padding: 18px 20px;
  border-radius: 0 var(--pcc-radius-sm) var(--pcc-radius-sm) 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--pcc-text);
}
.pcc-recs-block { margin-bottom: 24px; }
.pcc-recs-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.8; }
.pcc-recs-list li { margin-bottom: 6px; }

.pcc-result-cta {
  background: var(--pcc-background);
  border: 1px solid var(--pcc-border);
  border-radius: var(--pcc-radius);
  padding: 20px;
  text-align: center;
  margin-top: 24px;
}
.pcc-result-cta p { margin: 0 0 14px; font-size: 14px; color: var(--pcc-text-muted); }

/* ── Loading ───────────────────────────────────────────────── */
.pcc-loading { text-align: center; padding: 40px 0; }
.pcc-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  border: 4px solid var(--pcc-border);
  border-top-color: var(--pcc-accent);
  border-radius: 50%;
  animation: pccSpin 0.8s linear infinite;
}
@keyframes pccSpin { to { transform: rotate(360deg); } }

.pcc-footer { text-align: center; color: var(--pcc-text-muted); font-size: 12px; margin-top: 28px; }

/* ── Responsivo (Mobile-First) ─────────────────────────────── */
/* Base = mobile (320px+). Ajustes progressivos abaixo. */

/* ≤ 767px — smartphones */
@media (max-width: 767px) {
  #pcc-topbar { flex-wrap: wrap; padding: 16px; }
  #pcc-brand-wrap { flex: 1 1 auto; }
  #pcc-header-title { font-size: 15px; }
  .pcc-card { padding: 20px; }
  .pcc-section-title { font-size: 21px; }
  .pcc-field-row { flex-direction: column; gap: 12px; }
  .pcc-field { min-width: 100%; }
  .pcc-q-text { font-size: 16px; }
  .pcc-opt { padding: 12px; gap: 10px; }
  .pcc-opt-letter { flex-basis: 28px; height: 28px; font-size: 12px; }
  .pcc-quiz-nav { flex-direction: column; }
  .pcc-quiz-nav .pcc-btn-primary, .pcc-quiz-nav .pcc-btn-secondary { width: 100%; justify-content: center; }
  .pcc-btn-submit-wrap { flex-direction: column; }
  .pcc-btn-submit-wrap .pcc-btn-primary, .pcc-btn-submit-wrap .pcc-btn-secondary { width: 100%; justify-content: center; }
  .pcc-table-wrap { border-radius: 0; border: none; }
  .pcc-table { min-width: 100%; }
  .pcc-table th, .pcc-table td { padding: 10px 12px; font-size: 12px; }
  .pcc-status-row { flex-direction: column; }
  .pcc-status-pill { width: 100%; text-align: center; }
  .pcc-hero-value { font-size: 18px; }
  .pcc-metric-value { font-size: 20px; }
}

/* ≤ 374px — telas muito pequenas */
@media (max-width: 374px) {
  #pcc-wrapper { padding: 12px; }
  #pcc-topbar { padding: 12px; gap: 8px; }
  #pcc-logo { padding: 6px 9px; font-size: 13px; }
  #pcc-header-title { font-size: 13px; }
  #pcc-header-kicker { font-size: 10px; }
  .pcc-card { padding: 16px; }
  .pcc-scale-opt span { width: 38px; height: 38px; min-width: 38px; min-height: 38px; }
  .pcc-comp-scale { gap: 6px; }
  .pcc-opt-text { font-size: 13px; }
  .pcc-btn-primary, .pcc-btn-secondary { padding: 10px 16px; font-size: 13px; }
}

/* ≥ 768px — tablets */
@media (min-width: 768px) {
  .pcc-result-hero, .pcc-result-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* ≥ 1024px — desktop */
@media (min-width: 1024px) {
  .pcc-result-hero, .pcc-result-metrics { grid-template-columns: repeat(3, 1fr); }
  .pcc-section-title { font-size: 26px; }
}

/* ≥ 1440px — telas grandes */
@media (min-width: 1440px) {
  #pcc-wrapper { padding: 40px clamp(64px, 8vw, 120px) 64px; }
  .pcc-card { padding: 36px; }
}

/* ── Acessibilidade: reduz movimento ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #pcc-wrapper *, #pcc-wrapper *::before, #pcc-wrapper *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}


/* ============================================================
   v6 — Stepper, ícones SVG, gráficos e gradientes adicionais
   ============================================================ */

/* ── Logo hexagonal ── */
#pcc-logo { display: inline-flex; align-items: center; gap: 8px; }
.pcc-logo-svg { width: 20px; height: 20px; flex: 0 0 auto; }

/* ── Stepper de etapas ── */
#pcc-stepper { margin-bottom: 24px; }
#pcc-stepper ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pcc-step {
  flex: 1 1 0;
  min-width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  text-align: center;
}
.pcc-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  background: var(--pcc-border);
}
.pcc-step-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--pcc-surface);
  color: var(--pcc-text-muted);
  border: 2px solid var(--pcc-border);
  position: relative;
  z-index: 1;
  transition: all 0.2s;
}
.pcc-step-label {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--pcc-text-muted);
  white-space: nowrap;
}
.pcc-step.is-active .pcc-step-dot {
  background: var(--pcc-grad-primary);
  color: var(--pcc-primary-foreground);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(0, 45, 92, 0.3);
}
.pcc-step.is-active .pcc-step-label { color: var(--pcc-primary-700); }
[data-theme="dark"] .pcc-step.is-active .pcc-step-label { color: var(--pcc-primary); }
.pcc-step.is-done .pcc-step-dot {
  background: var(--pcc-grad-accent);
  color: var(--pcc-accent-foreground);
  border-color: transparent;
}
.pcc-step.is-done:not(:last-child)::after { background: var(--pcc-grad-track); }

/* ── Ícones de seção / bloco ── */
.pcc-section-label { display: inline-flex; align-items: center; gap: 8px; }
.pcc-label-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.pcc-block-title { display: inline-flex; align-items: center; gap: 8px; }
.pcc-block-icon { width: 18px; height: 18px; flex: 0 0 auto; color: var(--pcc-accent); }

/* ── Gradiente de destaque no topo dos cards ── */
.pcc-card { position: relative; overflow: hidden; }
.pcc-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--pcc-grad-track);
}

/* ── Gráficos SVG ── */
.pcc-charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .pcc-charts-grid { grid-template-columns: 1fr 1fr; }
}
.pcc-chart-card {
  background: var(--pcc-surface);
  border: 1px solid var(--pcc-border);
  border-radius: var(--pcc-radius);
  padding: 20px;
  box-shadow: var(--pcc-shadow);
}
.pcc-chart { width: 100%; }
.pcc-chart-center { display: flex; justify-content: center; align-items: center; }
.pcc-chart-svg { width: 100%; height: auto; }
.pcc-chart-label { font-size: 12px; font-weight: 600; fill: var(--pcc-text); }
.pcc-chart-value { font-size: 12px; font-weight: 700; fill: var(--pcc-text-muted); }
.pcc-chart-track { fill: var(--pcc-border); }
.pcc-chart-fill { fill: url(#pccGradBar); }

.pcc-donut-svg { width: 160px; height: 160px; }
.pcc-donut-track { fill: none; stroke: var(--pcc-border); stroke-width: 12; }
.pcc-donut-arc {
  fill: none;
  stroke: url(#pccGradDonut);
  stroke-width: 12;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.8s ease;
}
.pcc-donut-value {
  font-size: 22px;
  font-weight: 800;
  fill: var(--pcc-text);
  text-anchor: middle;
  dominant-baseline: central;
}

/* ── Footer com gradiente ── */
.pcc-footer {
  background: var(--pcc-grad-primary-deep);
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--pcc-radius);
  padding: 20px;
  margin-top: 28px;
  text-align: center;
  font-size: 12px;
}
.pcc-footer p { margin: 0; color: rgba(255, 255, 255, 0.85); }

/* ── Barra de progresso com brilho ── */
.pcc-progress-bar-fill {
  background: var(--pcc-grad-track);
  position: relative;
  overflow: hidden;
}
.pcc-progress-bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: pccShimmer 1.6s linear infinite;
}
@keyframes pccShimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .pcc-progress-bar-fill::after { animation: none; }
}


/* ============================================================
   v7 — Formulário: selects, seções e informações da aplicação
   ============================================================ */

/* ── Selects com a mesma altura dos inputs ── */
.pcc-field select {
  width: 100%;
  min-height: var(--pcc-touch);
  padding: 11px 14px;
  border: 1px solid var(--pcc-border);
  border-radius: var(--pcc-radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--pcc-surface);
  color: var(--pcc-text);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6472' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.pcc-field select:focus-visible {
  border-color: var(--pcc-primary-600);
  box-shadow: var(--pcc-focus-ring);
  outline: none;
}
.pcc-field select:invalid { color: var(--pcc-text-muted); }
.pcc-field select option { color: var(--pcc-text); }

/* ── Seções do formulário ── */
.pcc-form-section {
  margin-bottom: 24px;
  padding-bottom: 4px;
}
.pcc-form-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--pcc-text);
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--pcc-border);
  width: 100%;
}
.pcc-form-section-title .pcc-block-icon { color: var(--pcc-accent); }

/* ── Seção de informações (somente leitura) ── */
.pcc-form-section-info {
  background: var(--pcc-background);
  border: 1px solid var(--pcc-border);
  border-radius: var(--pcc-radius);
  padding: 20px;
}
[data-theme="dark"] .pcc-form-section-info { background: rgba(15, 36, 64, 0.5); }
.pcc-form-section-info .pcc-form-section-title { border-bottom-color: var(--pcc-border); }

.pcc-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .pcc-info-grid { grid-template-columns: 1fr 1fr; }
}
.pcc-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--pcc-surface);
  border: 1px solid var(--pcc-border);
  border-radius: var(--pcc-radius-sm);
  padding: 14px 16px;
}
.pcc-info-label {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--pcc-text-muted);
}
.pcc-info-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--pcc-text);
}
.pcc-info-value .pcc-info-icon { color: var(--pcc-accent); }


/* ============================================================
   v8 — Logo INAED (imagem) + campo E-mail em largura total
   ============================================================ */

/* ── Logo INAED (imagem enviada) — vidro fosco com relevo ── */
#pcc-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.55) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--pcc-radius-sm);
  padding: 8px 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -1px 0 rgba(0, 45, 92, 0.08),
    0 4px 14px rgba(0, 45, 92, 0.22);
  line-height: 0;
}
#pcc-wrapper .pcc-logo-img {
  display: block;
  height: 40px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
@media (max-width: 767px) {
  #pcc-wrapper .pcc-logo-img { height: 34px; }
}
@media (max-width: 374px) {
  #pcc-wrapper .pcc-logo-img { height: 28px; }
}

/* ── Campo E-mail em largura total ── */
.pcc-field-row-full { flex-wrap: nowrap; }
.pcc-field-full { flex: 1 1 100%; min-width: 100%; }


/* ============================================================
   v1.4 — Resultado Inicial + processamento + curiosidade
   ============================================================ */
body.pcc-processing-open { overflow: hidden; }
.pcc-processing-overlay { position:fixed; inset:0; z-index:999999; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(2,24,48,.72); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); opacity:0; visibility:hidden; transition:opacity .25s ease,visibility .25s ease; }
.pcc-processing-overlay.is-visible { opacity:1; visibility:visible; }
.pcc-processing-modal { position:relative; overflow:hidden; width:min(540px,100%); background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(245,249,255,.96)); border:1px solid rgba(255,255,255,.7); border-radius:24px; padding:42px 36px 30px; box-shadow:0 30px 80px rgba(0,30,65,.35); text-align:center; color:#1a2b3c; }
[data-theme="dark"] .pcc-processing-modal { background:linear-gradient(145deg,rgba(15,36,64,.98),rgba(6,25,47,.98)); color:#f0f5fa; border-color:rgba(59,143,212,.28); }
.pcc-processing-progress { position:absolute; top:0; left:0; right:0; height:7px; background:rgba(0,75,144,.10); }
.pcc-processing-progress span { display:block; height:100%; width:8%; background:var(--pcc-grad-track); transition:width .5s ease; box-shadow:0 0 20px rgba(225,86,18,.35); }
.pcc-processing-visual { width:92px; height:92px; margin:0 auto 18px; position:relative; display:grid; place-items:center; }
.pcc-processing-ring { position:absolute; inset:4px; border:4px solid rgba(0,75,144,.12); border-top-color:#004b90; border-right-color:#e15612; border-radius:50%; animation:pccProcessingSpin 1.15s linear infinite; }
.pcc-processing-core { width:58px; height:58px; border-radius:18px; display:grid; place-items:center; color:#fff; font-size:24px; background:var(--pcc-grad-primary); box-shadow:0 10px 30px rgba(0,75,144,.25); animation:pccProcessingPulse 1.6s ease-in-out infinite; }
.pcc-processing-kicker,.pcc-result-eyebrow,.pcc-card-kicker { display:block; font-size:11px; font-weight:800; letter-spacing:.10em; text-transform:uppercase; color:var(--pcc-primary); }
.pcc-processing-modal h2 { margin:8px 0 10px; font-size:clamp(22px,4vw,30px); line-height:1.15; }
.pcc-processing-modal > p { margin:0 auto 22px; max-width:440px; color:#5b6472; line-height:1.65; }
[data-theme="dark"] .pcc-processing-modal > p { color:#9db4cc; }
.pcc-processing-footer { display:flex; align-items:center; justify-content:center; gap:12px; padding-top:18px; border-top:1px solid rgba(0,75,144,.12); font-size:12px; color:#5b6472; }
.pcc-processing-footer #pcc-processing-percent { font-size:18px; font-weight:900; color:#004b90; min-width:48px; }
@keyframes pccProcessingSpin { to { transform:rotate(360deg); } }
@keyframes pccProcessingPulse { 50% { transform:scale(1.06); box-shadow:0 14px 36px rgba(225,86,18,.22); } }

.pcc-result-ready { text-align:center; max-width:760px; margin:0 auto 28px; }
.pcc-result-ready .pcc-section-label { justify-content:center; }
.pcc-result-ready p { color:var(--pcc-text-muted); margin:0; }
.pcc-result-focus { position:relative; overflow:hidden; padding:clamp(28px,5vw,48px); border-radius:22px; margin-bottom:20px; }
.pcc-result-focus-primary { background:var(--pcc-grad-primary-deep); color:#fff; box-shadow:var(--pcc-shadow-lg); }
.pcc-result-focus-primary:after { content:""; position:absolute; width:220px; height:220px; border-radius:50%; right:-70px; top:-90px; background:radial-gradient(circle,rgba(225,86,18,.36),transparent 68%); }
.pcc-result-focus .pcc-result-eyebrow { color:rgba(255,255,255,.72); }
.pcc-result-profile { position:relative; z-index:1; display:block; margin:7px 0 4px; font-size:clamp(38px,7vw,68px); line-height:1; letter-spacing:-.04em; }
.pcc-result-keywords { position:relative; z-index:1; display:block; color:#ffb58f; font-weight:700; font-size:clamp(14px,2.4vw,18px); }
.pcc-result-focus p { position:relative; z-index:1; max-width:720px; margin:18px 0 0; color:rgba(255,255,255,.88); font-size:15px; }
.pcc-result-grid-two { display:grid; grid-template-columns:1fr; gap:16px; margin:16px 0; }
@media(min-width:768px){ .pcc-result-grid-two{grid-template-columns:1fr 1fr;} }
.pcc-teaser-card,.pcc-insight-preview,.pcc-competence-preview,.pcc-locked-section,.pcc-value-cta { background:var(--pcc-surface); border:1px solid var(--pcc-border); border-radius:18px; box-shadow:var(--pcc-shadow); }
.pcc-teaser-card,.pcc-insight-preview { padding:24px; }
.pcc-teaser-card h3,.pcc-insight-preview h3 { margin:8px 0 10px; font-size:23px; color:var(--pcc-text); }
.pcc-teaser-card h3 small { font-size:13px; color:var(--pcc-accent); white-space:nowrap; }
.pcc-teaser-card p,.pcc-insight-preview p { margin:0; color:var(--pcc-text-muted); }
.pcc-text-action { margin-top:16px; border:0; padding:0; background:transparent; color:var(--pcc-primary); font:inherit; font-weight:800; cursor:pointer; }
.pcc-text-action:hover { color:var(--pcc-accent); }
.pcc-competence-preview { display:grid; grid-template-columns:1fr; gap:20px; padding:26px; margin:16px 0; }
@media(min-width:900px){ .pcc-competence-preview{grid-template-columns:180px 1fr;}.pcc-locked-competencies{grid-column:1/-1;} }
.pcc-score { display:flex; align-items:flex-end; gap:6px; margin-top:4px; }
.pcc-score strong { font-size:44px; line-height:1; color:var(--pcc-primary); }
.pcc-score span { color:var(--pcc-text-muted); font-weight:700; padding-bottom:5px; }
.pcc-competence-copy p { margin:0 0 8px; color:var(--pcc-text-muted); }
.pcc-competence-copy strong { color:var(--pcc-text); }
.pcc-locked-competencies { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; }
.pcc-locked-comp { display:flex; align-items:center; gap:9px; padding:12px 14px; border-radius:12px; border:1px dashed var(--pcc-border); background:var(--pcc-background); filter:saturate(.72); }
.pcc-locked-comp strong { font-size:13px; color:var(--pcc-text-muted); }
.pcc-locked-comp.is-positive { border-style:solid; color:var(--pcc-ok); }
.pcc-positive { border-top:4px solid #18845a; }
.pcc-attention { border-top:4px solid var(--pcc-accent); }
.pcc-more-hint { display:inline-block; margin-top:14px; color:var(--pcc-primary); font-weight:800; font-size:13px; }
.pcc-locked-section { padding:clamp(24px,5vw,38px); margin:22px 0; overflow:hidden; }
.pcc-locked-heading { max-width:760px; margin-bottom:22px; }
.pcc-locked-heading h3 { font-size:clamp(23px,4vw,32px); margin:7px 0 8px; }
.pcc-locked-heading p { margin:0; color:var(--pcc-text-muted); }
.pcc-diagnostic-map { display:grid; grid-template-columns:1fr; gap:10px; }
@media(min-width:768px){ .pcc-diagnostic-map{grid-template-columns:1fr 1fr;} }
.pcc-map-item { position:relative; display:flex; gap:12px; align-items:center; min-height:72px; padding:14px 16px; border-radius:13px; border:1px solid var(--pcc-border); background:var(--pcc-background); }
.pcc-map-item > span { flex:0 0 28px; width:28px; height:28px; display:grid; place-items:center; border-radius:9px; background:var(--pcc-surface); font-weight:900; }
.pcc-map-item strong,.pcc-map-item small { display:block; }
.pcc-map-item strong { font-size:14px; }
.pcc-map-item small { margin-top:2px; color:var(--pcc-text-muted); font-size:11px; }
.pcc-map-item.is-open > span { color:#fff; background:#18845a; }
.pcc-map-item.is-locked { overflow:hidden; }
.pcc-map-item.is-locked:after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(90deg,transparent 55%,rgba(255,255,255,.34)); backdrop-filter:blur(.7px); }
[data-theme="dark"] .pcc-map-item.is-locked:after { background:linear-gradient(90deg,transparent 55%,rgba(15,36,64,.36)); }
.pcc-value-cta { display:grid; gap:18px; align-items:center; padding:clamp(24px,5vw,36px); background:linear-gradient(135deg,rgba(0,75,144,.08),rgba(225,86,18,.07)); }
@media(min-width:900px){ .pcc-value-cta{grid-template-columns:54px 1fr auto;} }
.pcc-value-icon { width:50px; height:50px; border-radius:15px; display:grid; place-items:center; color:#fff; background:var(--pcc-grad-track); font-size:22px; box-shadow:0 8px 22px rgba(0,75,144,.18); }
.pcc-value-cta h3 { margin:0 0 6px; font-size:22px; }
.pcc-value-cta p { margin:0; color:var(--pcc-text-muted); }
.pcc-value-cta .pcc-btn-primary { text-decoration:none; white-space:nowrap; }
@media(max-width:520px){ .pcc-processing-modal{padding:38px 20px 24px}.pcc-processing-footer{align-items:flex-start;text-align:left}.pcc-result-focus,.pcc-teaser-card,.pcc-insight-preview,.pcc-competence-preview,.pcc-locked-section,.pcc-value-cta{border-radius:14px;} }
@media(prefers-reduced-motion:reduce){ .pcc-processing-ring,.pcc-processing-core{animation:none;} }
