:root{--navy:#062b52;--red:#d60b2f;--blue:#0d4b83;--bg:#f4f7fb;--text:#172033;--muted:#67768a;--line:#dfe6ef;--white:#fff;--green:#17784d;--amber:#a56700}
*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--text);background:var(--bg)}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}.topbar{height:72px;background:var(--navy);color:white;display:flex;align-items:center;justify-content:space-between;padding:8px 24px;position:sticky;top:0;z-index:5;box-shadow:0 2px 10px #0002}.brand{display:flex;align-items:center;gap:12px;color:white}.brand:hover{text-decoration:none}.brand img{height:54px;width:54px;object-fit:contain;background:white;border-radius:12px;padding:3px}.brand strong{font-size:19px;display:block}.brand small{opacity:.75}.user-menu{display:flex;align-items:center;gap:14px;font-size:14px}.layout{display:grid;grid-template-columns:230px minmax(0,1fr);min-height:calc(100vh - 72px)}.sidebar{background:#fff;border-right:1px solid var(--line);padding:20px 14px}.sidebar a{display:block;padding:10px 12px;border-radius:8px;color:#344258;margin-bottom:4px;font-weight:600}.sidebar a.active,.sidebar a:hover{background:#eaf1f8;color:var(--navy);text-decoration:none}.content{padding:28px;max-width:1500px;width:100%;margin:auto}.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}.page-head h1{margin:0;font-size:27px}.muted{color:var(--muted)}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin-bottom:22px}.card,.panel{background:white;border:1px solid var(--line);border-radius:12px;box-shadow:0 2px 8px #19324d0a}.card{padding:17px}.card .value{font-size:28px;font-weight:800;color:var(--navy)}.card .label{color:var(--muted);font-size:13px;margin-top:4px}.panel{padding:18px;margin-bottom:20px}.filters{display:grid;grid-template-columns:2fr repeat(4,minmax(120px,1fr)) auto;gap:10px;align-items:end}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;background:white}.data-table th,.data-table td{padding:11px 10px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}.data-table th{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:#66758a;background:#f8fafc}.data-table tr:hover td{background:#fbfdff}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;padding:9px 13px;font-weight:700;cursor:pointer;background:#e9eef5;color:#24364d}.btn:hover{text-decoration:none;filter:brightness(.98)}.btn.primary{background:var(--navy);color:white}.btn.red{background:var(--red);color:white}.btn.small{padding:6px 9px;font-size:13px}.badge{display:inline-block;border-radius:99px;padding:4px 8px;font-size:12px;font-weight:700;background:#e9eef5;color:#3b4b60}.badge.accepted{background:#e3f5ec;color:#126541}.badge.declined{background:#fbe7ea;color:#a40f2a}.badge.tombola{background:#e8efff;color:#1c4e9b}.badge.asked{background:#fff2d8;color:#805000}.badge.not_asked,.badge.no_answer{background:#eef1f4;color:#54606e}.badge.billing{background:#dff4e9;color:#126541}.badge.openbilling{background:#fff1d8;color:#805000}.badge.no-billing{background:#eef1f4;color:#465568}.billing-box{border:1px solid var(--line);border-radius:9px;padding:12px 14px;display:flex;flex-direction:column;gap:8px}.billing-title{font-size:13px;font-weight:800;color:#4c5b70}.billing-option{display:flex;flex-direction:row;align-items:center;gap:8px;font-weight:700}.billing-option input{width:auto}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.form-grid h2{margin:8px 0 0}.span2{grid-column:1/-1}label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700;color:#4c5b70}input,select,textarea{width:100%;border:1px solid #cfd9e5;border-radius:8px;padding:10px 11px;font:inherit;background:white;color:var(--text)}textarea{min-height:95px;resize:vertical}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.alert{padding:12px 14px;border-radius:9px;margin-bottom:16px}.alert.success{background:#e5f7ee;color:#14613f}.alert.danger{background:#fde9ec;color:#971a30}.alert.info{background:#eaf2fb;color:#194f7c}.login-bg{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(145deg,#edf3f8,#fff)}.login-card,.setup-card{width:min(470px,100%);background:white;border:1px solid var(--line);border-radius:18px;box-shadow:0 18px 55px #17324d22;padding:28px}.setup-card{width:min(720px,100%)}.brand-center{text-align:center;margin-bottom:22px}.brand-center img{height:110px;width:110px;object-fit:contain}.brand-center h1{margin:6px 0 0;color:var(--navy)}.brand-center p{margin:3px 0;color:var(--muted)}.year-tabs{display:flex;gap:7px;flex-wrap:wrap}.year-tabs a{padding:7px 11px;background:white;border:1px solid var(--line);border-radius:7px;font-weight:700}.year-tabs a.active{background:var(--navy);color:white}.inline{display:inline}.right{text-align:right}.empty{padding:30px;text-align:center;color:var(--muted)}code{background:#f1f4f7;border-radius:5px;padding:2px 5px}@media(max-width:900px){.layout{grid-template-columns:1fr}.sidebar{display:flex;overflow:auto;border-right:0;border-bottom:1px solid var(--line);padding:10px}.sidebar a{white-space:nowrap;margin:0 3px}.content{padding:18px}.filters{grid-template-columns:1fr 1fr}.form-grid{grid-template-columns:1fr}.span2{grid-column:auto}.user-menu .name{display:none}}@media(max-width:560px){.topbar{padding:8px 12px}.brand small{display:none}.brand strong{font-size:16px}.content{padding:14px}.page-head{align-items:flex-start;flex-direction:column}.filters{grid-template-columns:1fr}.cards{grid-template-columns:1fr 1fr}}
.alert.warning{background:#fff4d8;color:#795000}.checkline{display:flex;flex-direction:row;align-items:flex-start;gap:9px;font-weight:600}.checkline input{width:auto;margin-top:3px}.checkline small{display:block;margin-top:4px;font-weight:400}.checks{display:flex;gap:10px 18px;flex-wrap:wrap;margin-top:10px}.permission-box{border:1px solid var(--line);border-radius:10px;padding:14px;background:#f9fbfd}.filters.compact{grid-template-columns:minmax(260px,1fr) auto}.truncate{max-width:260px;overflow:hidden;text-overflow:ellipsis}.alert ul{margin:8px 0}.data-table form{margin:0}
.similar-sponsors{border:1px solid #e6c66b;background:#fffaf0;border-radius:10px;padding:12px 14px;margin-top:-4px}.similar-title{display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin-bottom:9px;color:#6f5000}.similar-title span{font-size:12px;font-weight:600}.similar-list{display:grid;gap:8px}.similar-item{background:#fff;border:1px solid #eadfbf;border-radius:8px;padding:9px 11px;display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:6px 14px;align-items:center}.similar-item>div:nth-child(2){display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.similar-owner{font-size:13px;color:#4c5b70}.similar-item small{grid-column:1/-1}.similar-loading{font-size:13px;color:#765a18;font-weight:600}@media(max-width:700px){.similar-item{grid-template-columns:1fr}.similar-item>div:nth-child(2){justify-content:flex-start}.similar-title{align-items:flex-start;flex-direction:column;gap:3px}}

/* Live-Filter auf Übersichtsseiten */
[data-live-results]{transition:opacity .12s ease}
[data-live-results].live-loading{opacity:.55;pointer-events:none}

/* Übernahmeanfragen v0.3.7 */
.nav-count{display:inline-flex;min-width:20px;height:20px;padding:0 6px;margin-left:6px;align-items:center;justify-content:center;border-radius:99px;background:var(--red);color:#fff;font-size:11px;font-weight:800}.sidebar a.active .nav-count{background:#fff;color:var(--red)}
.similar-item .transfer-request-btn{margin-left:4px;white-space:nowrap}.transfer-decision-form{display:grid;gap:7px;min-width:260px}.transfer-decision-form input{padding:7px 9px;font-size:12px}.transfer-decision-form .actions{flex-wrap:nowrap}

/* v0.3.11: Filter-Aktionsbuttons einheitlich ausrichten */
.filters>.btn{height:40px;min-height:40px;align-self:end;line-height:1}

/* v0.3.13: Sponsoring-Dashboard und Beitragsverlauf */
.panel-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.panel-title h2{margin:0 0 4px;font-size:19px}.line-chart{width:100%;overflow:hidden;color:var(--navy)}.line-chart svg{display:block;width:100%;height:auto;min-height:240px;max-height:360px}.chart-grid{stroke:#dfe6ef;stroke-width:1}.chart-axis,.chart-year{fill:#67768a;font-size:12px}.chart-year{font-weight:700}.chart-line{fill:none;stroke:var(--navy);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.chart-dot{fill:var(--red);stroke:#fff;stroke-width:3}.chart-value{fill:var(--navy);font-size:11px;font-weight:800}.chart-empty{padding:36px;text-align:center;color:var(--muted)}.chart-history-table{margin-top:14px;border-top:1px solid var(--line);padding-top:8px}
@media(max-width:700px){.line-chart{overflow-x:auto}.line-chart svg{min-width:680px}.panel-title{flex-direction:column}}

/* v0.3.16: Copyright-Fusszeile */
.site-footer{text-align:center;padding:14px 16px 18px;color:var(--muted);font-size:12px;background:var(--bg)}
.site-footer a{color:var(--muted);font-weight:700}.site-footer a:hover{color:var(--navy)}
.layout{min-height:calc(100vh - 72px - 44px)}
.login-bg .site-footer{position:fixed;left:0;right:0;bottom:0;background:transparent;padding-bottom:12px}

/* v0.3.25: visueller HTML-Mail-Editor mit Inline-Bildern */
.mail-editor-label{font-size:13px;font-weight:700;color:#4c5b70;margin-bottom:6px}.mail-editor-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px;border:1px solid #cfd9e5;border-bottom:0;border-radius:8px 8px 0 0;background:#f8fafc}.mail-editor{min-height:280px;padding:16px;border:1px solid #cfd9e5;border-radius:0 0 8px 8px;background:#fff;color:#172033;font-family:Helvetica,Arial,sans-serif;line-height:1.5;outline:none;overflow:auto}.mail-editor:focus{border-color:#83a8c8;box-shadow:0 0 0 3px #0d4b8314}.mail-editor img{max-width:100%;height:auto}.mail-editor p:first-child{margin-top:0}.mail-editor p:last-child{margin-bottom:0}

/* v0.3.30: Gamification / Sponsoring-Sammler-Badges */
.page-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:wrap}.collector-status{display:flex;align-items:center;gap:10px;padding:7px 12px 7px 8px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 2px 8px #19324d0a;min-height:54px}.collector-status img{width:52px;height:52px;object-fit:contain}.collector-status strong{display:block;color:var(--navy);font-size:13px}.collector-status span{display:block;color:var(--muted);font-size:11px;margin-top:2px}.collector-no-badge{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:#edf2f7;color:#8b98a9;font-size:23px;font-weight:900}@media(max-width:700px){.page-head-actions{width:100%;justify-content:flex-start}.collector-status{flex:1;min-width:230px}}
.ranking-badge{display:flex;align-items:center;gap:8px}.ranking-badge img{width:46px;height:46px;object-fit:contain}.ranking-badge span{font-weight:700;color:var(--navy)}

/* Multi-year sponsorship agreements v0.3.34 */
.agreement-card{border:1px solid var(--border,#dbe2ea);border-radius:12px;padding:16px;margin:14px 0;background:#fff}.agreement-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-bottom:12px}.agreement-edit{border-top:1px solid #edf0f3;padding-top:12px}.agreement-new{margin-top:14px;border-top:1px solid #edf0f3;padding-top:12px}.agreement-new summary{cursor:pointer;font-weight:700}.table-input{min-width:120px;padding:7px 9px}.agreement-expiring{display:grid;gap:8px}.agreement-expiring>div{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #edf0f3}.agreement-expiring>div:last-child{border-bottom:0}.agreement-expiring span{color:#64748b}@media(max-width:700px){.agreement-head,.agreement-expiring>div{display:block}.agreement-head .btn{margin-top:8px}}

/* Early termination of multi-year agreements v0.3.36 */
.agreement-end-early{margin-top:12px;border-top:1px solid #edf0f3;padding-top:12px}.agreement-end-early summary{cursor:pointer;font-weight:700;color:#9f1239}.btn.danger{background:#be123c;color:#fff;border-color:#be123c}.btn.danger:hover{background:#9f1239;border-color:#9f1239}

/* v0.3.38: aufgeräumte Navigation und Sponsor-Detailansicht */
.sidebar{padding-top:14px}.sidebar-group{margin-bottom:18px}.sidebar-label{padding:6px 12px 5px;color:#8a98aa;font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}.sidebar-group:last-child{margin-bottom:0}.detail-tabs{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:-6px 0 20px;padding:6px;background:#eaf0f6;border:1px solid var(--line);border-radius:11px}.detail-tabs a{display:inline-flex;align-items:center;gap:6px;padding:9px 13px;border-radius:8px;color:#43546a;font-weight:800;font-size:13px}.detail-tabs a:hover{background:#fff;text-decoration:none;color:var(--navy)}.detail-tabs a.active{background:#fff;color:var(--navy);box-shadow:0 1px 4px #18344f18}.tab-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:#e6edf5;color:#53647a;font-size:11px}.detail-tabs a.active .tab-count{background:var(--navy);color:#fff}.sponsor-head{margin-bottom:16px}.agreement-panel,.chart-history-table{scroll-margin-top:92px}
@media(max-width:900px){.sidebar{gap:4px}.sidebar-group{display:flex;align-items:center;margin:0 8px 0 0}.sidebar-label{display:none}.detail-tabs{overflow-x:auto;flex-wrap:nowrap}.detail-tabs a{white-space:nowrap}}

/* v0.3.45: Anwendungsversion im Footer */
.site-footer::after{content:" · v0.3.45";font-weight:600}
/* Injected by the development deployment workflow only. */
.topbar .brand::after{
  content:"DEV";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:4px;
  padding:4px 8px;
  border-radius:999px;
  background:#d97706;
  color:#fff;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  line-height:1;
  box-shadow:0 1px 4px #0003;
}
.login-card .brand-center::after{
  content:"DEV";
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:10px;
  padding:5px 9px;
  border-radius:999px;
  background:#d97706;
  color:#fff;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  line-height:1;
}
