.pfktool {
  --primary: #2f80ed;
  --cardStart: #ffffff;
  --cardEnd: #eef4ff;
  --success: #1b7f3a;
  --warn: #f59e0b;
  --error: #b00020;

  --controlH: 52px;
  --headToFormGap: 26px;

  position: relative;
  min-height: calc(100vh - 110px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: transparent;

  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  font-size: 15px;
  color: #0f172a;
}

.pfktool,
.pfktool * {
  box-sizing: border-box;
}

#pfkSuchePage {
  overflow-x: hidden;
}
.pfktool-main {
  width: 100%;
}

/* =========================
   CARD + HEADER
   ========================= */

.pfktool-card {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;

  background: linear-gradient(135deg, var(--cardStart), var(--cardEnd));
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
}

.pfktool-head {
  text-align: center;
  margin-bottom: var(--headToFormGap);
}

.pfktool-title {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.1;

  color: #d32f3f;
  text-shadow:
    0 2px 0 rgba(54, 54, 54, 0.08),
    0 10px 22px rgba(49, 49, 49, 0.16);
}

.pfktool-subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #334155;
  opacity: 0.82;
}

/* =========================
   FORM LAYOUT
   ========================= */

.pfktool-form {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pfktool-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.pfktool-row-top {
  flex-wrap: nowrap;
}

.pfktool-row-buttons {
  flex-wrap: wrap;
}

.pfktool-label {
  font-size: 15px;
  font-weight: 650;
  color: #2462b3;
  opacity: 0.9;
  user-select: none;
  white-space: nowrap;
}

.pfktool input,
.pfktool select,
.pfktool button {
  font-family: inherit;
}

/* Inputs */
.pfktool-input {
  height: var(--controlH);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  text-align: center;
  letter-spacing: 0.3px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.06);
}

.pfktool-input-query {
  flex: 1 1 260px;
  min-width: 260px;
  max-width: 460px;
}

.pfktool-select {
  flex: 0 0 280px;
  width: 280px;
  height: var(--controlH);
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.06);
}

/* =========================
   buttons
   ========================= */

.pfktool-btn {
  height: var(--controlH);
  padding: 0 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.15px;
  transition:
    background-color 0.18s ease,
    transform 0.12s ease,
    filter 0.12s ease;
}

.pfktool-btn-primary {
  background: var(--primary);
  color: #fff;
}

.pfktool-btn-primary:hover {
  background-color: #1e5ed7;
  transform: scale(1.02);
}

.pfktool-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.pfktool-btn-reset {
  width: var(--controlH);
  padding: 0;
  background: #4bb161;
  color: #fff;
  font-size: 18px;
  font-weight: 750;
}

.pfktool-btn-reset:hover {
  background-color: #1ed73d;
  transform: scale(1.04);
}

/* =========================
   boxes + result
   ========================= */

.pfktool-box {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.96rem;
  line-height: 1.55;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.pfktool-details {
  margin-top: 10px;
  background: #f5f5f5;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  line-height: 1.55;
  font-size: 0.96rem;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.pfk-ok {
  background: #e6f4ea !important;
  border-left: 6px solid var(--success) !important;
}
.pfk-bad {
  background: #fdecea !important;
  border-left: 6px solid var(--error) !important;
}
.pfk-warn {
  background: #fff7ed !important;
  border-left: 6px solid var(--warn) !important;
}
.pfk-muted {
  background: #f4f6fa !important;
}

.pfk-beruf-row {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.pfk-beruf-left {
  font-weight: 650;
}

.pfk-beruf-status {
  font-weight: 650;
  white-space: nowrap;
}

.pfk-beruf-status.ok {
  color: var(--success);
}
.pfk-beruf-status.bad {
  color: var(--error);
}
.pfk-beruf-status.warn {
  color: #8a5b00;
}

/* =========================
   Key+Value rows
   ========================= */

.pfk-kv-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.pfk-kv-line {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 8px;
  align-items: start;
  line-height: 1.45;
}

.pfk-kv-label {
  font-weight: 650;
  white-space: nowrap;
  opacity: 0.92;
}

.pfk-kv-value {
  font-weight: 650;
  min-width: 0;
}

.pfk-kv-strong {
  font-weight: 650;
}

@media (max-width: 520px) {
  .pfk-kv-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .pfk-kv-label {
    opacity: 0.75;
  }
}

/* =========================
   Umkreis
   ========================= */

#pfkUmkreis .pfk-um-item {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
}

#pfkUmkreis .pfk-um-item-ok {
  background: #e6f4ea;
  border-left: 6px solid var(--success);
}

#pfkUmkreis .pfk-um-item-bad {
  background: #fdecea;
  border-left: 6px solid var(--error);
}

