/* Elektro-Prüfprotokoll — dark wizard UI (readable on dark page backgrounds) */

.epp-root--dark {
  --epp-label: rgba(255, 255, 255, 0.93);
  --epp-label-muted: rgba(255, 255, 255, 0.56);
  --epp-electric: #3de1ff;
  --epp-electric-dim: rgba(61, 225, 255, 0.35);
  --epp-violet: #9d7aff;
  --epp-surface: rgba(18, 22, 34, 0.74);
  --epp-surface-2: rgba(26, 32, 48, 0.9);
  --epp-border: rgba(255, 255, 255, 0.1);
  --epp-border-strong: rgba(255, 255, 255, 0.2);
  --epp-input-bg: rgba(10, 12, 22, 0.92);
  --epp-input-text: #f2f6ff;
  --epp-glow: 0 0 36px rgba(61, 225, 255, 0.1);
  --epp-radius: 18px;
  --epp-radius-sm: 12px;
  --epp-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.epp-root {
  font-family: var(--epp-font, system-ui, sans-serif);
  font-size: 16px;
  color: var(--epp-label, #1a2230);
  max-width: 920px;
  margin: 0 auto 48px auto;
  position: relative;
}

.epp-root * {
  box-sizing: border-box;
}

.epp-draft-banner.is-hidden,
.epp-step[hidden],
.is-hidden {
  display: none !important;
}

/* Full-form busy layer (submit, cloud drafts) */
.epp-busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 100020;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 18, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.epp-busy-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(61, 225, 255, 0.25);
  border-top-color: var(--epp-electric, #3de1ff);
  animation: epp-spin 0.75s linear infinite;
}

@keyframes epp-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Thank-you dialog */
.epp-modal {
  position: fixed;
  inset: 0;
  z-index: 100030;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.epp-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 16, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  font: inherit;
  color: transparent;
  appearance: none;
  -webkit-appearance: none;
}

.epp-modal__panel {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: 100%;
  padding: 28px 24px;
  border-radius: var(--epp-radius, 18px);
  background: var(--epp-surface-2, rgba(26, 32, 48, 0.96));
  border: 1px solid var(--epp-border-strong, rgba(255, 255, 255, 0.2));
  box-shadow: var(--epp-glow, 0 0 36px rgba(61, 225, 255, 0.1));
  text-align: center;
}

.epp-modal__title {
  margin: 0 0 12px 0;
  font-size: 1.35rem;
  font-weight: 650;
  color: var(--epp-label, #fff);
}

.epp-modal__text {
  margin: 0 0 22px 0;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--epp-label-muted, rgba(255, 255, 255, 0.72));
}

.epp-draft-banner {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.16), rgba(255, 152, 0, 0.09));
  border: 1px solid rgba(255, 206, 86, 0.42);
  border-radius: var(--epp-radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
  display: grid;
  gap: 12px;
  color: rgba(255, 248, 220, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.epp-draft-banner button {
  color: inherit;
}

/* Cloud drafts (logged-in) */
.epp-cloud-bar {
  background: rgba(61, 225, 255, 0.08);
  border: 1px solid rgba(61, 225, 255, 0.22);
  border-radius: var(--epp-radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
  display: grid;
  gap: 12px;
  color: var(--epp-label);
}

.epp-cloud-hint {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--epp-label-muted);
}

.epp-cloud-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.epp-cloud-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 200px;
  min-width: 0;
}

.epp-draft-select {
  width: 100%;
}

.epp-cloud-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 100%;
}

.epp-cloud-status {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.9rem;
  color: var(--epp-electric);
}

/* Per-step test autofill row */
.epp-step-tools {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px dashed var(--epp-border);
}

.epp-shell {
  background: linear-gradient(150deg, var(--epp-surface), var(--epp-surface-2));
  border: 1px solid var(--epp-border);
  border-radius: var(--epp-radius);
  padding: clamp(16px, 3.5vw, 30px);
  box-shadow:
    var(--epp-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 28px 56px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.epp-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 50% at 0% 0%, var(--epp-electric-dim), transparent 55%),
    radial-gradient(ellipse 50% 45% at 100% 8%, rgba(157, 122, 255, 0.14), transparent 55%);
  pointer-events: none;
}

.epp-shell > * {
  position: relative;
  z-index: 1;
}

.epp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px 24px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--epp-border);
}

