/* ==========================================================================
   Leitungsbereich – klassischer Stil passend zur Gildenseite
   ========================================================================== */

.eyebrow { font-family: var(--font-display); font-size: 14px; letter-spacing: 0.2em; color: var(--gold); text-shadow: 0 1px 1px #000; }

/* ---------- Anmeldung ---------- */
.login { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 90px 20px 30px; position: relative; isolation: isolate; }
.login-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.login-bg::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: url('/img/brand/banner-ambient.webp') center / cover no-repeat;
  filter: blur(30px) saturate(1.2);
  opacity: 0.45;
}
.login-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 55% at 50% 45%, transparent 20%, rgba(8, 5, 3, 0.85) 100%); }
.login-card { width: min(410px, 100%); padding: 36px 34px 30px; display: grid; gap: 16px; text-align: center; }
.login-card .field { text-align: left; }
.login-crest { width: 150px; height: 150px; object-fit: contain; margin: -110px auto -6px; filter: drop-shadow(0 10px 20px #000); position: relative; z-index: 4; }
.login-card h1 { font-family: var(--font-title); font-weight: 700; font-size: 21px; white-space: nowrap; }
.login-card .ornament { margin: 0 auto 4px; }
.login-card .btn { width: 100%; min-height: 48px; margin-top: 4px; font-size: 17px; }
.login-error { color: #ffb0a6; font-size: 15px; background: linear-gradient(180deg, #3a1410, #200a08); border: 1px solid #7d2a20; border-radius: 2px; padding: 9px 12px; }
.login-back { font-family: var(--font-display); font-size: 14px; color: var(--text-faint); }

/* ---------- Grundaufbau ---------- */
.app { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 14px;
  background-color: #110b07;
  background-image:
    linear-gradient(180deg, color-mix(in srgb, var(--crimson) 22%, transparent), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.2), rgba(255, 214, 140, 0.03)),
    var(--tex-stone);
  background-size: auto, auto, var(--tex-stone-size);
  box-shadow: 1px 0 0 #000, 2px 0 0 var(--bronze), 3px 0 0 #000, 8px 0 24px rgba(0, 0, 0, 0.6);
  z-index: 40;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 4px 16px; margin-bottom: 4px; color: var(--text); border-bottom: 1px solid var(--line); }
.side-brand:hover { color: var(--text); text-shadow: none; }
.side-brand img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 3px 6px #000); }
.side-brand strong { display: block; font-family: var(--font-title); font-weight: 700; font-size: 17px; color: #f3d98f; text-shadow: 0 2px 0 #000; }
.side-brand small { display: block; color: var(--text-faint); font-family: var(--font-display); font-size: 13px; }
.side-nav { display: grid; gap: 3px; overflow: auto; }
.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 16px;
  text-shadow: 0 1px 1px #000;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.side-nav a svg { width: 19px; height: 19px; fill: currentColor; opacity: 0.85; flex: none; filter: drop-shadow(0 1px 0 #000); }
.side-nav a:hover { background: rgba(201, 163, 78, 0.07); color: #f6dc92; border-color: rgba(201, 163, 78, 0.15); }
.side-nav a.active {
  background: linear-gradient(90deg, color-mix(in srgb, var(--crimson) 75%, #000), color-mix(in srgb, var(--crimson) 25%, transparent));
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  color: #ffe39a;
  box-shadow: inset 0 1px 0 rgba(255, 200, 160, 0.2), 0 0 0 1px #000;
}
.side-nav a.active::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 0 1px #000, 0 0 10px var(--gold);
}
.side-nav .side-sep {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 4px 4px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}
.side-nav .side-sep::before, .side-nav .side-sep::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.side-nav .side-sep::after { background: linear-gradient(90deg, var(--line), transparent); }
.side-nav .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 12px; background: radial-gradient(circle at 40% 30%, var(--crimson-bright), var(--crimson-deep)); color: #ffe9b0; box-shadow: 0 0 0 1px #000, 0 0 0 2px var(--bronze); }
.side-user { margin-top: auto; padding: 14px 4px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.side-user-info { display: flex; align-items: center; gap: 12px; }
.side-user-info strong { display: block; font-size: 16px; }
.side-user-info small { display: block; font-size: 14px; font-style: italic; color: var(--text-faint); }
.side-user-actions { display: flex; gap: 6px; }
.side-user-actions .btn { flex: 1; }
.side-toggle { display: none; }
.sidebar-backdrop { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.pagebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  background-color: #110b07;
  background-image: linear-gradient(180deg, rgba(255, 214, 140, 0.05), rgba(0, 0, 0, 0.3)), var(--tex-stone);
  background-size: auto, var(--tex-stone-size);
  box-shadow: 0 1px 0 #000, 0 2px 0 var(--bronze), 0 3px 0 #000, 0 8px 20px rgba(0, 0, 0, 0.55);
}
.pagebar-title { min-width: 0; }
.pagebar-title h1 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 25px;
  background: linear-gradient(180deg, #fff4cc 0%, #f3d27a 35%, var(--gold) 65%, #8c6522 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #000);
}
.pagebar-title p { font-style: italic; }
.pagebar-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.view { padding: 30px 32px 60px; outline: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-content: start; }
.view > *, .grid-2 > *, .stack > * { min-width: 0; }

/* ---------- Bausteine ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.kpi { padding: 20px 22px; display: grid; gap: 2px; text-decoration: none; color: var(--text); transition: filter 0.2s, transform 0.2s; }
a.kpi:hover { filter: brightness(1.15); transform: translateY(-2px); color: var(--text); text-shadow: none; }
.kpi-label { font-family: var(--font-display); font-size: 14px; letter-spacing: 0.04em; color: var(--text-faint); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-family: var(--font-num); font-weight: 700; font-size: 32px; color: #f6d98b; line-height: 1.1; text-shadow: 0 2px 0 #000, 0 0 14px color-mix(in srgb, var(--gold) 35%, transparent); }
.kpi-hint { font-size: 14px; font-style: italic; color: var(--text-dim); }
.kpi.kpi-warn .kpi-value { color: var(--warn); }
.kpi.kpi-ok .kpi-value { color: #8fe08f; }
.kpi.kpi-bad .kpi-value { color: #ff8a82; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.box { padding: 26px; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.box-head h2 { font-family: var(--font-quest); font-size: 20px; color: #f6d98b; text-shadow: 0 2px 0 #000; }
/* Karten ohne eigenen Innenabstand (Listen, Tabellen) */
.card > .box-head[style] { margin-left: 4px; margin-right: 4px; }
.stack { display: grid; gap: 24px; }

.feed { list-style: none; margin: 0; padding: 0; display: grid; }
.feed li { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--line-neutral); }
.feed li:first-child { border-top: 0; }
.feed-icon { width: 28px; height: 28px; border-radius: 2px; display: grid; place-items: center; font-size: 14px; background: var(--surface-3); border: 1px solid var(--bronze); box-shadow: 0 0 0 1px #000, inset 0 0 6px rgba(0, 0, 0, 0.7); text-shadow: 0 1px 1px #000; }
.feed-icon.join { background: linear-gradient(180deg, #24401c, #13240f); color: #a6efa0; }
.feed-icon.leave { background: linear-gradient(180deg, #4a1712, #260b08); color: #ffb0a6; }
.feed-icon.rank { background: linear-gradient(180deg, #4a3614, #261b09); color: #f6d98b; }
.feed-text { font-size: 15.5px; min-width: 0; }
.feed-text a { font-weight: 700; }
.feed-time { font-size: 14px; font-style: italic; color: var(--text-faint); white-space: nowrap; display: grid; justify-items: end; line-height: 1.25; }
.feed-abs { font-style: normal; font-variant-numeric: tabular-nums; color: var(--text-dim); }
.feed-rel { font-size: 12.5px; }
.feed-rel .ts-exact, .timeline .ts-exact { color: #a6efa0; }
.feed-rel .ts-rough, .timeline .ts-rough { color: var(--text-faint); }
.actor { color: var(--gold, #e8c66a); }
.actor-unknown { color: var(--text-faint); font-style: italic; cursor: help; border-bottom: 1px dotted currentColor; }
@media (max-width: 640px) { .feed li { grid-template-columns: 30px 1fr; } .feed-time { grid-column: 2; justify-items: start; } }

.note-preview { display: grid; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line-neutral); }
.note-preview:first-child { border-top: 0; padding-top: 0; }
.note-preview p { font-size: 15px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Tabellen im Stil eines Gildenfensters */
.table-wrap { overflow-x: auto; border: 1px solid #3d2e18; background: rgba(5, 3, 2, 0.5); box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6); }
.card > .table-wrap { margin: 12px; }
.card > .box-head + .table-wrap { margin-top: 0; }
.box > .table-wrap { margin: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.table th {
  position: sticky;
  top: 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--gold);
  padding: 10px 14px;
  background: linear-gradient(180deg, #2a1f13, #17100a);
  border-bottom: 1px solid var(--bronze);
  text-shadow: 0 1px 1px #000;
  white-space: nowrap;
  user-select: none;
}
.table th[data-sort] { cursor: pointer; }
.table th[data-sort]:hover { color: #fff1c4; }
.table th.sorted { color: #fff1c4; }
.table th.sorted::after { content: ' ▾'; }
.table th.sorted.asc::after { content: ' ▴'; }
.table td { padding: 9px 14px; border-bottom: 1px solid rgba(214, 170, 96, 0.07); vertical-align: middle; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:nth-child(even) { background: rgba(255, 214, 140, 0.025); }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr:hover { background: rgba(201, 163, 78, 0.1); }
.table tbody tr.selected { background: color-mix(in srgb, var(--crimson) 30%, transparent); box-shadow: inset 3px 0 0 var(--gold); }
.table .r { text-align: right; }
.table .member-cell { display: flex; align-items: center; gap: 12px; min-width: 180px; }
.member-cell strong { display: block; font-weight: 700; text-shadow: 0 1px 1px #000; }
.member-cell small { display: block; color: var(--text-faint); font-size: 14px; font-style: italic; }
.table tr.left td { opacity: 0.5; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .search { position: relative; flex: 1 1 240px; }
.toolbar .search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: var(--text-faint); pointer-events: none; }
.toolbar .search .input { padding-left: 38px; }
.toolbar .select { width: auto; min-width: 150px; flex: 0 1 auto; }
/* Reiter wie bei einem alten Charakterfenster */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid #3d2e18; background: #070403; box-shadow: inset 0 2px 4px #000; }
.segmented button { border: 1px solid transparent; background: transparent; padding: 7px 14px; border-radius: 2px; cursor: pointer; color: var(--text-dim); font-family: var(--font-display); font-size: 14.5px; text-shadow: 0 1px 1px #000; }
.segmented button:hover { color: #f6dc92; }
.segmented button.on { background: linear-gradient(180deg, color-mix(in srgb, var(--crimson) 80%, #ff7a50), var(--crimson-deep)); border-color: color-mix(in srgb, var(--gold) 60%, transparent); color: #ffe39a; box-shadow: inset 0 1px 0 rgba(255, 200, 160, 0.3); }
.list-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 4px 0; color: var(--text-faint); font-size: 14px; font-style: italic; }

.source { font-family: var(--font-display); font-size: 12.5px; padding: 1px 7px; border-radius: 2px; border: 1px solid #4b3920; color: var(--text-faint); white-space: nowrap; background: rgba(0, 0, 0, 0.3); }
.source-manual, .source-addon, .source-invite, .source-sync { color: #9be39f; border-color: color-mix(in srgb, var(--ok) 40%, #000); }
.source-raiderio { color: #f6cd85; border-color: color-mix(in srgb, var(--warn) 40%, #000); }

/* Formularraster */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.hint { font-size: 14.5px; font-style: italic; color: var(--text-faint); line-height: 1.5; }
.hint code, .prose code, .code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-style: normal; font-size: 12.5px; background: #070403; border: 1px solid #3d2e18; padding: 1px 6px; border-radius: 2px; color: #f2cf73; word-break: break-all; }
.settings-section { padding: 28px; }
.settings-section h2 { font-family: var(--font-quest); font-size: 21px; margin-bottom: 4px; color: #f6d98b; text-shadow: 0 2px 0 #000; }
.settings-section > .hint { margin-bottom: 18px; }
.class-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.class-picker label { cursor: pointer; }
.class-picker input { position: absolute; opacity: 0; pointer-events: none; }
.class-picker span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 2px; border: 1px solid #4b3920; background: linear-gradient(180deg, #2c2116, #1a120b); color: var(--text-dim); font-family: var(--font-display); font-size: 14px; transition: all 0.15s; }
.class-picker input:checked + span { color: var(--cls); border-color: color-mix(in srgb, var(--cls) 55%, #000); background: linear-gradient(180deg, color-mix(in srgb, var(--cls) 18%, #2c2116), #1a120b); box-shadow: 0 0 8px -2px color-mix(in srgb, var(--cls) 60%, transparent); }
.class-picker input:focus-visible + span { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.brand-upload { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand-preview { width: 110px; height: 80px; border-radius: 2px; border: 1px solid var(--bronze); display: grid; place-items: center; background: #070403; box-shadow: inset 0 0 12px #000; overflow: hidden; }
.brand-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-preview.wide { width: 200px; }
.color-field { display: flex; gap: 10px; align-items: center; }
.color-field input[type='color'] { width: 46px; height: 42px; padding: 3px; border-radius: 2px; border: 1px solid var(--bronze); background: #070403; cursor: pointer; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.status-dot { width: 9px; height: 9px; transform: rotate(45deg); background: var(--text-faint); flex: none; box-shadow: 0 0 0 1px #000; }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 1px #000, 0 0 10px var(--ok); }
.status-dot.warn { background: var(--warn); box-shadow: 0 0 0 1px #000, 0 0 10px var(--warn); }
.status-dot.bad { background: var(--bad); box-shadow: 0 0 0 1px #000, 0 0 10px var(--bad); }

.dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 34px 20px;
  border: 2px dashed var(--bronze);
  border-radius: 2px;
  text-align: center;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.over { border-color: var(--gold); background: var(--gold-soft); }
.dropzone svg { width: 34px; height: 34px; fill: var(--gold); filter: drop-shadow(0 1px 0 #000); }
.dropzone input { display: none; }

/* Termine */
.event-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 16px; align-items: start; padding: 20px 24px; }
.event-row + .event-row { border-top: 1px solid var(--line-neutral); }
.event-day {
  display: grid;
  place-items: center;
  height: 72px;
  line-height: 1.1;
  text-align: center;
  background: radial-gradient(circle at 40% 30%, color-mix(in srgb, var(--crimson) 75%, #ff8a60), var(--crimson) 45%, var(--crimson-deep));
  border: 2px solid #5e3c12;
  border-radius: 2px;
  box-shadow: 0 0 0 1px #c99a45, 0 3px 6px rgba(0, 0, 0, 0.6), inset 0 0 12px rgba(0, 0, 0, 0.45);
  color: #ffe9b0;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
}
.event-day b { font-family: var(--font-num); font-weight: 700; font-size: 24px; color: #fff1c4; }
.event-day small { font-family: var(--font-display); font-size: 12.5px; letter-spacing: 0.06em; }
.event-row h3 { font-family: var(--font-quest); font-size: 19px; margin: 4px 0; color: #f6d98b; text-shadow: 0 2px 0 #000; }
.event-row.past { opacity: 0.55; }
.signup-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.signup-col { font-size: 14.5px; padding: 10px 12px; border-radius: 2px; background: #0a0604; border: 1px solid #3d2e18; box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7); }
.signup-col strong { display: block; margin-bottom: 4px; font-family: var(--font-display); font-weight: 400; font-size: 14px; color: var(--gold); }
.event-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Downloads */
.dl-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 18px 24px; }
.dl-row + .dl-row { border-top: 1px solid var(--line-neutral); }
.dl-row h3 { font-family: var(--font-quest); font-size: 17px; color: #f6d98b; }

/* ---------- Karteikarte (Seitenleiste rechts) ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: radial-gradient(ellipse at 30% 50%, rgba(8, 5, 3, 0.45), rgba(0, 0, 0, 0.8)); animation: fade-in 0.2s ease; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  width: min(640px, 100vw);
  overflow-y: auto;
  background-color: #130d08;
  background-image: var(--tex-stone);
  background-size: var(--tex-stone-size);
  box-shadow: -1px 0 0 #000, -2px 0 0 var(--bronze), -3px 0 0 #000, -30px 0 80px -20px #000;
  animation: drawer-in 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head {
  position: relative;
  padding: 28px 28px 22px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--cls, var(--gold)) 20%, transparent), transparent 60%);
  border-bottom: 1px solid var(--line);
}
.drawer-head::after { content: ''; position: absolute; left: 50%; bottom: -14px; width: 200px; height: 28px; transform: translateX(-50%); background: var(--divider) center / contain no-repeat; }
.drawer-close { position: absolute; top: 16px; right: 16px; }
.drawer-id { display: flex; gap: 18px; align-items: center; padding-right: 40px; }
.drawer-id h2 { font-family: var(--font-quest); font-size: 30px; color: var(--cls, var(--text)); text-shadow: 0 2px 0 #000, 0 0 16px rgba(0, 0, 0, 0.8); }
.drawer-id p { color: var(--text-dim); font-size: 16px; font-style: italic; }
.drawer-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.drawer-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.fact { padding: 9px 12px; border-radius: 2px; background: #0a0604; border: 1px solid #3d2e18; box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7); }
.fact span { display: block; font-family: var(--font-display); font-size: 13px; letter-spacing: 0.03em; color: var(--text-faint); }
.fact strong { font-family: var(--font-num); font-weight: 700; font-size: 18px; color: #f6d98b; }
.drawer-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.drawer-body { padding: 30px 28px 40px; display: grid; gap: 26px; }
.drawer-section h3 { font-family: var(--font-display); font-size: 16px; letter-spacing: 0.08em; color: var(--gold); margin-bottom: 12px; text-shadow: 0 1px 1px #000; display: flex; align-items: center; gap: 10px; }
.drawer-section h3::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.join-box { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 2px; background: linear-gradient(90deg, rgba(201, 163, 78, 0.16), rgba(0, 0, 0, 0.2)); border: 1px solid var(--bronze); box-shadow: 0 0 0 1px #000; }
.join-box strong { font-family: var(--font-display); font-weight: 400; font-size: 22px; color: #f6d98b; text-shadow: 0 2px 0 #000; }
.join-box small { display: block; color: var(--text-dim); font-size: 14px; font-style: italic; }

.note-form { display: grid; gap: 10px; padding: 14px; border-radius: 2px; background: rgba(0, 0, 0, 0.3); border: 1px solid #3d2e18; }
.note-form-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.note-form-row .select { width: auto; flex: 1 1 160px; }
.notes { display: grid; gap: 12px; margin-top: 12px; }
/* Notizen als kleine Pergamentzettel */
.note {
  --text: var(--parch-ink);
  --text-dim: var(--parch-ink-dim);
  --text-faint: #7a6043;
  position: relative;
  padding: 14px 16px 14px 18px;
  border-radius: 1px;
  color: var(--parch-ink);
  background-color: var(--parch);
  background-image: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 55%, rgba(120, 70, 20, 0.35) 100%), var(--tex-parch);
  background-size: auto, var(--tex-parch-size);
  border-left: 5px solid var(--note, #8a6a40);
  box-shadow: inset 0 0 18px rgba(92, 50, 12, 0.45), 0 3px 8px rgba(0, 0, 0, 0.55);
}
.note.pinned::before { content: ''; position: absolute; top: -5px; right: 18px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff9a7a, var(--crimson) 55%, #3a0805); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.6); }
.note-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-style: italic; color: var(--text-faint); margin-bottom: 6px; }
.note-head .chip { height: 22px; font-size: 12.5px; font-style: normal; }
.note-head .note-tools { margin-left: auto; display: flex; gap: 4px; }
.note-tools button { border: 0; background: transparent; color: var(--text-faint); cursor: pointer; padding: 3px 6px; border-radius: 2px; font-family: var(--font-display); font-size: 13px; font-style: normal; }
.note-tools button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.note .note-tools button:hover { color: var(--parch-red); background: rgba(90, 55, 20, 0.12); }
.note-body { white-space: pre-wrap; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.cat-info { --note: var(--info); } .cat-positiv { --note: var(--ok); } .cat-verwarnung { --note: var(--bad); }
.cat-probezeit { --note: var(--warn); } .cat-gespraech { --note: #b48cf0; } .cat-abwesenheit { --note: #8aa0b8; }
.chip.cat-info { color: #b2d3f5; } .chip.cat-positiv { color: #9be39f; } .chip.cat-verwarnung { color: #ffaaa0; }
.chip.cat-probezeit { color: #f6cd85; } .chip.cat-gespraech { color: #d2b8fb; } .chip.cat-abwesenheit { color: #c3cfdc; }
/* auf Pergament dunklere Tinte */
.note .chip { background: rgba(255, 245, 220, 0.4); border-color: rgba(90, 55, 20, 0.45); box-shadow: none; text-shadow: none; }
.note .chip.cat-info { color: #1d4f86; } .note .chip.cat-positiv { color: #2f6a1d; } .note .chip.cat-verwarnung { color: #8e1d12; }
.note .chip.cat-probezeit { color: #8a5a06; } .note .chip.cat-gespraech { color: #5b2f99; } .note .chip.cat-abwesenheit { color: #3f5266; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 1px solid var(--line-strong); display: grid; gap: 12px; }
.timeline li { position: relative; font-size: 15px; color: var(--text-dim); }
.timeline li::before { content: ''; position: absolute; left: -25px; top: 5px; width: 9px; height: 9px; transform: rotate(45deg); background: var(--surface-3); border: 1px solid var(--line-strong); box-shadow: 0 0 0 1px #000; }
.timeline li.join::before { background: var(--ok); }
.timeline li.leave::before { background: var(--bad); }
.timeline li.rank::before { background: var(--gold); }
.timeline time { display: block; font-size: 13.5px; font-style: italic; color: var(--text-faint); }

.alts { display: flex; flex-wrap: wrap; gap: 10px; }
.alt-chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 6px; border-radius: 2px; background: linear-gradient(180deg, #2c2116, #1a120b); border: 1px solid #4b3920; font-size: 15px; cursor: pointer; }
.alt-chip:hover { border-color: var(--gold); }
.alt-chip .avatar { --size: 24px; }
.ingame-note { font-size: 15px; padding: 10px 12px; border-radius: 2px; background: #0a0604; border: 1px solid #3d2e18; box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7); }
.ingame-note b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 13px; color: var(--gold); letter-spacing: 0.04em; margin-bottom: 2px; }

.password-reveal { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.password-reveal code { flex: 1; font-size: 18px !important; padding: 10px 14px !important; text-align: center; letter-spacing: 0.06em; }

/* ---------- Mobil ---------- */
@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-105%); transition: transform 0.25s ease; }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, 0.65); }
  .side-toggle { display: inline-flex; }
  .pagebar { padding: 12px 16px; }
  .pagebar-title h1 { font-size: 21px; }
  .view { padding: 20px 16px 50px; }
  .form-grid { grid-template-columns: 1fr; }
  .drawer-facts { grid-template-columns: repeat(2, 1fr); }
  .signup-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pagebar { flex-wrap: wrap; }
  .pagebar-actions { width: 100%; justify-content: flex-start; }
  .event-row { grid-template-columns: 58px 1fr; padding: 18px 20px; }
  .event-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .drawer-head, .drawer-body { padding-left: 18px; padding-right: 18px; }
  .drawer-id h2 { font-size: 25px; }
  .login-card { padding: 34px 24px 28px; }
  .login-card h1 { font-size: 18px; }
  .box, .settings-section { padding: 22px 20px; }
  .card > .table-wrap { margin: 10px; }
  .toolbar .select { flex: 1 1 140px; min-width: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 16px 16px 14px; }
  .kpi-value { font-size: 27px; }
  .kpi-label { font-size: 13px; }
  .segmented { display: flex; flex-wrap: wrap; }
  .segmented button { flex: 1 1 auto; white-space: nowrap; padding: 7px 10px; }
  .hide-sm { display: none; }
}
@media (max-width: 360px) {
  .login-card h1 { white-space: normal; }
}

/* ---------- Kickliste & Abmeldungen ---------- */
button.kpi { font: inherit; text-align: left; cursor: pointer; width: 100%; }
button.kpi:hover { filter: brightness(1.15); transform: translateY(-2px); }
.table td .btn + .btn, .table td .btn + a.btn { margin-left: 4px; }
.table td small { font-size: 13px; }
.absence-past { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--text-faint); font-style: italic; }

/* ---------- Offiziersnotizen aus dem Addon-Import ---------- */
.cat-ingame { --note: #c9a34e; }
.chip.cat-ingame { color: #f2cf73; }
.note .chip.cat-ingame { color: #6b4a0c; }
/* Abgang einordnen: gekickt / selbst gegangen */
.dep-tools { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.dep-tools button { font: inherit; font-size: 12.5px; font-family: var(--font-display); padding: 1px 8px; border-radius: 2px; border: 1px solid #4b3920; background: rgba(0, 0, 0, 0.35); color: var(--text-dim); cursor: pointer; }
.dep-tools button:hover { color: #f6d98b; border-color: var(--gold); }
.member-cell small.offi-line { color: #d8b56a; font-style: normal; max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
