:root{
  --bg:#eef4fb;
  --bg2:#e3edf9;
  --panel:#f8fbff;
  --card:#ffffff;
  --card2:#f4f8fe;

  --text:#162235;
  --muted:#5e708b;
  --border:rgba(22,34,53,.12);
  --shadow:0 16px 40px rgba(35, 64, 108, .10);

  --accent:#4f8ff7;
  --accent2:#326fd8;
  --accentSoft:rgba(79,143,247,.14);

  --good:#1f9d68;
  --warn:#c98b12;
  --bad:#d94a63;

  --r:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  background:
    radial-gradient(1200px 700px at 10% -10%, rgba(79,143,247,.14), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(31,157,104,.08), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  color:var(--text);
  line-height:1.45;
}

.container{max-width:1180px;margin:0 auto;padding:16px}
a{color:inherit}

.topbar{
  background:rgba(248,251,255,.88);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
  position:sticky;
  top:0;
  z-index:20;
}

.topbar__inner{
  display:flex;
  align-items:center;
  gap:18px;
  min-height:72px;
}

.topbar__navwrap{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-width:0;
}

.brand{
  font-weight:900;
  letter-spacing:.3px;
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
  flex:0 0 auto;
}

.brand::before{
  content:"";
  width:10px;
  height:10px;
  border-radius:999px;
  background:var(--accent2);
  box-shadow:0 0 0 4px rgba(50,111,216,.16);
}

.nav{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.nav--main{
  min-width:0;
}

.nav--right{
  justify-content:flex-end;
  flex:0 0 auto;
}

.nav__link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:9px 14px;
  border-radius:12px;
  text-decoration:none;
  color:var(--text);
  font-weight:750;
  border:1px solid transparent;
  white-space:nowrap;
}

.nav__link:hover{
  background:rgba(79,143,247,.10);
}

.nav__link.is-active{
  background:rgba(79,143,247,.14);
  border-color:rgba(79,143,247,.18);
}

.nav__user{
  color:var(--muted);
  font-size:13px;
  padding:0 6px;
  white-space:nowrap;
}

.nav-menu{
  position:relative;
}

.nav-menu__summary{
  list-style:none;
  cursor:pointer;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 14px;
  border-radius:12px;
  background:rgba(255,255,255,.76);
  border:1px solid var(--border);
  font-weight:800;
  user-select:none;
  white-space:nowrap;
}

.nav-menu__summary::-webkit-details-marker{display:none}
.nav-menu__summary:hover{background:rgba(79,143,247,.08)}
.nav-menu__summary.is-active,
.nav-menu[open] .nav-menu__summary{
  background:rgba(79,143,247,.12);
  border-color:rgba(79,143,247,.18);
}

.nav-menu__dropdown{
  position:absolute;
  right:0;
  top:calc(100% + 8px);
  min-width:240px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
  padding:8px;
  display:grid;
  gap:6px;
}

.nav-menu__item{
  display:block;
  padding:10px 12px;
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
}

.nav-menu__item:hover{
  background:rgba(79,143,247,.08);
}

.nav-menu__item.is-active{
  background:rgba(79,143,247,.12);
}

.pagehead{margin:14px 0}
h1{margin:0;font-size:22px}
@media(min-width:900px){h1{font-size:24px}}

.card{
  background:linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(244,248,254,.98) 100%);
  border:1px solid var(--border);
  border-radius:var(--r);
  padding:14px;
  box-shadow:var(--shadow);
}
.card--soft{
  background:linear-gradient(180deg, rgba(245,249,255,.96) 0%, rgba(237,244,253,.96) 100%);
}

.grid{display:grid;gap:12px}
.grid-2{grid-template-columns:1fr}
.grid-3{grid-template-columns:1fr}
@media(min-width:900px){
  .grid-2{grid-template-columns:1fr 1fr}
  .grid-3{grid-template-columns:repeat(3, 1fr)}
}

.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.row--between{justify-content:space-between}
.muted{color:var(--muted)}
.kicker{font-size:12px;color:var(--muted)}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--text);
  background:rgba(79,143,247,.08);
}

.badge--tag{
  font-weight:800;
  border-width:1px;
}

.badge--tag-landesliga{
  color:#114c9d;
  border-color:rgba(50,111,216,.30);
  background:rgba(79,143,247,.16);
}

.badge--tag-unterliga{
  color:#176947;
  border-color:rgba(31,157,104,.28);
  background:rgba(31,157,104,.14);
}

.badge--tag-sonstige{
  color:#8a5c00;
  border-color:rgba(201,139,18,.30);
  background:rgba(201,139,18,.14);
}