.epp-toolbar-extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.epp-cloud-draft-list-hint {
  flex: 1 1 100%;
  margin: -4px 0 4px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--epp-label-muted);
}

/* Wizard */
.epp-wizard {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  flex: 1 1 280px;
  min-width: 0;
}

.epp-wizard-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 6px 4px;
  min-width: 72px;
  flex: 0 1 auto;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.epp-wizard-ring {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.38);
  border: 2px solid var(--epp-border-strong);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35);
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.epp-wizard-num {
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--epp-label-muted);
  transition: color 0.3s ease;
}

.epp-wizard-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 104px;
}

.epp-wizard-step-line {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--epp-label);
  line-height: 1.2;
}

.epp-wizard-caption {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--epp-label-muted);
  line-height: 1.2;
}

.epp-wizard-node.is-complete .epp-wizard-ring {
  border-color: rgba(61, 225, 255, 0.5);
  background: linear-gradient(150deg, rgba(61, 225, 255, 0.12), rgba(0, 0, 0, 0.42));
}

.epp-wizard-node.is-complete .epp-wizard-num {
  color: var(--epp-electric);
}

.epp-wizard-node.is-active {
  transform: translateY(-3px);
}

.epp-wizard-node.is-active .epp-wizard-ring {
  border-color: var(--epp-electric);
  box-shadow:
    0 0 0 3px var(--epp-electric-dim),
    0 0 26px rgba(61, 225, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  background: linear-gradient(165deg, rgba(61, 225, 255, 0.2), rgba(157, 122, 255, 0.1));
}

.epp-wizard-node.is-active .epp-wizard-num {
  color: #fff;
  text-shadow: 0 0 14px var(--epp-electric);
}

.epp-wizard-node.is-active .epp-wizard-caption {
  color: var(--epp-electric);
}

.epp-wizard-connector {
  flex: 1 1 12px;
  min-width: 8px;
  max-width: 52px;
  align-self: center;
  height: 3px;
  margin: 0 3px;
  margin-top: -38px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--epp-border-strong), var(--epp-border));
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.epp-wizard-connector.is-complete {
  background: linear-gradient(90deg, var(--epp-electric), rgba(61, 225, 255, 0.35));
  box-shadow: 0 0 14px rgba(61, 225, 255, 0.35);
}

@media (max-width: 720px) {
  .epp-wizard {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  }

  .epp-wizard-node {
    scroll-snap-align: center;
    flex: 0 0 auto;
  }

  .epp-wizard-connector {
    flex: 0 0 18px;
    min-width: 18px;
    max-width: 28px;
    margin-top: 0;
    align-self: flex-start;
    margin-top: 24px;
  }

  .epp-wizard-text {
    max-width: 78px;
  }

  .epp-wizard-step-line {
    font-size: 0.66rem;
  }

  .epp-wizard-caption {
    font-size: 0.64rem;
  }
}

/* Language */
.epp-lang {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid var(--epp-border);
  flex-shrink: 0;
}

.epp-lang-btn {
  padding: 10px 18px;
  min-height: 44px;
  min-width: 52px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--epp-label-muted);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.epp-lang-btn.is-active {
  background: linear-gradient(135deg, var(--epp-electric), #5eb0ff);
  color: #071018;
  box-shadow: 0 4px 18px rgba(61, 225, 255, 0.35);
}

/* Messages */
.epp-msg {
  padding: 12px 16px;
  border-radius: var(--epp-radius-sm);
  margin-bottom: 12px;
  font-weight: 500;
}

.epp-msg--error {
  background: rgba(244, 67, 54, 0.12);
  border: 1px solid rgba(244, 67, 54, 0.42);
  color: #ffc9c9;
}

.epp-msg--success {
  background: rgba(76, 175, 80, 0.12);
  border: 1px solid rgba(129, 199, 132, 0.42);
  color: #c5f5c7;
}

.epp-form {
  color: var(--epp-label);
}

.epp-step-title {
  margin: 6px 0 22px 0;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 0 48px var(--epp-electric-dim);
}

.epp-step-title .epp-lbl {
  color: inherit;
}

.epp-subtitle {
  margin: 26px 0 14px 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--epp-label-muted);
}

