/* ScriptHive Hub – baut auf /style.css auf (Farben, Buttons, Nav, Footer) */

.hub-main { padding: 2rem 0 4rem; min-height: 70vh; position: relative; }
.hub-badge { font-size: .62em; font-weight: 700; background: var(--honey); color: var(--on-honey); padding: .1em .45em; border-radius: 6px; vertical-align: middle; margin-left: .2em; }
.hub-nav { display: flex; align-items: center; gap: .8rem; }
.hub-me { display: flex; align-items: center; gap: .5rem; color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.hub-me img { width: 32px; height: 32px; border-radius: 50%; }
@media (max-width: 560px) { .hub-me span { display: none; } }
.hub-logout { display: inline-flex; align-items: center; gap: .4em; }
.hub-logout svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hub-logout:hover { border-color: #d9480f; color: #d9480f; }
@media (max-width: 560px) { .hub-logout span { display: none; } }
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-danger { background: #d9480f; border-color: #d9480f; color: #fff; }
.btn.is-starred { border-color: var(--honey); color: var(--honey-strong); }
.hub-count { display: inline-block; margin-left: .3em; padding: 0 .45em; border-radius: 999px; background: var(--bg-alt); font-size: .85em; }
.hub-muted { color: var(--muted); font-size: .92rem; }
.hub-right { text-align: right; white-space: nowrap; }
.hub-narrow { max-width: 680px; }

/* Meldungen */
.hub-flash { padding: .8rem 1.1rem; border-radius: 10px; margin: 0 0 1rem; border: 1px solid; font-size: .95rem; }
.hub-flash-ok { border-color: #2f9e44; background: color-mix(in srgb, #2f9e44 12%, transparent); }
.hub-flash-error { border-color: #d9480f; background: color-mix(in srgb, #d9480f 12%, transparent); }

/* Hinweis für Gäste */
.hub-gate-bg { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; filter: blur(5px); opacity: .5; pointer-events: none; user-select: none; }
.hub-skeleton div { height: 14px; border-radius: 6px; background: var(--border); margin-bottom: .8rem; }
.hub-skeleton div:first-child { width: 55%; height: 18px; }
.hub-skeleton div:last-child { width: 35%; margin: 0; }
.hub-gate {
  position: absolute; left: 50%; top: 2.5rem; transform: translateX(-50%);
  width: min(560px, calc(100% - 32px)); text-align: center;
  background: var(--surface); border: 1px solid var(--honey); border-radius: 18px;
  padding: 2.2rem 2rem; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55);
  animation: gateIn .5s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes gateIn { from { opacity: 0; transform: translate(-50%, 20px) scale(.97); } }
.hub-gate-icon { font-size: 3rem; margin-bottom: .3rem; }
.hub-gate h1 { font-size: 1.9rem; }
.hub-gate p { color: var(--muted); }
.hub-gate-btn { margin: .6rem 0 1rem; font-size: 1.05rem; }
.hub-gate-small { font-size: .85rem; }

/* Übersicht */
.hub-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hub-hero h1 { margin-bottom: .2em; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.hub-hero p { color: var(--muted); margin: 0; }
.hub-hero-stats { display: flex; gap: 1.2rem; color: var(--muted); font-size: .95rem; }
.hub-hero-stats { flex-wrap: wrap; align-items: center; }
.hub-hero-stats b { color: var(--text); font-size: 1.15rem; }
.hub-storage { display: grid; gap: .3rem; min-width: 200px; }
.hub-storage-bar { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.hub-storage-bar span { display: block; height: 100%; background: var(--honey); border-radius: 99px; }
.hub-storage.is-full .hub-storage-bar span { background: #d9480f; }
.hub-storage small { font-size: .8rem; }
.hub-toolbar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.hub-toolbar input[type=search] { flex: 1 1 240px; }
.hub-toolbar input, .hub-toolbar select, .hub-form input:not([type=checkbox]):not([type=radio]) {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: .55em .8em;
}
.hub-toolbar input:focus, .hub-form input:focus, .hub-toolbar select:focus { outline: none; border-color: var(--honey); box-shadow: 0 0 0 3px color-mix(in srgb, var(--honey) 22%, transparent); }

.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.hub-card {
  display: flex; flex-direction: column; gap: .5rem; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem 1.3rem;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.hub-card:hover { border-color: var(--honey); transform: translateY(-2px); box-shadow: var(--shadow); }
.hub-card p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.hub-card-head { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.hub-card-head img { width: 24px; height: 24px; border-radius: 50%; }
.hub-card-head strong { color: var(--honey-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-card-owner { color: var(--muted); white-space: nowrap; }
.hub-meta { display: flex; gap: .9rem; flex-wrap: wrap; color: var(--muted); font-size: .85rem; align-items: center; }
.hub-meta-right { margin-left: auto; }

.hub-empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.hub-empty h2 { color: var(--text); font-size: 1.4rem; }
.hub-empty-icon { font-size: 3rem; }

/* Repository */
.hub-repo-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hub-repo-title { display: flex; align-items: center; gap: .45rem; font-size: 1.45rem; flex-wrap: wrap; }
.hub-repo-title img { width: 34px; height: 34px; border-radius: 50%; }
.hub-repo-title a { color: var(--text); text-decoration: none; }
.hub-repo-title a strong { color: var(--honey-strong); }
.hub-repo-title span { color: var(--muted); }
.hub-repo-title-small { font-size: 1.1rem; margin-bottom: .6rem; }
.hub-repo-title-small img { width: 24px; height: 24px; }
.hub-repo-actions { display: flex; gap: .5rem; align-items: center; }
.hub-repo-actions form { margin: 0; }
.hub-repo-desc { color: var(--muted); margin: .6rem 0 .4rem; }
.hub-repo-meta { margin: .6rem 0 1.4rem; }

.hub-tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: 1.3rem; overflow-x: auto; }
.hub-tabs a { padding: .65rem 1rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; font-size: .95rem; }
.hub-tabs a:hover { color: var(--text); }
.hub-tabs a.active { color: var(--text); border-bottom-color: var(--honey); }

.hub-breadcrumb { font-family: var(--mono); font-size: .92rem; margin-bottom: .8rem; color: var(--muted); }
.hub-breadcrumb a { color: var(--honey-strong); text-decoration: none; }

.hub-files { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 1.5rem; }
.hub-files td { padding: .6rem 1rem; border-bottom: 1px solid var(--border); font-size: .94rem; }
.hub-files tr:last-child td { border-bottom: 0; }
.hub-files tr:hover td { background: var(--bg-alt); }
.hub-files a { color: var(--text); text-decoration: none; }
.hub-files a:hover { color: var(--honey-strong); text-decoration: underline; }
.hub-commitmsg { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .hub-commitmsg { display: none; } }

.hub-readme { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.hub-readme-head { padding: .6rem 1rem; border-bottom: 1px solid var(--border); font-weight: 600; font-size: .92rem; }
.hub-md { padding: 1.2rem 1.5rem; line-height: 1.7; overflow-wrap: anywhere; }
.hub-md h1, .hub-md h2 { border-bottom: 1px solid var(--border); padding-bottom: .3em; }
.hub-md h1 { font-size: 1.8rem; } .hub-md h2 { font-size: 1.4rem; margin-top: 1.4em; } .hub-md h3 { font-size: 1.15rem; margin-top: 1.2em; }
.hub-md code { font-family: var(--mono); font-size: .88em; background: var(--bg-alt); padding: .15em .4em; border-radius: 5px; }
.hub-md pre { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; overflow-x: auto; }
.hub-md pre code { background: none; padding: 0; }
.hub-md blockquote { margin: 0 0 1em; padding: .2em 1em; border-left: 4px solid var(--honey); color: var(--muted); }
.hub-md a { color: var(--honey-strong); }
.hub-md-file { border: 1px solid var(--border); border-top: 0; }

/* Datei-Ansicht */
.hub-blob { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); margin-bottom: 1.5rem; }
.hub-blob-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .8rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.hub-blob-head strong { margin-right: .5rem; }
.hub-blob-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.hub-blob-actions form { margin: 0; }
.hub-code-wrap { overflow-x: auto; }
.hub-code { border-collapse: collapse; font-family: var(--mono); font-size: .86rem; line-height: 1.55; width: 100%; }
.hub-code td { padding: 0 1rem; vertical-align: top; }
.hub-code .ln { width: 1%; text-align: right; color: var(--muted); opacity: .6; user-select: none; border-right: 1px solid var(--border); padding-right: .8rem; }
.hub-code .ln::before { content: attr(data-ln); }
.hub-code .lc { white-space: pre; tab-size: 4; }
.hub-code tr:hover td { background: color-mix(in srgb, var(--honey) 8%, transparent); }
.hub-image { padding: 1.5rem; text-align: center; background: repeating-conic-gradient(var(--bg-alt) 0 25%, transparent 0 50%) 0 0 / 20px 20px; }
.hub-image img { max-width: 100%; max-height: 70vh; }

/* Verlauf */
.hub-commits { list-style: none; padding: 0; margin: 0 0 1.5rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.hub-commits li { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.hub-commits li:last-child { border-bottom: 0; }
.hub-commits li > div { flex: 1; min-width: 0; }
.hub-commits img { width: 32px; height: 32px; border-radius: 50%; }
.hub-commits a { color: var(--text); text-decoration: none; }
.hub-commits a:hover strong { color: var(--honey-strong); }
.hub-sha { font-family: var(--mono); font-size: .82rem; color: var(--muted); background: var(--bg-alt); padding: .2em .5em; border-radius: 6px; }
.hub-commit-box { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; }
.hub-commit-box h1 { font-size: 1.4rem; }
.hub-commit-author { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.hub-commit-author img { width: 26px; height: 26px; border-radius: 50%; }

/* Formulare */
.hub-form { display: grid; gap: 1.1rem; }
.hub-form label { display: grid; gap: .4rem; font-weight: 600; font-size: .95rem; }
.hub-form small { font-weight: 400; color: var(--muted); }
.hub-form input, .hub-toolbar input, .hub-toolbar select { font-weight: 400; }
.hub-form .hub-check { display: flex; gap: .55rem; align-items: center; font-weight: 400; }
.hub-check input { width: 18px; height: 18px; accent-color: var(--honey); }
.hub-form .btn { justify-self: start; }
.hub-input-prefix { display: flex; align-items: stretch; }
.hub-input-prefix span { display: flex; align-items: center; padding: 0 .8em; background: var(--bg-alt); border: 1px solid var(--border); border-right: 0; border-radius: 8px 0 0 8px; color: var(--muted); font-weight: 400; white-space: nowrap; }
.hub-input-prefix input { flex: 1; border-radius: 0 8px 8px 0 !important; min-width: 0; }

.hub-drop { border: 2px dashed var(--border); border-radius: 14px; padding: 2rem 1rem; text-align: center; transition: border-color .2s, background .2s; }
.hub-drop.is-over { border-color: var(--honey); background: color-mix(in srgb, var(--honey) 8%, transparent); }
.hub-drop-icon { font-size: 2.4rem; }
.hub-drop p { margin: .3rem 0; }
.hub-drop-buttons { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin: .8rem 0; }
.hub-selected { list-style: none; padding: 0; margin: .8rem auto 0; max-width: 560px; max-height: 220px; overflow-y: auto; text-align: left; font-family: var(--mono); font-size: .85rem; }
.hub-selected li { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem .5rem; border-bottom: 1px solid var(--border); }
.hub-selected li.too-big { color: #d9480f; }
/* gesammelte Auswahl (mehrere Ordner/Dateien) */
.hub-groups { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; margin: .8rem auto 0; max-width: 700px; }
.hub-groups:empty { display: none; }
.hub-group { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .35rem .3rem .75rem; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); font-size: .88rem; animation: rowIn .3s ease both; max-width: 100%; }
.hub-group b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.hub-group small { color: var(--muted); white-space: nowrap; }
.hub-group.has-big { border-color: #d9480f; }
.hub-group button { border: 0; background: none; color: var(--muted); cursor: pointer; width: 1.6rem; height: 1.6rem; border-radius: 50%; font-size: .85rem; line-height: 1; }
.hub-group button:hover { background: color-mix(in srgb, #d9480f 15%, transparent); color: #d9480f; }
.hub-group-clear { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .85rem; text-decoration: underline; }
.hub-group-clear:hover { color: #d9480f; }
.hub-subdirs { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; padding: .7rem; margin-top: .2rem;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); animation: rowIn .3s ease both; }
.hub-subdirs-head { flex-basis: 100%; display: flex; justify-content: center; gap: .8rem; align-items: baseline; font-weight: 700; font-size: .9rem; margin-bottom: .2rem; }
.hub-form .hub-subdir { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem .25rem .45rem; border: 1px solid var(--honey); border-radius: 999px;
  font-size: .85rem; cursor: pointer; background: color-mix(in srgb, var(--honey) 10%, transparent); transition: opacity .15s, background .15s; user-select: none; }
.hub-subdir input { width: 16px; height: 16px; accent-color: var(--honey); margin: 0; }
.hub-subdir small { color: var(--muted); white-space: nowrap; }
.hub-subdir.is-off { border-color: var(--border); background: none; opacity: .55; }
.hub-subdir.is-off b { text-decoration: line-through; }
.hub-selected li.too-big { font-weight: 700; background: color-mix(in srgb, #d9480f 10%, transparent); }
.hub-selected li.too-big.is-left-out { color: var(--muted); font-weight: 400; background: none; text-decoration: line-through; }
.hub-selected li.too-big-head { align-items: center; color: #d9480f; font-family: inherit; font-weight: 700; border-bottom: 0; padding-top: .5rem; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.hub-selected li.is-skipped { color: var(--muted); font-family: inherit; font-style: italic; }

/* Upload-Fortschritt */
.hub-progress { padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); animation: fadeUp .35s ease both; }
.hub-progress[hidden] { display: none; }
.hub-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-weight: 700; margin-bottom: .55rem; }
.hub-progress-head b { font-family: var(--mono); color: var(--honey-strong); font-variant-numeric: tabular-nums; }
.hub-progress-bar { height: 14px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); overflow: hidden; }
.hub-progress-bar span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .25s ease-out;
  background: linear-gradient(90deg, var(--honey), var(--honey-strong)); box-shadow: 0 0 12px color-mix(in srgb, var(--honey) 55%, transparent); }
.hub-progress-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .55rem; min-height: 1.6rem; }
.hub-progress-foot small { color: var(--muted); font-variant-numeric: tabular-nums; }
.hub-progress-foot .btn[hidden] { display: none; }
/* Phase 2: Virenscan & Speichern – laufende Waben-Streifen */
.hub-progress.is-processing .hub-progress-bar span {
  background: repeating-linear-gradient(-45deg, var(--honey) 0 12px, var(--honey-strong) 12px 24px); background-size: 34px 34px;
  animation: progressStripes .8s linear infinite; }
@keyframes progressStripes { to { background-position: 34px 0; } }
.hub-progress.is-processing .hub-progress-head span { animation: progressPulse 1.4s ease-in-out infinite; }
@keyframes progressPulse { 50% { opacity: .55; } }
.hub-progress.is-done { border-color: #2f9e44; }
.hub-progress.is-done .hub-progress-bar span { background: #2f9e44; box-shadow: none; }
.hub-progress.is-error { border-color: #d9480f; color: #d9480f; }
.hub-progress.is-error .hub-progress-bar { display: none; }
/* Während des Uploads: Drop-Feld gedimmt, Icon hüpft */
.hub-upload.is-uploading .hub-drop { opacity: .6; pointer-events: none; }
.hub-upload.is-uploading .hub-drop-icon { animation: floaty 1.2s ease-in-out infinite; }

.hub-danger { margin-top: 2.5rem; padding: 1.2rem 1.4rem; border: 1px solid #d9480f; border-radius: 12px; }
.hub-danger h3 { color: #d9480f; }

/* Profil */
.hub-profile { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; }
.hub-profile img { width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--honey); }
.hub-profile h1 { margin-bottom: .1em; }

/* Sichtbarkeit */
.hub-private { display: inline-block; font-size: .72rem; font-weight: 700; padding: .15em .55em; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); white-space: nowrap; vertical-align: middle; }
.hub-repo-title .hub-private { font-size: .8rem; }

.hub-visibility { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.hub-visibility legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: .5rem; }
@media (max-width: 560px) { .hub-visibility { grid-template-columns: 1fr; } }

.hub-form .hub-radio {
  position: relative; display: flex; align-items: flex-start; gap: .8rem;
  padding: 1rem 1.1rem; border: 2px solid var(--border); border-radius: 12px;
  background: var(--surface); cursor: pointer; font-weight: 400;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.hub-form .hub-radio:hover { border-color: color-mix(in srgb, var(--honey) 55%, var(--border)); }
.hub-form .hub-radio:has(input:checked) {
  border-color: var(--honey);
  background: color-mix(in srgb, var(--honey) 9%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--honey) 18%, transparent);
}
.hub-form .hub-radio:has(input:focus-visible) { outline: 3px solid var(--honey-strong); outline-offset: 2px; }
/* echter Radio-Button unsichtbar, aber per Tastatur bedienbar */
.hub-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.hub-radio-icon { font-size: 1.6rem; line-height: 1; }
.hub-radio-text { display: grid; gap: .25rem; }
.hub-radio-text strong { font-size: 1rem; }
.hub-radio-text small { color: var(--muted); font-size: .88rem; line-height: 1.45; }
/* Häkchen oben rechts bei der gewählten Option */
.hub-form .hub-radio::after {
  content: ""; position: absolute; top: .7rem; right: .7rem; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface);
}
.hub-form .hub-radio:has(input:checked)::after {
  border-color: var(--honey); background: var(--honey)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='%231d1a14' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* Verwaltung (Inhaber) */
.hub-hide-sm { }
@media (max-width: 700px) { .hub-hide-sm { display: none; } }
.hub-admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.6rem; }
.hub-admin-stats > div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; display: flex; gap: .7rem; align-items: center; }
.hub-admin-stats b { font-size: 1.7rem; color: var(--honey-strong); line-height: 1; }
.hub-admin-stats span { font-size: .9rem; color: var(--muted); line-height: 1.3; }
.hub-admin-stats .hub-storage { grid-column: span 2; display: grid; }
@media (max-width: 560px) { .hub-admin-stats .hub-storage { grid-column: auto; } }
.hub-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }
.hub-admin-table { margin: 0; min-width: 760px; }
.hub-admin-table th { text-align: left; padding: .6rem 1rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.hub-admin-table td { vertical-align: middle; }
.hub-admin-table form { margin: 0; display: inline-flex; align-items: center; gap: .4rem; }
.hub-admin-user { display: inline-flex; align-items: center; gap: .5rem; }
.hub-admin-user img { width: 28px; height: 28px; border-radius: 50%; }
.hub-admin-actions { display: flex; gap: .4rem; justify-content: flex-end; align-items: center; }
.hub-act {
  display: inline-flex; align-items: center; gap: .35rem; height: 32px; padding: 0 .75rem;
  font: inherit; font-size: .82rem; font-weight: 600; white-space: nowrap; cursor: pointer;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  transition: border-color .15s, color .15s, background .15s;
}
.hub-act:hover { border-color: var(--honey); }
.hub-act-warn:hover { border-color: #faa61a; color: #faa61a; }
.hub-act-ok:hover { border-color: #3ba55d; color: #3ba55d; }
.hub-act-danger { color: #ed4245; border-color: color-mix(in srgb, #ed4245 40%, var(--border)); }
.hub-act-danger:hover { background: #ed4245; border-color: #ed4245; color: #fff; }
.hub-pill { display: inline-block; font: inherit; font-size: .8rem; font-weight: 600; padding: .25em .7em; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: default; white-space: nowrap; }
button.hub-pill { cursor: pointer; }
button.hub-pill:hover { border-color: var(--honey); }
.hub-pill.is-red { border-color: #d9480f; color: #d9480f; }
.hub-admin-table tr.is-blocked td { opacity: .65; }
.hub-small { font-size: .8rem; font-weight: 400; color: var(--muted); }
.hub-small input { width: 14px; height: 14px; }

/* ===== Animationen ===== */

/* Wandernde Waben im Hintergrund */
body.hub { position: relative; }
body.hub::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 66 0 50V17L28 1l28 16v33L28 66zm0 33V66m28-16v33M0 50v33' fill='none' stroke='%23f5a623' stroke-width='1'/%3E%3C/svg%3E");
  mask-image: radial-gradient(ellipse at 80% 0%, #000 0%, transparent 60%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 0%, #000 0%, transparent 60%);
  animation: hubDrift 60s linear infinite;
}
@keyframes hubDrift { to { background-position: 56px 98px; } }

/* Inhalte gleiten nacheinander herein */
.hub-hero, .hub-toolbar, .hub-repo-head, .hub-repo-desc, .hub-repo-meta, .hub-tabs, .hub-profile, .hub-admin-stats { animation: fadeUp .55s cubic-bezier(.2, .7, .2, 1) both; }
.hub-toolbar, .hub-repo-meta { animation-delay: .08s; }
.hub-tabs { animation-delay: .14s; }
.hub-grid .hub-card { animation: cardIn .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms + .1s); }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.hub-files tr, .hub-commits li { animation: rowIn .35s ease both; animation-delay: calc(var(--i, 0) * 25ms + .15s); }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } }
.hub-readme, .hub-blob, .hub-upload, .hub-narrow, .hub-commit-box { animation: fadeUp .55s .2s cubic-bezier(.2, .7, .2, 1) both; }
.hub-empty-icon { display: inline-block; animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-8px) rotate(-4deg); } }

/* Karten: Glanz beim Darüberfahren */
.hub-card { position: relative; overflow: hidden; }
.hub-card::after {
  content: ""; position: absolute; top: 0; left: -160%; width: 40%; height: 100%; pointer-events: none;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--honey) 14%, transparent), transparent);
  transform: skewX(-18deg); transition: left .7s ease;
}
.hub-card:hover::after { left: 130%; }
.hub-card-head img, .hub-repo-title img, .hub-me img { transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.hub-card:hover .hub-card-head img, .hub-me:hover img { transform: rotate(360deg) scale(1.1); }

/* Tabs: Unterstrich wächst */
.hub-tabs a { position: relative; border-bottom-color: transparent !important; }
.hub-tabs a::after { content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -1px; height: 2px; border-radius: 2px; background: var(--honey); transform: scaleX(0); transition: transform .25s ease; }
.hub-tabs a:hover::after { transform: scaleX(.5); }
.hub-tabs a.active::after { transform: scaleX(1); }

/* Stern hüpft */
.btn.is-starred { animation: starPop .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes starPop { 40% { transform: scale(1.18) rotate(-8deg); } }

/* Meldungen gleiten herein */
.hub-flash { animation: flashIn .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-12px); } }

/* Speicherbalken füllt sich */
.hub-storage-bar span { animation: barFill 1.2s .3s cubic-bezier(.2, .7, .2, 1) both; transform-origin: 0 50%; }
@keyframes barFill { from { transform: scaleX(0); } }

/* Upload-Feld pulsiert beim Darüberziehen */
.hub-drop.is-over { animation: dropPulse 1s ease-in-out infinite; }
@keyframes dropPulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--honey) 18%, transparent); } }
.hub-drop-icon { display: inline-block; transition: transform .3s; }
.hub-drop:hover .hub-drop-icon, .hub-drop.is-over .hub-drop-icon { transform: translateY(-6px); }
.hub-selected li { animation: rowIn .3s ease both; }

/* Code-Zeilen-Hervorhebung weich */
.hub-code tr td { transition: background .15s; }

@media (prefers-reduced-motion: reduce) {
  body.hub *, body.hub *::before, body.hub *::after, body.hub::before { animation: none !important; transition: none !important; }
}

/* ===== Meine Projekte ===== */
.pj-status { display: inline-flex; align-items: center; gap: .3em; font-size: .78rem; font-weight: 700; padding: .2em .65em; border-radius: 999px; white-space: nowrap; vertical-align: middle;
  color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
.pj-filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.pj-filter a { font-size: .88rem; padding: .35em .85em; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); text-decoration: none; background: var(--surface); }
.pj-filter a b { color: var(--text); margin-left: .2em; }
.pj-filter a.active, .pj-filter a:hover { border-color: var(--honey); color: var(--text); }
.pj-card { border-left: 4px solid var(--c); }
.pj-card-top { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.pj-card-top strong { font-size: 1.1rem; }
.pj-stale { color: #faa61a; font-weight: 600; }
.pj-new { cursor: default; }
.pj-new summary { cursor: pointer; font-weight: 700; color: var(--honey-strong); list-style: none; }
.pj-new summary::-webkit-details-marker { display: none; }
.pj-new[open] summary { margin-bottom: 1rem; }
.pj-new:not([open]) { display: grid; place-items: center; min-height: 120px; border-style: dashed; }

.pj-back a { color: var(--muted); text-decoration: none; }
.pj-back a:hover { color: var(--honey-strong); }
.pj-head { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; padding: 1.3rem 1.5rem; margin-bottom: 1.6rem;
  background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--c); border-radius: 14px; }
.pj-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.pj-head .hub-meta a { color: var(--honey-strong); text-decoration: none; }
.pj-edit summary, .pj-notes summary { list-style: none; cursor: pointer; }
.pj-edit summary::-webkit-details-marker, .pj-notes summary::-webkit-details-marker, .pj-add summary::-webkit-details-marker { display: none; }
.pj-edit[open] { flex-basis: 100%; }
.pj-edit[open] summary, .pj-notes details[open] summary { margin-bottom: 1rem; }

.pj-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .pj-cols { grid-template-columns: 1fr; } }
.pj-cols h2 { font-size: 1.3rem; }
.pj-add { margin-bottom: 1.2rem; }
.pj-add summary { list-style: none; display: inline-block; }
.pj-add[open] summary { margin-bottom: 1rem; }
.pj-add form { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem; }
.pj-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hub-form select, .hub-form textarea { font: inherit; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .55em .8em; }
.hub-form textarea { resize: vertical; }
.pj-notes-edit { font-family: var(--mono) !important; font-size: .9rem !important; line-height: 1.5; }

.pj-timeline { list-style: none; margin: 0; padding: 0 0 0 .2rem; position: relative; }
.pj-timeline::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.pj-timeline li { position: relative; display: flex; gap: .9rem; margin-bottom: 1rem; }
.pj-dot { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--honey); z-index: 1; font-size: .95rem; }
.pj-entry { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .7rem 1rem; }
.pj-entry-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.pj-entry-head form { margin-left: auto; }
.pj-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .9rem; padding: 0 .2rem; }
.pj-x:hover { color: #ed4245; }
.pj-body { padding: .4rem 0 0; font-size: .95rem; }
.pj-notes { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .4rem 1rem 1rem; }
.pj-notes .hub-md { padding: .8rem .3rem; }

/* Formular-Feinschliff: normale Schrift in Feldern, „(optional)“ in derselben Zeile */
.hub-form input:not([type=checkbox]):not([type=radio]), .hub-form select, .hub-form textarea { font-weight: 400; }
.hub-form label > span small { font-weight: 400; }
.pj-new::after { display: none; }
.pj-new form { text-align: left; }
.pj-checks { display: grid; gap: .55rem; padding: .8rem .9rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-alt); }
.pj-checks .hub-check { align-items: flex-start; }
.pj-checks .hub-check input { margin-top: .2rem; flex: none; }
.pj-checks .hub-check span { display: block; line-height: 1.45; }
.pj-checks small { display: block; color: var(--muted); margin-top: .1rem; }
.pj-checks input:disabled + span { opacity: .55; }

/* Kunden je Projekt */
.pj-customers { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; margin-bottom: 1.8rem; }
.pj-customers ul { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .4rem; }
.pj-customers li { display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem; border-radius: 8px; background: var(--bg-alt); }
.pj-customers li img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #9b59b6; }
.pj-customers li span { flex: 1; font-weight: 600; }
.pj-customers li form { margin: 0; }
.pj-add-customer { display: flex; gap: .5rem; }
.pj-add-customer select { flex: 1; font: inherit; font-weight: 400; color: var(--text); background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; padding: .45em .7em; min-width: 0; }
.pj-hint { margin: .6rem 0 0; font-size: .88rem; }

/* ===== Forum (synchron mit Discord) ===== */
.fm-new { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .9rem 1.2rem; margin-bottom: 1.4rem; }
.fm-new summary { cursor: pointer; font-weight: 700; color: var(--honey-strong); list-style: none; }
.fm-new summary::-webkit-details-marker { display: none; }
.fm-new[open] summary { margin-bottom: 1rem; }
.fm-tags { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.fm-tags legend { font-weight: 600; font-size: .95rem; margin-bottom: .4rem; padding: 0; }
.fm-tags label { display: inline-flex !important; cursor: pointer; }
.fm-tags input { position: absolute; opacity: 0; pointer-events: none; }
.fm-tags span { font-size: .85rem; font-weight: 600; padding: .3em .8em; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-alt); transition: border-color .15s, background .15s; }
.fm-tags input:checked + span { border-color: var(--honey); background: color-mix(in srgb, var(--honey) 16%, transparent); }
.fm-tags input:focus-visible + span { outline: 2px solid var(--honey-strong); outline-offset: 2px; }

.fm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.fm-item { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.fm-item:hover { border-color: var(--honey); transform: translateX(3px); }
.fm-item.is-solved { opacity: .75; }
.fm-state { font-size: 1.3rem; }
.fm-main { flex: 1; min-width: 0; display: grid; gap: .3rem; }
.fm-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-side { display: grid; justify-items: end; gap: .15rem; font-size: .85rem; white-space: nowrap; }
.fm-tags-row { display: flex; flex-wrap: wrap; gap: .3rem; }
.fm-tag { font-size: .72rem; font-weight: 700; padding: .12em .6em; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--muted); }

.fm-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; margin-bottom: 1.2rem; }
.fm-head h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: .4rem; }
.fm-head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.fm-head-actions form { margin: 0; }
.fm-msgs { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .8rem; }
.fm-msg { display: flex; gap: .8rem; align-items: flex-start; }
.fm-msg > img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.fm-bubble { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .7rem 1rem; }
.fm-msg.is-first .fm-bubble { border-color: var(--honey); }
.fm-msg.is-bot .fm-bubble { background: var(--bg-alt); }
.fm-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .3rem; font-size: .92rem; }
.fm-badge { font-size: .7rem; font-weight: 700; padding: .1em .55em; border-radius: 6px; background: color-mix(in srgb, var(--honey) 18%, transparent); color: var(--honey-strong); }
.fm-badge-bot { background: color-mix(in srgb, #5865f2 20%, transparent); color: #8b95ff; }
.fm-badge-web { background: var(--bg-alt); color: var(--muted); }
.fm-text { line-height: 1.6; overflow-wrap: anywhere; }
.fm-text pre, .fm-embed pre { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px; padding: .8rem; overflow-x: auto; margin: .5rem 0; }
.fm-text code, .fm-embed code { font-family: var(--mono); font-size: .88em; background: var(--bg-alt); padding: .1em .35em; border-radius: 4px; }
.fm-text pre code { background: none; padding: 0; }
.fm-text blockquote { margin: .3rem 0; padding-left: .8rem; border-left: 3px solid var(--border); color: var(--muted); }
.fm-mention { color: #8b95ff; background: color-mix(in srgb, #5865f2 15%, transparent); border-radius: 4px; padding: 0 .2em; }
.fm-embed { margin-top: .5rem; padding: .6rem .8rem; border-left: 4px solid var(--honey); background: var(--bg-alt); border-radius: 6px; font-size: .93rem; }
.fm-img { max-width: min(420px, 100%); border-radius: 8px; margin-top: .5rem; display: block; }
.fm-file { display: inline-block; margin-top: .4rem; color: var(--honey-strong); }
.fm-reply { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem; }
.fm-reply-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
