/* TWD Connector – helles Theme im Bild von the-web-designer.de
   Marken-Werte direkt von der Hauptseite abgenommen:
   Akzent #f39f20 · Überschriften #222 (800, Versalien, weit gesperrt)
   Fließtext #444 · Buttons: 4px Radius, Versalien, gesperrt
   Schrift Quicksand – SELBST GEHOSTET (DSGVO: kein Google-CDN-Aufruf). */

@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300 700; /* Variable Font – deckt alle genutzten Schnitte ab */
  font-display: swap;
  src: url("/assets/quicksand-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/quicksand-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --brand: #f39f20;
  --brand-dark: #d4830d;
  --brand-soft: #fef6ea;
  --brand-line: #f8d9a6;

  --ink: #222222;
  --text: #444444;
  --muted: #6b7178;

  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --border: #e3e5e8;

  --danger: #c0392b;
  --danger-soft: #fdf1f0;
  --ok: #2e7d4f;
  --ok-soft: #eef7f1;
  --info: #1e73be; /* Blau der Hauptseite */

  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 2px 18px rgba(34, 34, 34, 0.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Quicksand", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--ink);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.3;
  margin: 0 0 0.6rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.15rem; letter-spacing: 2px; }
h3 { font-size: 1rem; letter-spacing: 1.5px; }

p { margin: 0 0 1rem; }
a { color: var(--info); }

strong { color: var(--ink); font-weight: 700; }

/* Sichtbarer Tastatur-Fokus auf allem, was bedienbar ist */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Kopf & Fuß ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 2rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

/* Bild-Logo aus Thomas' Original (I:\The Web Designer\Logo.png, Calibri Bold,
   #675e55 / #f26422). Quelle 72 px hoch = scharf bis 2,4-fach am Desktop. */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.logo img {
  display: block;
  height: 30px;
  width: auto;
  max-width: 100%;
}

.logo small { color: var(--muted); font-size: 0.85rem; font-weight: 600; white-space: nowrap; }

.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0.7rem 1.2rem;
  border: 1.6px solid var(--brand);
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover { background: var(--brand); color: var(--ink); }

.site-footer {
  padding: 1.5rem 2rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a { color: var(--muted); }

/* ---------- Inhalt ---------- */

.hero {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.hero > h1 { margin-bottom: 0.9rem; }

.sub {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* Vorbereitungs-Checkliste: was der Kunde bereitlegen muss */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.9rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

/* Nummerierter Ablauf – zeigt dem Laien, was ihn erwartet */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.1rem 3rem;
}

.steps li:last-child { padding-bottom: 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Senkrechte Linie zwischen den Schritten */
.steps li::after {
  content: "";
  position: absolute;
  left: calc(1rem - 1px);
  top: 2.3rem;
  bottom: 0.35rem;
  width: 2px;
  background: var(--brand-line);
}

.steps li:last-child::after { display: none; }

.steps strong { display: block; }

.benefits {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.benefits li {
  padding: 0.5rem 0 0.5rem 1.9rem;
  position: relative;
}

.benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  margin: 1.75rem 0;
  box-shadow: var(--shadow);
}

.card > h2 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.card-soft { background: var(--bg-soft); box-shadow: none; }
.card-brand { border-color: var(--brand-line); background: var(--brand-soft); box-shadow: none; }
.card-danger { border-color: var(--danger); }

/* ---------- Aktionsbereich ---------- */

.cta {
  margin: 2.25rem 0 0.75rem;
  text-align: center;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  display: inline-block;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--brand);
  color: var(--ink);
  border: 1.6px solid var(--brand);
  padding: 1rem 2.2rem;
  font-size: 0.9rem;
}

.btn-primary:hover:not(:disabled),
.btn-primary:focus-visible:not(:disabled) {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--ink); /* NICHT aufhellen – heller Text auf Orange fällt unter AA */
}

/* Wartezustand: gedämpft, aber klar als Schaltfläche erkennbar (nicht 0.5 blass) */
.btn-primary:disabled {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--muted);
  cursor: progress;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.6px solid var(--brand);
  padding: 0.7rem 1.4rem;
  font-size: 0.75rem;
}

.btn-secondary:hover { background: var(--brand); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: 1.6px solid var(--danger);
  padding: 0.7rem 1.4rem;
  font-size: 0.75rem;
}

.btn-link {
  background: none;
  border: none;
  color: var(--info);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0;
  text-decoration: underline;
}

.status-msg {
  color: var(--text);
  min-height: 1.5em;
  margin: 1rem 0 0;
  font-size: 0.95rem;
}

.status-msg:empty { margin: 0; }

/* Der Status kann eine Fehlererklärung tragen – dann deutlich hervorheben */
.status-msg.is-problem {
  color: var(--ink);
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  text-align: left;
}

.hint { color: var(--muted); font-size: 0.9rem; }
.muted { color: var(--muted); }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 0.9em; }
.hidden { display: none; }
.center { text-align: center; }

.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  margin: 1rem 0;
}

.alert-error {
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  color: var(--ink);
}

.alert-info {
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--ink);
}

/* Nur auf schmalen Geräten: Hinweis, den Vorgang am Computer zu starten */
.mobile-note { display: none; }

@media (max-width: 760px) {
  .mobile-note { display: block; }
}

/* ---------- Dashboard ---------- */

.dash-main {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.dash-nav { display: flex; align-items: center; gap: 1.25rem; }
.dash-nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.dash-nav a:hover { color: var(--brand-dark); }
.inline-form { display: inline; }

.login-box {
  max-width: 380px;
  margin: 3rem auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.login-box h1 { margin-top: 0; font-size: 1.25rem; }

label {
  display: block;
  margin: 0.8rem 0 0.25rem;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}

.login-box button { margin-top: 1.25rem; width: 100%; }

.filter-form {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 0 1.5rem;
  flex-wrap: wrap;
}

.filter-form label { margin: 0; }
.filter-form select { width: auto; }

.customer-table, .detail-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.customer-table th, .customer-table td,
.detail-table th, .detail-table td {
  padding: 0.65rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.customer-table thead { background: var(--bg-soft); }
.customer-table th { color: var(--ink); }
.detail-table th { width: 180px; color: var(--muted); font-weight: 600; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--ink);
}

.badge-active { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.badge-signup_complete { background: #eaf2fa; color: var(--info); border-color: var(--info); }
.badge-coexistence_pending { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-line); }
.badge-coexistence_pruefen,
.badge-error_token,
.badge-error_subscribe,
.badge-error_register,
.badge-error_n8n { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

.row-form { display: flex; gap: 0.6rem; align-items: center; }
.row-form select, .row-form input { flex: 1; }

textarea { resize: vertical; margin-bottom: 0.8rem; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
  color: var(--text);
  font-weight: 400;
}

.checkbox-label input { width: auto; }

@media (max-width: 600px) {
  h1 { font-size: 1.5rem; letter-spacing: 2px; }
  .hero { padding: 2rem 1.25rem 3rem; }
  .site-header { padding: 0.9rem 1.25rem; flex-wrap: wrap; gap: 0.6rem; }
  .logo img { height: 22px; }
  .card { padding: 1.1rem 1.2rem; }
  .btn-primary { width: 100%; padding: 1rem 1rem; letter-spacing: 1.5px; }
  .row-form { flex-direction: column; align-items: stretch; }
}

/* Bewegungsempfindliche Nutzer: keine Übergänge erzwingen */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
