/* Oeffentliche Bewerbungsseite */

.site-nav a.is-current { color: var(--text); }

.bw-main {
  min-height: calc(100vh - 220px);
  padding: calc(var(--header-h) + clamp(28px, 5vw, 56px)) 0 clamp(56px, 8vw, 96px);
  background:
    radial-gradient(760px 340px at 10% 0%, rgba(24, 223, 207, 0.12), transparent 70%),
    radial-gradient(520px 260px at 92% 8%, rgba(76, 194, 255, 0.06), transparent 70%);
}
.bw-loading { padding: 48px 12px; color: var(--muted); text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bw-login { display: grid; place-items: center; min-height: 50vh; }
.admin-alert { width: 100%; padding: 12px 16px; border: 1px solid rgba(255, 107, 107, 0.4); border-radius: 12px; background: rgba(255, 107, 107, 0.09); color: #ffb3b3; font-size: 0.92rem; line-height: 1.55; }

/* Kopf */
.bw-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.bw-head h1 { margin-bottom: 10px; font-size: clamp(1.9rem, 4.4vw, 3rem); }
.bw-head .lead { max-width: 56ch; }
.bw-user { display: flex; align-items: center; gap: 12px; }
.bw-user-name { padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(1, 16, 21, 0.6); font-weight: 600; font-size: 0.9rem; }
.bw-user-name::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: #6ee7a0; box-shadow: 0 0 0 3px rgba(110, 231, 160, 0.18); }

.bw-tabs { display: flex; gap: 6px; margin-bottom: 26px; padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.bw-tab { position: relative; padding: 10px 18px; color: var(--muted); font-weight: 500; transition: color 0.2s; }
.bw-tab:hover { color: var(--text); }
.bw-tab.is-active { color: var(--accent); }
.bw-tab.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -3px; height: 2px; border-radius: 2px; background: var(--accent); }

/* Bilder */
.cover { display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(145deg, rgba(24, 223, 207, 0.16), rgba(9, 78, 82, 0.35)); }
/* Das ganze Bild bleibt sichtbar (contain, nie zugeschnitten) auf ruhigem, dunklem Grund */
.cover { position: relative; isolation: isolate; }
.cover .cover-fg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.cover > svg { width: 38px; height: 38px; fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: 0.6; }

/* Karten */
.bw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.bw-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.bw-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: 0 24px 44px -26px rgba(24, 223, 207, 0.5); }
.bw-card-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }
.bw-card h2 { font-size: 1.25rem; font-style: normal; }
.bw-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 0.94rem; line-height: 1.6; }
.bw-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }

