:root {
  --bg: #f3f4f7;
  --card-bg: #ffffff;
  --border: #d0d5dd;
  --border-strong: #b3b9c6;
  --text-main: #111827;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --good: #15803d;
  --bad: #b91c1c;
  --chip-bg: #eef2ff;
  --chip-border: #c7d2fe;
}

/* ===============================
   ISOLATE CPF TOOL ONLY
   =============================== */

.cpf-shell,
.cpf-shell *,
.cpf-shell *::before,
.cpf-shell *::after {
  box-sizing: border-box;
}

/* BODY RESET (SAFE FOR ELEMENTOR) */
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text-main);
}

/* ===============================
   TOOL WRAPPER (MOVED FROM BODY)
   =============================== */

.cpf-shell {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.75rem;
}

/* CARD */

.cpf-card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 2.1rem 2.4rem 2rem;
  margin: 0 auto;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  border: 1px solid rgba(209, 213, 219, 0.9);
}

/* ===============================
   HEADER
   =============================== */

.cpf-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.cpf-header h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.cpf-header p {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* LANGUAGE SWITCHER */

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  font-size: 0.85rem;
}

.lang-switcher span {
  font-size: 0.95rem;
}

.lang-switcher select {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  color: var(--text-main);
}

/* ===============================
   MAIN INPUT
   =============================== */

.cpf-input-wrap {
  position: relative;
  margin-bottom: 1.1rem;
}

.cpf-input {
  width: 100%;
  padding: 0.9rem 2.7rem 0.9rem 0.9rem;
  font-size: 1.03rem;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  outline: none;
  background: #f9fafb;
  text-align: left;
  letter-spacing: 0.12em;
  color: var(--text-main);
}

.cpf-input::placeholder {
  color: #9ca3af;
  letter-spacing: normal;
}

.cpf-input:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.16);
}

.icon-btn {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.2rem 0.4rem;
  color: var(--text-muted);
}

/* ===============================
   OPTIONS
   =============================== */

.cpf-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}

.cpf-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
}

.cpf-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===============================
   EXTRA CONTROLS
   =============================== */

.cpf-extra-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin-bottom: 1.6rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.field-input,
.field-select {
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #f9fafb;
  color: var(--text-main);
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
}

.field-select {
  cursor: pointer;
}

.field-input:focus,
.field-select:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.16);
}

.state-search {
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}

/* ===============================
   BUTTONS
   =============================== */

.cpf-bu