#pfkUmkreis .pfk-um-title {
  font-weight: 800;
  margin-bottom: 8px;
}

#pfkUmkreis .pfk-um-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#pfkUmkreis .pfk-um-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

#pfkUmkreis .pfk-um-chip-other {
  background: #fff7d8;
  border-color: #e1b300;
  color: #7a5b00;
}

#pfkUmkreis .pfk-um-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#pfkUmkreis .pfk-um-line {
  display: grid;
  grid-template-columns: 135px 1fr;
  gap: 8px;
  align-items: start;
  line-height: 1.45;
}

#pfkUmkreis .pfk-um-label {
  font-weight: 650;
  white-space: nowrap;
  opacity: 0.92;
}

#pfkUmkreis .pfk-um-value {
  font-weight: 650;
  min-width: 0;
}

#pfkUmkreis .pfk-um-strong {
  font-weight: 650;
}

#pfkUmkreis .pfk-um-meta {
  font-weight: 600;
  opacity: 0.75;
  margin-left: 8px;
}

#pfkUmkreis .pfk-um-meta-sep {
  font-weight: 600;
  opacity: 0.55;
  margin: 0 6px;
}

@media (max-width: 520px) {
  #pfkUmkreis .pfk-um-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  #pfkUmkreis .pfk-um-label {
    opacity: 0.75;
  }
}

#pfkUmkreis .pfk-um-head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

#pfkUmkreis .pfk-um-meta-right {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

#pfkUmkreis .pfk-um-meta-right .pfk-um-meta {
  margin-left: 0;
}

#pfkUmkreis .pfk-um-title {
  margin-bottom: 0;
}

/* =========================
   helper + loader
   ========================= */

.hidden {
  display: none !important;
}

.pfktool-loader {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pfktool-loader-box {
  background: #fff;
  padding: 22px 26px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.pfktool-spinner {
  width: 38px;
  height: 38px;
  border: 5px solid #e0e0e0;
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  animation: pfk_spin 0.9s linear infinite;
  margin: 0 auto;
}

.pfktool-loader-text {
  margin-top: 10px;
  font-weight: 650;
}

.ms-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 750;
  font-size: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

.ms-muted {
  background: #f4f6fa;
  color: #334155;
}
.ms-green {
  background: #e6f4ea;
  color: #1b7f3a;
}
.ms-red {
  background: #fdecea;
  color: #b00020;
}
.ms-yellow {
  background: #fff7ed;
  color: #8a5b00;
}
.ms-blue {
  background: #eaf2ff;
  color: #1e5ed7;
}
.ms-darkblue {
  background: #e9f0ff;
  color: #0b3d91;
}
.ms-purple {
  background: #f4e8ff;
  color: #6b21a8;
}

@keyframes pfk_spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================
   respo
   ========================= */

@media (max-width: 900px) {
  .pfktool-card {
    padding: 22px;
  }
  .pfktool-title {
    font-size: 26px;
  }

  .pfktool-row {
    flex-wrap: wrap;
  }

  .pfktool-input-query {
    max-width: 100%;
    width: 100%;
  }

  .pfktool-select {
    flex: 1 1 260px;
    width: 100%;
  }
}