.phase { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(232, 247, 246, 0.07); color: var(--muted); font-size: 0.78rem; font-weight: 500; }
.phase svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.phase-open { background: rgba(110, 231, 160, 0.14); color: #8ff0b6; }

.status { padding: 4px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.status-open { background: rgba(255, 200, 87, 0.15); color: #ffc857; }
.status-accepted { background: rgba(110, 231, 160, 0.15); color: #6ee7a0; }
.status-rejected { background: rgba(255, 107, 107, 0.15); color: #ff8f8f; }

/* Meine Bewerbungen */
.bw-mine { display: grid; gap: 10px; }
.mine-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color 0.2s, background 0.2s; }
.mine-row:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.mine-main { display: grid; gap: 2px; min-width: 0; }
.mine-main small { color: var(--muted); }
.mine-note { margin-top: 6px; color: #cfe6e5; font-style: italic; overflow-wrap: anywhere; }

.bw-empty { display: grid; justify-items: center; gap: 10px; padding: clamp(40px, 8vw, 80px) 20px; border: 1px dashed var(--line-strong); border-radius: 22px; text-align: center; }
.bw-empty h2 { font-style: normal; }
.bw-empty p { max-width: 46ch; color: var(--muted); }
.bw-empty.is-success { border-style: solid; background: radial-gradient(500px 200px at 50% 0%, rgba(24, 223, 207, 0.14), transparent 70%), var(--surface); }
.bw-empty .btn { margin-top: 8px; }
.bw-empty .admin-icon { margin: 0; }

/* Details */
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 0.92rem; transition: color 0.2s; }
.back:hover { color: var(--accent); }
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.bw-detail { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 26px; background: var(--surface); }
.cover-lg { width: 100%; aspect-ratio: 16 / 9; max-height: 440px; }
.bw-detail-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(20px, 4vw, 44px); padding: clamp(22px, 4vw, 40px); }
.bw-detail-main h2 { margin-bottom: 16px; font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-style: normal; }
.bw-desc { color: #cfe6e5; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.bw-detail-side { display: grid; align-content: start; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(1, 16, 21, 0.5); }
.bw-detail-side .phase { justify-self: start; }
.bw-detail-side dl { display: grid; gap: 12px; margin: 0; }
.bw-detail-side dt { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.bw-detail-side dd { margin: 2px 0 0; font-weight: 600; }
.closed-note { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

.own-box { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line-strong); border-left-width: 4px; border-radius: 14px; background: var(--surface); }
.own-box.accepted { border-color: rgba(110, 231, 160, 0.5); background: rgba(110, 231, 160, 0.07); }
.own-box.rejected { border-color: rgba(255, 107, 107, 0.5); background: rgba(255, 107, 107, 0.07); }
.own-box small { color: var(--muted); }
.own-box p { color: #cfe6e5; font-style: italic; overflow-wrap: anywhere; }

/* Regel-Bestätigung (muss akzeptiert werden, bevor sich das Formular öffnet) */
.bw-rules { display: grid; gap: 20px; max-width: 720px; margin-inline: auto; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line-strong); border-radius: 26px; background: var(--surface); }
.bw-rules header h2 { margin-bottom: 8px; font-size: clamp(1.4rem, 3vw, 1.8rem); font-style: normal; }
.bw-rules-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.bw-rules-list li { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(1, 16, 21, 0.5); line-height: 1.55; }
.bw-rules-list li svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bw-rules .choice { margin-top: 4px; }
.bw-rules .form-actions { justify-content: flex-end; }
.bw-rules .btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Formular */
.bw-form { display: grid; gap: 22px; max-width: 880px; margin-inline: auto; padding: clamp(22px, 4vw, 38px); border: 1px solid var(--line-strong); border-radius: 26px; background: var(--surface); }
.bw-form header h2 { margin-bottom: 8px; font-size: clamp(1.5rem, 3vw, 2rem); font-style: normal; }
.form-note { color: var(--muted); font-size: 0.9rem; }
.req { color: #ff8f8f; font-weight: 700; }

.q-field { display: grid; gap: 6px; }
.q-block { display: grid; gap: 8px; }
.q-label { font-weight: 600; line-height: 1.45; }
.q-block input:not([type="checkbox"]), .q-block textarea {
  width: 100%;
  padding: 11px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(1, 16, 21, 0.75);
  color: var(--text);
  font: inherit;
  color-scheme: dark;
}
.q-block textarea { resize: vertical; line-height: 1.6; }
.q-block input:focus, .q-block textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(24, 223, 207, 0.14); }
.q-field.has-error input, .q-field.has-error textarea, .q-field.has-error .dd-btn, .q-field.has-error .choices { border-color: #ff6b6b; }
.q-field.has-error .choices { border: 1px solid #ff6b6b; border-radius: 12px; padding: 6px; }
.q-error { min-height: 0; color: #ff9c9c; font-size: 0.86rem; }
.q-error:empty { display: none; }
.counter, .hint { color: var(--muted); font-size: 0.82rem; }
.counter.is-ok { color: #6ee7a0; }

.choices { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(1, 16, 21, 0.5); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.choice:hover { border-color: var(--line-strong); }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice-box { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border: 1.5px solid var(--line-strong); border-radius: 6px; transition: background 0.2s, border-color 0.2s; }
.choice-box svg { width: 13px; height: 13px; fill: none; stroke: var(--on-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.choice input:checked + .choice-box { background: var(--accent); border-color: var(--accent); }
.choice input:checked + .choice-box svg { opacity: 1; }
.choice:has(input:checked) { border-color: rgba(24, 223, 207, 0.55); background: rgba(24, 223, 207, 0.08); }
.choice input:focus-visible + .choice-box { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Live-Pruefung (z. B. Discord-ID der 02) */
.lookup { min-height: 0; font-size: 0.86rem; color: var(--muted); }
.lookup:empty { display: none; }
.lookup.is-ok { color: #6ee7a0; font-weight: 600; }
.lookup.is-error { color: #ff9c9c; }
.lookup.is-checking { color: var(--muted); }
.q-block .dd { width: 100%; }
.q-field.has-error .dd-btn { border-color: #ff6b6b; }

/* Termine (Meine Bewerbungen) */
.mine-group { display: grid; gap: 8px; }
.iv-list { display: grid; gap: 8px; margin-left: clamp(0px, 3vw, 28px); }
.iv-card { display: grid; gap: 8px; padding: 14px 18px; border: 1px solid rgba(24, 223, 207, 0.4); border-left-width: 4px; border-radius: 14px; background: rgba(24, 223, 207, 0.07); line-height: 1.55; }
.iv-card.iv-accepted { border-color: rgba(110, 231, 160, 0.5); background: rgba(110, 231, 160, 0.07); }
.iv-card.iv-declined { border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.06); }
.iv-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.iv-state { padding: 2px 12px; border-radius: 999px; background: rgba(232, 247, 246, 0.08); color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.iv-pending .iv-state { background: rgba(255, 200, 87, 0.15); color: #ffc857; }
.iv-accepted .iv-state { background: rgba(110, 231, 160, 0.15); color: #6ee7a0; }
.iv-declined .iv-state { background: rgba(255, 107, 107, 0.15); color: #ff8f8f; }
.iv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.iv-card .admin-alert { margin: 0; }
.iv-proposal-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(1, 16, 21, 0.4); }
.iv-proposal-row.is-chosen { border-color: rgba(110, 231, 160, 0.5); background: rgba(110, 231, 160, 0.08); }
.iv-proposal-row .iv-tag { padding: 2px 11px; border-radius: 999px; background: rgba(110, 231, 160, 0.15); color: #6ee7a0; font-size: 0.76rem; font-weight: 600; white-space: nowrap; }

.form-error { color: #ff9c9c; font-size: 0.92rem; }
.form-error:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }

/* Kategorie-Auswahl (z. B. Entbannungsantrag: Anticheat/Normal/Permanent) */
.cat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.cat-card {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(1, 16, 21, 0.5);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.cat-card:hover { border-color: var(--line-strong); background: var(--surface-hover); transform: translateY(-2px); }
.cat-card strong { font-size: 1.02rem; }
.cat-card span:not(.cat-card-icon) { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.cat-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(24, 223, 207, 0.2), rgba(24, 223, 207, 0.05));
  border: 1px solid var(--line);
}
.cat-card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.cat-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.cat-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cat-back:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .cat-cards { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .bw-detail-body { grid-template-columns: 1fr; }
  .cover-lg { aspect-ratio: 16 / 9; }
}

@media (max-width: 560px) {
  .bw-grid { grid-template-columns: 1fr; }
  .bw-head { align-items: flex-start; }
  .mine-row { flex-wrap: wrap; }
  .form-actions .btn { flex: 1; }
}
