/* Dunkles Farbschema, gedaempfte Toene statt reinem Weiss. */

:root {
  --bg: #16181d;
  --panel: #1e2128;
  --panel-2: #252932;
  --line: #333844;
  --text: #dfe3ea;
  --muted: #949cad;
  --accent: #6ea8fe;
  --ok: #63b880;
  --warn: #d9a441;
  --danger: #d9756b;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.5rem; margin: 0 0 .2rem; }
h2 { font-size: 1.05rem; margin: 0 0 .7rem; color: var(--text); }
.mt { margin-top: 1.4rem; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }

.wrap { max-width: 860px; margin: 0 auto; padding: 1.2rem 1rem 4rem; }

/* Kopfzeile */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem 1.1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: .8rem; }
.who { color: var(--muted); font-size: .9rem; }
.inline { display: inline; }

/* Buttons */
.btn {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .45rem .9rem;
  font-size: .9rem;
  cursor: pointer;
}
.btn:hover { background: #2d323d; }
.btn-primary { background: #2f4f7a; border-color: #3d6396; }
.btn-primary:hover { background: #395e91; }
.btn-danger { background: #6b3a35; border-color: #8a4b44; }
.btn-danger:hover { background: #7d443e; }
.btn-quiet { background: transparent; }
.btn-block { width: 100%; margin-top: 1rem; }

/* Login */
.login-box {
  max-width: 340px; margin: 12vh auto; padding: 1.6rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.login-box label { display: block; margin: .9rem 0 .3rem; font-size: .85rem; color: var(--muted); }
input[type="text"], input[type="password"], textarea {
  width: 100%; padding: .55rem .7rem;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  font: inherit;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { resize: vertical; margin-bottom: .7rem; }

.alert { padding: .6rem .8rem; border-radius: 8px; font-size: .9rem; }
.alert-error { background: #4a2b28; color: #f0c4bf; }
.alert-ok { background: #274434; color: #bfe6cd; }

/* Kopf der Liste */
.page-head { display: flex; justify-content: space-between; align-items: center; }
.count {
  font-size: .85rem; color: var(--muted); background: var(--panel-2);
  padding: .1rem .5rem; border-radius: 20px; vertical-align: middle;
}

.toolbar {
  display: flex; flex-wrap: wrap; gap: .8rem;
  justify-content: space-between; align-items: center;
  margin: 1rem 0;
}
.filters, .sorts { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

.chip {
  padding: .3rem .75rem; border-radius: 20px; font-size: .85rem;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
}
.chip:hover { text-decoration: none; color: var(--text); }
.chip-on { background: var(--panel-2); color: var(--text); border-color: #4a5163; }
.chip-n { opacity: .7; margin-left: .25rem; }

.sort { font-size: .85rem; color: var(--muted); padding: .2rem .4rem; }
.sort-on { color: var(--text); border-bottom: 2px solid var(--accent); }

.empty {
  background: var(--panel); border: 1px dashed var(--line);
  padding: 1.6rem; border-radius: var(--radius); text-align: center; color: var(--muted);
}

/* Bewerberkarten */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.card:hover { border-color: #47506a; }
.card-link { display: flex; gap: .9rem; padding: .9rem; color: var(--text); }
.card-link:hover { text-decoration: none; }
.card-body { flex: 1; min-width: 0; }
.card-top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.name { font-weight: 600; }

.avatar {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; background: var(--panel-2);
}
.avatar-blank {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 1.2rem; font-weight: 600;
}
.avatar-big { width: 76px; height: 76px; }

.badge {
  font-size: .75rem; padding: .15rem .55rem; border-radius: 20px;
  white-space: nowrap; border: 1px solid var(--line); color: var(--muted);
}
.badge-neu { background: #23364d; color: #a8c8ee; border-color: #33506f; }
.badge-eingeladen { background: #4a3d22; color: #e3cd9a; border-color: #6b5730; }
.badge-zusage { background: #23422f; color: #a9dbbc; border-color: #35603f; }
.badge-absage { background: #402a28; color: #dfb0aa; border-color: #5d3b37; }

.stars-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: .25rem 0; }
.stars { color: var(--warn); letter-spacing: 2px; }
.mine { font-size: .8rem; color: var(--accent); }

.preview {
  margin: .3rem 0 .2rem; color: var(--muted); font-size: .9rem;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.card-foot { display: flex; gap: 1rem; flex-wrap: wrap; }
.date { color: var(--warn); }

/* Detailseite */
.back { font-size: .9rem; }
.detail-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.2rem; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem; margin-bottom: .8rem;
}

.rating-form, .status-form { display: flex; gap: .4rem; flex-wrap: wrap; }
.star-btn {
  width: 38px; height: 38px; border-radius: 8px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  font-size: .95rem;
}
.star-btn:hover { border-color: var(--warn); color: var(--text); }
.star-on { background: #4a3d22; border-color: var(--warn); color: #f0d9a4; }

.btn-status { font-size: .85rem; }
.btn-status-on { background: #2f4f7a; border-color: #3d6396; color: #dce8fa; }

.row-form { display: flex; gap: .5rem; }
.row-form input { flex: 1; }

.plain { list-style: none; padding: 0; margin: .8rem 0 0; }
.plain li { padding: .2rem 0; border-bottom: 1px solid var(--line); }

/* Nachrichtenverlauf */
.chat { display: flex; flex-direction: column; gap: .6rem; }
.msg {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: .6rem .8rem; max-width: 85%;
}
.msg-own { align-self: flex-end; background: #2b3a4f; border-color: #3a4d68; }
.msg-meta { margin-bottom: .25rem; }
.msg-body { white-space: pre-wrap; word-wrap: break-word; }

.comment {
  background: var(--panel-2); border-left: 3px solid var(--accent);
  border-radius: 6px; padding: .5rem .7rem; margin-bottom: .5rem;
  white-space: pre-wrap; word-wrap: break-word;
}

.warn {
  background: #4a3d22; color: #e8d3a3; border: 1px solid #6b5730;
  padding: .55rem .75rem; border-radius: 8px; font-size: .88rem;
}
.check { display: flex; gap: .5rem; align-items: center; margin-bottom: .7rem; font-size: .9rem; }
.check input { width: auto; }