.epp-field,
.epp-toggle-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 600;
  color: var(--epp-label);
}

.epp-root--dark legend {
  color: var(--epp-label);
}

.epp-lbl {
  color: inherit;
}

.epp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.ep-span-2 {
  grid-column: 1 / -1;
}

.epp-input,
.epp-input-table {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--epp-radius-sm);
  border: 1px solid var(--epp-border-strong);
  font-size: 16px;
  min-height: 48px;
  background: var(--epp-input-bg);
  color: var(--epp-input-text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.epp-input::placeholder,
.epp-input-table::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.epp-input:focus,
.epp-input-table:focus {
  outline: none;
  border-color: var(--epp-electric);
  box-shadow: 0 0 0 3px var(--epp-electric-dim);
}

textarea.epp-input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.epp-input[readonly] {
  opacity: 0.88;
  border-style: dashed;
}

.epp-root--dark .epp-check,
.epp-root--dark .epp-check-big,
.epp-root--dark .epp-radio,
.epp-root--dark .epp-radio-big {
  color: var(--epp-label);
}

.epp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.epp-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.epp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.epp-check {
  padding: 10px 12px;
  border-radius: var(--epp-radius-sm);
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.22);
  transition: border-color 0.2s ease;
}

.epp-check:hover {
  border-color: var(--epp-border-strong);
}

.epp-check input {
  accent-color: var(--epp-electric);
  width: 20px;
  height: 20px;
}

.epp-radio input {
  accent-color: var(--epp-electric);
}

.epp-radio-big {
  padding: 12px 14px;
  border-radius: var(--epp-radius-sm);
  border: 1px solid var(--epp-border);
  background: rgba(0, 0, 0, 0.2);
}

.epp-toggle-table {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.epp-toggle-row {
  border: 1px solid var(--epp-border);
  border-radius: var(--epp-radius-sm);
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.24);
}

.epp-toggle-row legend {
  margin-bottom: 10px;
  font-size: 0.93rem;
  line-height: 1.38;
}

.epp-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--epp-border);
  margin: 4px 6px 4px 0;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.87rem;
  color: var(--epp-label);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.epp-pill:has(input:checked) {
  border-color: var(--epp-electric);
  background: rgba(61, 225, 255, 0.08);
}

.epp-pill-na {
  opacity: 0.88;
}

.epp-pill input[type='radio'] {
  accent-color: var(--epp-electric);
  width: 18px;
  height: 18px;
}

.epp-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--epp-radius-sm);
  border: 1px solid var(--epp-border);
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.28);
}

.epp-measure-table {
  width: max(840px, 100%);
  border-collapse: collapse;
  font-size: 13px;
}

.epp-measure-table th,
.epp-measure-table td {
  padding: 10px;
  border: 1px solid var(--epp-border);
  vertical-align: middle;
}

.epp-measure-table th {
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  background: rgba(61, 225, 255, 0.07);
  color: var(--epp-label);
  white-space: nowrap;
}

.epp-measure-table .epp-lbl {
  color: var(--epp-label);
  font-weight: 600;
}

.col-action {
  width: 56px;
  text-align: center;
}

.epp-remove-row {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: var(--epp-radius-sm);
  border: 1px solid rgba(244, 67, 54, 0.45);
  background: rgba(244, 67, 54, 0.12);
  color: #ffabab;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.epp-remove-row:active {
  transform: scale(0.95);
}

.epp-actions-row {
  margin: 12px 0 20px 0;
}

.epp-fieldset {
  border: 1px solid var(--epp-border);
  border-radius: var(--epp-radius-sm);
  padding: 16px 18px;
  margin: 18px 0;
  background: rgba(0, 0, 0, 0.2);
}