.flash{
  border-radius:14px;
  padding:10px 12px;
  margin:10px 0;
  border:1px solid var(--border);
  background:rgba(79,143,247,.08);
  font-weight:700;
}
.flash--success{
  border-color:rgba(31,157,104,.32);
  background:rgba(31,157,104,.10);
}
.flash--error{
  border-color:rgba(217,74,99,.35);
  background:rgba(217,74,99,.10);
}
.flash--warning{
  border-color:rgba(201,139,18,.35);
  background:rgba(201,139,18,.10);
}

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:linear-gradient(180deg, var(--accent) 0%, var(--accent2) 100%);
  color:#ffffff;
  border:none;
  border-radius:14px;
  padding:10px 12px;
  text-decoration:none;
  cursor:pointer;
  font-weight:900;
  box-shadow:0 10px 24px rgba(50,111,216,.16);
}
.btn:hover{filter:brightness(1.03)}
.btn:focus{outline:3px solid rgba(79,143,247,.24);outline-offset:2px}
.btn--sm{padding:8px 10px;border-radius:12px}

.btn--ghost{
  background:rgba(255,255,255,.70);
  color:var(--text);
  border:1px solid var(--border);
  box-shadow:none;
}
.btn--ghost:hover{background:rgba(79,143,247,.08)}

.btn--danger{
  background:linear-gradient(180deg, #ee6b81 0%, #d94a63 100%);
  color:#fff;
}
.btn--danger:hover{filter:brightness(1.04)}

.btn--chip{
  background:rgba(255,255,255,.88);
  color:var(--text);
  border:1px solid var(--border);
  box-shadow:none;
}

.btn--chip:hover{
  background:rgba(79,143,247,.08);
}

.btn--chip.is-active{
  box-shadow:0 0 0 3px rgba(79,143,247,.12);
}

.btn--chip-landesliga{
  color:#114c9d;
  border-color:rgba(50,111,216,.28);
  background:rgba(79,143,247,.14);
}

.btn--chip-unterliga{
  color:#176947;
  border-color:rgba(31,157,104,.28);
  background:rgba(31,157,104,.13);
}

.btn--chip-sonstige{
  color:#8a5c00;
  border-color:rgba(201,139,18,.28);
  background:rgba(201,139,18,.13);
}

.input, select, textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#ffffff;
  color:var(--text);
  font-weight:650;
}

.input::placeholder,
textarea::placeholder{
  color:rgba(94,112,139,.72);
}

.input:focus, select:focus, textarea:focus{
  outline:3px solid rgba(79,143,247,.18);
  border-color:rgba(79,143,247,.34);
  background:#ffffff;
}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 10px;
}

.table th{
  font-size:12px;
  color:var(--muted);
  text-align:left;
  padding:0 10px;
}

.table td{
  padding:12px 10px;
  vertical-align:middle;
}

.table tbody tr{
  background:rgba(255,255,255,.92);
}

.table tr td:first-child{
  border-top-left-radius:14px;
  border-bottom-left-radius:14px;
}

.table tr td:last-child{
  border-top-right-radius:14px;
  border-bottom-right-radius:14px;
}

hr.sep{
  border:0;
  border-top:1px solid var(--border);
  margin:10px 0;
}

details summary::-webkit-details-marker{display:none}
details summary{list-style:none}
details summary:focus{
  outline:3px solid rgba(79,143,247,.18);
  border-radius:12px;
}

.permissions-panel{
  background:linear-gradient(180deg, rgba(244,248,255,.98) 0%, rgba(235,242,252,.98) 100%);
}

.permissions-grid{
  gap:12px;
}

.permission-card{
  background:linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  border:1px solid rgba(22,34,53,.10);
  border-radius:16px;
  padding:14px;
  box-shadow:0 8px 22px rgba(35,64,108,.06);
}

.permission-card__title{
  font-weight:900;
  color:var(--text);
}

.permission-card__meta{
  margin-top:4px;
  font-size:12px;
  color:var(--muted);
}

.permission-card__warning{
  margin-top:8px;
  font-size:12px;
  font-weight:700;
  color:#9b2335;
}

.export-table-card{
  border:1px solid var(--border);
  border-radius:16px;
  background:linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  padding:14px;
}

.export-table-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.export-table-card__title{
  font-weight:900;
}

.export-columns{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}

@media(min-width:700px){
  .export-columns{
    grid-template-columns:repeat(2,1fr);
  }
}

.export-check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  border:1px solid rgba(22,34,53,.08);
  background:rgba(255,255,255,.78);
  border-radius:12px;
  padding:10px 12px;
}

.export-check input{
  margin-top:2px;
}

.export-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.footer{padding:22px 0}
.footer__inner{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}

@media (max-width: 980px){
  .topbar__inner{
    flex-wrap:wrap;
    align-items:flex-start;
  }

  .topbar__navwrap{
    width:100%;
    flex-direction:column;
    align-items:stretch;
  }

  .nav--main{
    width:100%;
  }

  .nav--right{
    width:100%;
    justify-content:space-between;
  }

  .nav-menu__dropdown{
    right:auto;
    left:0;
    min-width:220px;
  }
}