@font-face {
    font-family: "wrgothic";
    src: url('weissrundgotisch.ttf');
}

:root {
    /* Gothic = Marke (Logo, Überschriften). Sans = alles zum Lesen. */
    --font-display: "wrgothic", "Segoe UI", system-ui, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
    --font-body: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

.topbar a.brand,
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: normal;
    letter-spacing: 0.01em;
}

body {
    background-color: #9f9f9f;
    color: #111;
    min-height: 100vh;
}

.page {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

.page.wide { max-width: 1160px; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: #000;
}

.topbar a.brand {
    color: #fff;
    font-size: 24px;
    text-decoration: none;
    letter-spacing: 1px;
}

.topbar nav a {
    color: #c5c5c5;
    text-decoration: none;
    margin-left: 20px;
    font-size: 15px;
}

.topbar nav a:hover { color: #fff; }

h1.title { font-size: 34px; margin-bottom: 6px; }
p.lead { font-size: 16px; color: #333; margin-bottom: 28px; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 12px 22px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: #e0e0e0; color: #444; }
.btn.secondary { background: #444; }

/* --- Forms (wizard) --- */
.card {
    background: #ececec;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; color: #222; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="file"],
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #bbb;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
}
.field textarea { font-family: inherit; resize: vertical; }
.field input:disabled { background: #f2f2f2; color: #666; }
.field .hint { font-size: 12px; color: #666; margin-top: 4px; }

.error {
    background: #ffdede;
    color: #8a1f1f;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}
.banner {
    background: #d7f0d7;
    color: #1f5f1f;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 22px;
}

/* --- Ladeanzeige beim Absenden der Bewerbung ---------------------------
   /onboard braucht 10–30s: CV speichern, Text extrahieren, LLM-Aufruf,
   Bestätigungsmail. Ohne Rückmeldung wirkt die Seite eingefroren. */
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn[disabled]:hover { background: #000; color: #fff; }

.working {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    font-size: 15px;
    color: #444;
}
.working.on { display: flex; }

.spinner {
    flex: none;
    width: 18px;
    height: 18px;
    border: 2px solid #c4c4c4;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Ohne Rotation für Nutzer, die reduzierte Bewegung eingestellt haben */
@media (prefers-reduced-motion: reduce) {
    .spinner { animation: none; border-color: #000; }
}

/* --- Member cards (Admin) --- */
.members { display: grid; gap: 16px; margin-top: 8px; }
.member {
    background: #ececec;
    border-radius: 12px;
    padding: 18px 20px;
}
.member h3 { font-size: 20px; margin-bottom: 4px; }
.member .role { color: #333; font-size: 15px; margin-bottom: 8px; }
.member .about { color: #444; font-size: 14px; margin-bottom: 10px; }
.member .meta { font-size: 14px; }
.member .meta a { color: #000; text-decoration: underline; }
.member .meta span { display: inline-block; margin-right: 16px; }

/* --- Member table --- */
/* Wie im Chat: Gothic bleibt der Marke vorbehalten, Tabellendaten in einer
   neutralen Sans, damit lange Namen/E-Mails lesbar bleiben. */
.table-wrap {
    overflow-x: auto;
    background: #ececec;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.members-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
}

.members-table th,
.members-table td {
    font-family: inherit;
    text-align: left;
    padding: 12px 16px;
    vertical-align: top;
}

.members-table thead th {
    background: #000;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.members-table tbody tr + tr td { border-top: 1px solid #d5d5d5; }
.members-table tbody tr:hover td { background: #e2e2e2; }

.members-table td.name { font-weight: 600; white-space: nowrap; }
.members-table td.about { color: #444; min-width: 260px; }
.members-table td.contact a { display: block; white-space: nowrap; }
.members-table a { color: #000; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 700px) {
    .members-table { font-size: 13px; }
    .members-table th, .members-table td { padding: 10px 12px; }
}

.empty { text-align: center; color: #333; padding: 40px 0; }

/* --- Chat --- */
/* Der Gothic-Font bleibt der Marke (Topbar, Titel) vorbehalten; im Chat zählt
   Lesbarkeit, deshalb hier eine neutrale Sans. */
.chat-window,
.chat-input input,
.chat-input .btn {
    font-family: var(--font-body);
}

.chat-window {
    background: #ececec;
    border-radius: 16px;
    height: 62vh;
    overflow-y: auto;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
    scroll-behavior: smooth;
}
.chat-window::-webkit-scrollbar { width: 8px; }
.chat-window::-webkit-scrollbar-thumb {
    background: #c3c3c3;
    border-radius: 8px;
}

.msg {
    max-width: 78%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    animation: msg-in 0.18s ease-out;
}
@keyframes msg-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}
.msg.user {
    align-self: flex-end;
    background: #000;
    color: #fff;
    border-bottom-right-radius: 5px;
    white-space: pre-wrap;
}
.msg.bot {
    align-self: flex-start;
    background: #fff;
    color: #111;
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.09);
}

/* --- Markdown im Bot-Text --- */
.msg.bot > :first-child { margin-top: 0; }
.msg.bot > :last-child { margin-bottom: 0; }
.msg.bot p { margin: 0 0 10px; }
.msg.bot h1, .msg.bot h2, .msg.bot h3 {
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    margin: 16px 0 6px;
}
.msg.bot strong { font-weight: 700; }
.msg.bot ul, .msg.bot ol { margin: 0 0 10px; padding-left: 20px; }
.msg.bot li { margin-bottom: 4px; }
.msg.bot li::marker { color: #888; }
.msg.bot a { color: #000; text-decoration: underline; text-underline-offset: 2px; }
.msg.bot code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: #f0f0f0;
    padding: 1px 5px;
    border-radius: 5px;
}
.msg.bot pre {
    background: #f5f5f5;
    padding: 12px 14px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 0 0 10px;
}
.msg.bot pre code { background: none; padding: 0; }
.msg.bot hr { border: none; border-top: 1px solid #e0e0e0; margin: 14px 0; }

/* --- Typing-Indikator --- */
.msg.bot.thinking { display: flex; gap: 5px; padding: 16px; }
.msg.bot.thinking span {
    width: 7px;
    height: 7px;
    background: #a5a5a5;
    border-radius: 50%;
    animation: blink 1.3s infinite;
}
.msg.bot.thinking span:nth-child(2) { animation-delay: 0.2s; }
.msg.bot.thinking span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
    0%, 60%, 100% { opacity: 0.3; }
    30%           { opacity: 1; }
}

.chat-input { display: flex; gap: 10px; margin-top: 14px; }
.chat-input input {
    flex: 1;
    padding: 13px 16px;
    border: 1px solid #bbb;
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.chat-input input:focus {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.chat-input .btn { border-radius: 10px; }

@media (max-width: 600px) {
    .msg { max-width: 92%; }
    .chat-window { height: 65vh; padding: 16px; }
}