.epp-fieldset legend {
  padding: 0 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.epp-step {
  animation: epp-enter 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes epp-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.epp-sign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.epp-sign-title {
  font-weight: 600;
  color: var(--epp-label);
  margin-bottom: 10px;
}

.epp-signature-canvas {
  width: 100%;
  height: auto;
  max-height: 200px;
  border: 1px dashed var(--epp-border-strong);
  border-radius: var(--epp-radius-sm);
  background: #fff;
  touch-action: none;
}

.epp-summary-block legend {
  color: var(--epp-label);
}

.epp-summary {
  border: 1px solid var(--epp-border);
  border-radius: var(--epp-radius-sm);
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  max-height: 380px;
  overflow: auto;
  color: var(--epp-label-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.epp-summary p {
  margin: 0 0 10px 0;
}

.epp-summary p:last-child {
  margin-bottom: 0;
}

.epp-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--epp-border);
}

.epp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--epp-border-strong);
  background: rgba(255, 255, 255, 0.05);
  color: var(--epp-label);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  transition:
    transform 0.15s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.epp-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}

.epp-btn:active {
  transform: scale(0.98);
}

.epp-btn-small {
  padding: 10px 16px;
  min-height: 44px;
  font-size: 14px;
}

.epp-btn-ghost {
  background: transparent;
}

.epp-btn-accent {
  background: linear-gradient(135deg, #2eb7e6, var(--epp-violet));
  border: none;
  color: #071018;
  box-shadow: 0 8px 26px rgba(61, 225, 255, 0.24);
}

.epp-btn-accent:hover {
  filter: brightness(1.07);
  box-shadow: 0 10px 30px rgba(61, 225, 255, 0.32);
}

.epp-btn-glow {
  box-shadow:
    0 0 0 2px rgba(61, 225, 255, 0.18),
    0 12px 36px rgba(157, 122, 255, 0.22);
}

.epp-input.epp-has-error,
.epp-input-table.epp-has-error {
  border-color: #ff5252 !important;
  box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.2) !important;
}

@media (min-width: 900px) {
  .epp-wizard-node {
    min-width: 88px;
  }

  .epp-wizard-text {
    max-width: 114px;
  }
}

@media (max-width: 600px) {
  .epp-shell {
    padding: 14px;
    border-radius: 16px;
  }

  .epp-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .epp-lang {
    justify-content: center;
    width: 100%;
  }

  .epp-lang-btn {
    flex: 1;
  }

  .epp-toolbar-extras {
    width: 100%;
    justify-content: space-between;
  }

  .epp-footer-actions .epp-btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .epp-grid {
    grid-template-columns: 1fr;
  }
}


/* ---------- Login / signup gate ---------- */

.epp-auth-root .epp-auth-shell {
  max-width: 480px;
  margin-inline: auto;
}

.epp-auth-header {
  margin-bottom: 20px;
}

.epp-auth-title {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 3.5vw, 1.6rem);
  font-weight: 700;
}

.epp-auth-lead {
  margin: 0;
  color: var(--epp-label-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.epp-auth-lang-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 16px;
}

.epp-auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.epp-auth-tab {
  appearance: none;
  border-radius: var(--epp-radius-sm);
  padding: 8px 14px;
  font: inherit;
  border: 1px solid var(--epp-border);
  background: rgba(10, 12, 22, 0.45);
  color: var(--epp-label-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.epp-auth-tab.is-active {
  border-color: var(--epp-electric);
  color: var(--epp-input-text);
  background: rgba(61, 225, 255, 0.08);
}

.epp-auth-panel {
  display: none;
}

.epp-auth-panel.is-active {
  display: block;
}

.epp-auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.epp-auth-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--epp-label-muted);
  line-height: 1.45;
}

.epp-auth-remember {
  margin: 0;
}

.epp-auth-footer {
  margin: 18px 0 0;
  font-size: 0.85rem;
  text-align: center;
}

.epp-auth-wplink {
  color: var(--epp-electric);
  text-decoration: none;
}

.epp-auth-wplink:hover {
  text-decoration: underline;
}
