body{margin:0;background:#070a0e;color:#edf2f5;font-family:Arial,sans-serif}a{color:inherit}.app aside{position:fixed;inset:0 auto 0 0;width:270px;background:#090e14;border-right:1px solid #27323f;padding:24px 18px;display:flex;flex-direction:column}.brand{display:flex;gap:13px;align-items:center}.crest{width:54px;height:60px;background:linear-gradient(145deg,#f1cf79,#8d6425);display:grid;place-items:center;color:#17120b;font-weight:900;clip-path:polygon(50% 0,92% 17%,84% 75%,50% 100%,16% 75%,8% 17%)}.brand small{display:block;color:#82909e;font-size:8px}.app nav{margin-top:35px}.app nav a{display:block;text-decoration:none;color:#8c98a5;padding:12px}.app nav a.active,.app nav a:hover{background:#1a232e;color:#fff;border-left:2px solid #d2a447}.logout{margin-top:auto;text-decoration:none;border:1px solid #27323f;padding:11px;text-align:center}main{margin-left:270px;width:calc(100% - 270px);padding:30px 42px 60px}.content-shell{width:min(1440px,100%);margin:0 auto}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.eyebrow{font-size:10px;letter-spacing:.19em;color:#f1cf79}.identity{border-left:2px solid #d2a447;padding-left:12px}.identity small{display:block;color:#f1cf79;font-size:8px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.card{background:#0f161e;border:1px solid #27323f;padding:20px}.card strong{display:block;font-size:32px;margin-top:10px}.good{color:#53cf8a}.warn{color:#e6b64c}.bad{color:#e36b72}.badge{display:inline-block;border:1px solid currentColor;padding:5px 8px}.profile{display:grid;grid-template-columns:.8fr 1.2fr;gap:15px}.score{font-size:42px;font-weight:900;margin:20px 0}.score span{font-size:11px;color:#82909e}table{width:100%;border-collapse:collapse}th{text-align:left;color:#687687;font-size:8px;padding:0 8px 10px}td{padding:12px 8px;border-top:1px solid #1c2630;font-size:11px}.button,button{background:linear-gradient(90deg,#a97a2d,#d2a447);border:0;color:#171108;text-decoration:none;padding:11px 14px;font-weight:800;cursor:pointer}input,select,textarea{background:#080d12;border:1px solid #27323f;color:#fff;padding:11px}.form label,.login-card label{display:block;margin:17px 0 7px;color:#778595;font-size:9px}.form select,.form textarea{width:100%}.note{background:#18150e;border-left:2px solid #d2a447;padding:13px;color:#cbb67f;margin-bottom:15px}.user-card,.rule-card{display:grid;grid-template-columns:1fr 180px 2fr auto;gap:12px;align-items:center;background:#0e151d;border:1px solid #27323f;padding:14px;margin-bottom:10px}.rule-card{grid-template-columns:1.2fr 100px 2fr auto auto}.create{grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) 160px auto}.permissions{display:flex;gap:8px;flex-wrap:wrap}.check{font-size:9px}.login{min-height:100vh;display:grid;grid-template-columns:1.15fr .85fr}.hero{padding:8vw;display:flex;flex-direction:column;justify-content:center;border-right:1px solid #27323f}.hero h1{font-size:clamp(62px,9vw,125px);line-height:.82}.hero h1 span{display:block;font-size:.24em;letter-spacing:.16em;color:#7897ae;margin-top:28px}.login-card{align-self:center;justify-self:center;width:min(420px,85%);background:#0d141c;border:1px solid #27323f;padding:34px}.login-card input{width:100%}.login-card button{width:100%;margin-top:18px}@media(max-width:900px){.login{grid-template-columns:1fr}.hero{display:none}.app aside{width:80px}main{margin-left:80px;width:calc(100% - 80px);padding:20px}.stats{grid-template-columns:1fr 1fr}.profile,.user-card,.rule-card,.create{grid-template-columns:1fr}}
@media(max-width:650px){
  .app aside{width:64px;padding:14px 8px}
  main{margin-left:64px;width:calc(100% - 64px);padding:18px 14px 40px}
  .content-shell{width:100%}
  header{align-items:flex-start}
  .identity{display:none}
  .stats{grid-template-columns:1fr}
  .card{padding:16px}
  table{display:block;overflow-x:auto;white-space:nowrap}
}


/* KSB V1.2 – browserstabiles Hauptlayout */
.app{
  min-height:100vh;
  display:grid;
  grid-template-columns:270px minmax(0,1fr);
}
.app aside{
  position:sticky;
  top:0;
  inset:auto;
  width:auto;
  height:100vh;
  grid-column:1;
}
main{
  grid-column:2;
  margin-left:0;
  width:auto;
  min-width:0;
  padding:30px clamp(28px,4vw,64px) 60px;
}
.content-shell{
  width:100%;
  max-width:1380px;
  margin-inline:auto;
}
.table-wrap{
  width:100%;
  overflow-x:auto;
}
.incident-actions{
  white-space:nowrap;
  display:flex;
  gap:7px;
  align-items:center;
}
.inline-form{display:inline;margin:0}
.button.small,button.small{padding:7px 9px;font-size:9px}
.button.secondary,button.secondary{
  background:#151e28;
  color:#dce5ec;
  border:1px solid #344352;
}
button.danger,.button.danger{
  background:#35171a;
  color:#f18a90;
  border:1px solid #6e3035;
}
.form-actions{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:18px;
}
.form-actions button{margin-top:0}

@media(max-width:900px){
  .app{grid-template-columns:80px minmax(0,1fr)}
  .app aside{width:auto}
  main{margin-left:0;width:auto;padding:20px}
}
@media(max-width:650px){
  .app{grid-template-columns:64px minmax(0,1fr)}
  .app aside{width:auto}
  main{margin-left:0;width:auto;padding:18px 14px 40px}
  .incident-actions{display:grid;white-space:normal}
}


/* V1.2.4 – Mitgliederliste, Suche und Rangstatus */
.lead{
  color:#75b8ff!important;
}

.member-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}

.member-filter-form{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1;
  flex-wrap:wrap;
}

.member-search-wrap{
  flex:1 1 300px;
  max-width:460px;
}

.member-search{
  width:100%;
  min-height:40px;
}

.member-filter{
  min-width:190px;
  min-height:40px;
}

.filter-button{
  min-height:40px;
}

.member-list-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:15px;
  color:#dce3e8;
  font-size:11px;
}

.member-list-meta small{
  color:#6f7d89;
}

@media(max-width:760px){
  .member-toolbar{
    align-items:stretch;
    flex-direction:column;
  }

  .member-filter-form{
    width:100%;
  }

  .member-search-wrap{
    max-width:none;
    flex-basis:100%;
  }

  .member-filter{
    flex:1;
  }

  .member-list-meta{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* V1.2.5 – Mitgliederliste */
.member-name-link{
  color:#edf2f5;
  text-decoration:none;
  font-size:10px;
  font-weight:600;
}
.member-name-link:hover{
  color:#f1cf79;
  text-decoration:none;
}


/* V1.2.8 – Bewertung ab 100 Punkten */
.score-breakdown{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:18px;
  color:#82909e;
  font-size:10px;
}
.score-breakdown span{
  padding:6px 8px;
  border:1px solid #27323f;
  background:#0a1118;
}
.score-meter-wrap{
  margin-top:24px;
  padding-top:8px;
}
.score-meter-labels{
  display:flex;
  justify-content:space-between;
  gap:4px;
  margin-bottom:8px;
  color:#6d7a87;
  font-size:8px;
}
.score-meter{
  position:relative;
  height:14px;
  border:1px solid #33404d;
  background:
    linear-gradient(90deg,
      rgba(227,107,114,.22) 0%,
      rgba(227,107,114,.22) 45.45%,
      rgba(230,182,76,.20) 45.45%,
      rgba(230,182,76,.20) 72.73%,
      rgba(83,207,138,.20) 72.73%,
      rgba(83,207,138,.20) 100%);
  border-radius:999px;
}
.score-meter-fill{
  position:absolute;
  left:0;top:0;bottom:0;
  border-radius:999px;
  background:linear-gradient(90deg,#9d7326,#d2a447);
  opacity:.8;
}
.score-meter-marker{
  position:absolute;
  top:50%;
  width:2px;
  height:26px;
  background:#f1cf79;
  transform:translate(-1px,-50%);
}
.score-meter-marker span{
  position:absolute;
  left:50%;
  bottom:24px;
  transform:translateX(-50%);
  padding:3px 6px;
  border-radius:4px;
  background:#d2a447;
  color:#171108;
  font-size:9px;
  font-weight:800;
}
button:disabled{
  opacity:.45;
  cursor:not-allowed;
}


/* V1.2.9 – persönliche Übersicht zusammengeführt */
.player-overview-card{padding:26px 28px 30px;margin-bottom:16px}
.player-overview-head{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-bottom:34px}
.player-overview-head h2{margin:7px 0 0;font-size:26px}
.player-score-block{text-align:right}
.player-score-number{font-size:46px;line-height:1;font-weight:900;color:#f1cf79}
.player-score-label{margin:4px 0 9px;color:#82909e;font-size:10px;text-transform:uppercase;letter-spacing:.12em}
.dashboard-meter-wrap{width:100%;padding:18px 6px 6px}
.dashboard-meter-scale{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr;align-items:end;gap:4px;margin-bottom:12px;color:#7f8d99;font-size:9px}
.dashboard-meter-scale span:nth-child(1){text-align:left}
.dashboard-meter-scale span:nth-child(2),.dashboard-meter-scale span:nth-child(3),.dashboard-meter-scale span:nth-child(4){text-align:center}
.dashboard-meter-scale span:nth-child(5){text-align:right}
.dashboard-meter{position:relative;width:100%;height:24px;overflow:visible;border:1px solid #33404d;border-radius:999px;background:linear-gradient(90deg,rgba(227,107,114,.28) 0%,rgba(227,107,114,.28) 45.45%,rgba(230,182,76,.26) 45.45%,rgba(230,182,76,.26) 72.73%,rgba(83,207,138,.26) 72.73%,rgba(83,207,138,.26) 100%)}
.dashboard-meter-fill{position:absolute;inset:0 auto 0 0;border-radius:999px;background:linear-gradient(90deg,#8e6721,#d2a447);opacity:.78}
.dashboard-meter-marker{position:absolute;top:50%;width:3px;height:42px;background:#f1cf79;transform:translate(-1px,-50%);box-shadow:0 0 14px rgba(241,207,121,.22)}
.dashboard-meter-marker span{position:absolute;left:50%;bottom:37px;transform:translateX(-50%);min-width:34px;padding:5px 7px;text-align:center;border-radius:4px;background:#d2a447;color:#171108;font-size:10px;font-weight:900}
.dashboard-meter-status{display:flex;align-items:center;justify-content:space-between;margin-top:23px;padding-top:16px;border-top:1px solid #202a35;color:#82909e;font-size:11px}
.dashboard-meter-status strong{font-size:14px}
.dashboard-history-card{padding:22px 22px 8px}
.dashboard-section-title{margin-bottom:16px;font-size:12px;font-weight:800;letter-spacing:.08em}
@media(max-width:700px){.player-overview-head{flex-direction:column}.player-score-block{text-align:left}.dashboard-meter-scale{font-size:7px}}


/* V1.2.10 – Mobile Optimierung */
.mobile-nav-toggle,
.mobile-nav-backdrop,
.mobile-menu-button,
.mobile-nav-close{
  display:none;
}

.mobile-top-row{
  display:flex;
  align-items:center;
  gap:14px;
}

/* Tablets */
@media(max-width:900px){
  .app{
    display:block;
    min-height:100vh;
  }

  .app aside{
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    width:min(82vw,290px);
    height:100vh;
    z-index:1002;
    transform:translateX(-102%);
    transition:transform .2s ease;
    box-shadow:18px 0 50px rgba(0,0,0,.42);
    overflow-y:auto;
    padding:18px 12px 16px;
  }

  .mobile-nav-toggle:checked ~ .app aside{
    transform:translateX(0);
  }

  .mobile-nav-backdrop{
    position:fixed;
    inset:0;
    z-index:1001;
    background:rgba(0,0,0,.58);
  }

  .mobile-nav-toggle:checked ~ .app .mobile-nav-backdrop{
    display:block;
  }

  .mobile-nav-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
  }

  .mobile-nav-close{
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    flex:0 0 38px;
    border:1px solid #27323f;
    color:#dfe6eb;
    background:#0d151d;
    cursor:pointer;
    font-size:24px;
    line-height:1;
  }

  .brand{
    justify-content:flex-start;
  }

  .brand>div:last-child{
    display:block;
  }

  .app nav a,
  .logout{
    font-size:12px;
    justify-content:flex-start;
    padding:12px 14px;
  }

  .app nav a:before,
  .logout:before{
    content:none;
  }

  main{
    margin-left:0!important;
    width:100%!important;
    min-width:0;
    padding:18px 16px 44px!important;
  }

  .content-shell{
    width:100%;
    max-width:none;
    margin:0;
  }

  header{
    align-items:center;
    gap:12px;
    margin-bottom:20px;
  }

  .mobile-menu-button{
    display:flex;
    width:42px;
    height:42px;
    flex:0 0 42px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    border:1px solid #27323f;
    background:#0d151d;
    cursor:pointer;
  }

  .mobile-menu-button span{
    display:block;
    width:18px;
    height:2px;
    background:#dfe6eb;
  }

  .identity{
    flex:0 0 auto;
  }

  .stats{
    grid-template-columns:1fr 1fr;
  }

  .profile{
    grid-template-columns:1fr;
  }

  .user-card,
  .rule-card,
  .create{
    grid-template-columns:1fr;
  }
}

/* Smartphones */
@media(max-width:640px){
  body{
    overflow-x:hidden;
  }

  main{
    padding:14px 12px 34px!important;
  }

  header{
    align-items:flex-start;
  }

  header h1{
    font-size:20px;
    line-height:1.15;
  }

  .eyebrow{
    font-size:7px;
    letter-spacing:.13em;
  }

  .identity{
    display:none;
  }

  .mobile-top-row{
    width:100%;
    align-items:flex-start;
  }

  .mobile-menu-button{
    margin-top:1px;
  }

  .card{
    padding:15px;
  }

  .stats{
    grid-template-columns:1fr;
    gap:10px;
  }

  .stats .card strong{
    font-size:26px;
  }

  .player-overview-card{
    padding:18px 15px 22px;
  }

  .player-overview-head{
    flex-direction:column;
    gap:16px;
    margin-bottom:24px;
  }

  .player-score-block{
    width:100%;
    text-align:left;
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
  }

  .player-score-number{
    font-size:40px;
  }

  .player-score-label{
    margin:0 8px 0 0;
  }

  .dashboard-meter-wrap{
    padding:12px 0 6px;
  }

  .dashboard-meter-scale{
    grid-template-columns:repeat(3,1fr);
    row-gap:7px;
    margin-bottom:10px;
    font-size:7px;
  }

  .dashboard-meter-scale span:nth-child(1){grid-column:1;text-align:left}
  .dashboard-meter-scale span:nth-child(2){grid-column:1;text-align:left}
  .dashboard-meter-scale span:nth-child(3){grid-column:2;text-align:center}
  .dashboard-meter-scale span:nth-child(4){grid-column:3;text-align:right}
  .dashboard-meter-scale span:nth-child(5){grid-column:3;text-align:right}

  .dashboard-meter{
    height:20px;
  }

  .dashboard-meter-marker{
    height:34px;
  }

  .dashboard-meter-marker span{
    bottom:29px;
    padding:4px 6px;
  }

  .dashboard-meter-status{
    align-items:flex-start;
    gap:10px;
    flex-direction:column;
  }

  .dashboard-history-card{
    padding:16px 12px 4px;
  }

  .table-wrap{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  table{
    min-width:660px;
  }

  th,
  td{
    font-size:10px;
    padding:11px 7px;
  }

  .member-toolbar{
    align-items:stretch;
    flex-direction:column;
  }

  .member-filter-form{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }

  .member-search-wrap,
  .member-search,
  .member-filter,
  .filter-button,
  .member-toolbar>.button{
    width:100%;
    max-width:none;
  }

  .member-list-meta{
    align-items:flex-start;
    flex-direction:column;
  }

  .form{
    width:100%;
    max-width:none!important;
    padding:16px;
  }

  .form input,
  .form select,
  .form textarea{
    width:100%!important;
  }

  .form-actions,
  .form>form>div[style*="display:flex"]{
    flex-direction:column;
    align-items:stretch!important;
  }

  .form-actions .button,
  .form-actions button,
  .form>form>div[style*="display:flex"] .button,
  .form>form>div[style*="display:flex"] button{
    width:100%;
    text-align:center;
  }

  .permissions{
    gap:6px;
  }

  .check{
    width:100%;
    display:flex;
    align-items:flex-start;
    gap:7px;
    padding:5px 0;
  }

  .login{
    min-height:100vh;
    display:block;
    padding:20px 12px;
  }

  .hero{
    display:none;
  }

  .login-card{
    width:100%;
    max-width:420px;
    margin:8vh auto 0;
    padding:24px 18px;
  }
}


/* V1.2.11 – eine Übersicht für alle Rollen */
.lead-overview-block{margin-bottom:18px}
.section-heading-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.section-heading-row h2{margin:5px 0 0;font-size:18px}
.lead-own-card{margin-top:4px}
.admin-own-status strong{color:#f1cf79}
@media(max-width:640px){
  .lead-overview-block{margin-bottom:14px}
  .section-heading-row h2{font-size:16px}
}


/* V1.2.12 – Hinweis bei Rangänderung */
.rank-change-alert{
  display:flex;
  align-items:flex-start;
  gap:16px;
  margin-bottom:18px;
  padding:18px 20px;
  border:1px solid #b68428;
  border-left:4px solid #f1cf79;
  background:linear-gradient(180deg,#211a0c,#17130b);
  box-shadow:0 10px 28px rgba(0,0,0,.16);
}

.rank-change-icon{
  width:42px;
  height:42px;
  min-width:42px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#d2a447;
  color:#171108;
  font-size:22px;
  font-weight:900;
}

.rank-change-kicker{
  margin-bottom:5px;
  color:#f1cf79;
  font-size:9px;
  font-weight:900;
  letter-spacing:.14em;
}

.rank-change-copy h3{
  margin:0 0 7px;
  font-size:16px;
  color:#f4f1e9;
}

.rank-change-copy p{
  margin:0;
  color:#d7c99e;
  font-size:12px;
  line-height:1.55;
}

.rank-change-copy small{
  display:block;
  margin-top:8px;
  color:#8f8465;
  font-size:9px;
}

@media(max-width:640px){
  .rank-change-alert{
    gap:12px;
    padding:15px 14px;
  }

  .rank-change-icon{
    width:36px;
    height:36px;
    min-width:36px;
    font-size:18px;
  }

  .rank-change-copy h3{
    font-size:14px;
  }

  .rank-change-copy p{
    font-size:11px;
  }
}


/* V1.2.14 – Navigation und Rechteverwaltung */

/* Sidebar benötigt keinen Logout mehr */
.app aside{
  overflow:hidden;
}

/* Logout kompakt im Header */
.identity{
  display:flex;
  align-items:center;
  gap:12px;
}
.identity-copy{
  min-width:0;
}
.top-logout{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:1px solid #34414e;
  background:#0b1218;
  color:#d5dde4;
  text-decoration:none;
  font-size:16px;
  line-height:1;
  transition:.15s ease;
}
.top-logout:hover{
  color:#f1cf79;
  border-color:#8c6a28;
  background:#15120b;
}

/* Rechte optisch als Karten */
.permission-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:9px;
  width:100%;
}

.permission-card{
  position:relative;
  min-height:48px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid #2b3743;
  border-radius:6px;
  background:#0a1118;
  color:#c9d2da;
  cursor:pointer;
  transition:.15s ease;
}

.permission-card:hover{
  border-color:#6f5826;
  background:#11150e;
}

.permission-card.is-active{
  border-color:#a17b2c;
  background:linear-gradient(180deg,#17130b,#11100c);
  color:#f0dfab;
}

.permission-card input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.permission-checkmark{
  width:22px;
  height:22px;
  flex:0 0 22px;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:1px solid #46525e;
  color:#171108;
  background:#111922;
  font-size:12px;
  font-weight:900;
}

.permission-card.is-active .permission-checkmark{
  border-color:#d2a447;
  background:#d2a447;
}

.permission-label{
  font-size:10px;
  line-height:1.35;
  font-weight:600;
}

.permission-admin-note,
.permission-empty{
  grid-column:1/-1;
  padding:11px 13px;
  border:1px dashed #33404b;
  border-radius:6px;
  color:#7f8d99;
  background:#0a1016;
  font-size:10px;
}

.permission-admin-note{
  color:#d3bf84;
  border-color:#655323;
  background:#151208;
}

/* Benutzerkarten etwas luftiger */
.user-card{
  align-items:start;
}
.user-card > div:first-child{
  padding-top:7px;
}

@media(max-width:900px){
  .app aside{
    overflow-y:auto;
  }
}

@media(max-width:640px){
  .identity{
    display:flex;
  }
  .identity-copy{
    display:none;
  }
  .top-logout{
    width:38px;
    height:38px;
    flex-basis:38px;
  }
  .permission-grid{
    grid-template-columns:1fr;
  }
}


/* V1.2.15 – kompakte und bearbeitbare Rechte */
.permission-grid,
.permission-card,
.permission-admin-note,
.permission-empty{
  all:unset;
}

.permission-compact{
  display:flex;
  flex-wrap:wrap;
  gap:6px 8px;
  align-items:center;
  width:100%;
}

.permission-chip{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:30px;
  padding:5px 9px;
  border:1px solid #2c3742;
  border-radius:999px;
  background:#0b1218;
  color:#cbd4dc;
  cursor:pointer;
  user-select:none;
  transition:.15s ease;
}

.permission-chip:hover{
  border-color:#7c6228;
  background:#141108;
}

.permission-chip input{
  position:absolute;
  opacity:0;
  width:1px!important;
  height:1px!important;
  pointer-events:none;
}

.permission-box{
  width:15px;
  height:15px;
  flex:0 0 15px;
  display:grid;
  place-items:center;
  border:1px solid #53606c;
  border-radius:3px;
  background:#0d151c;
}

.permission-chip input:checked + .permission-box{
  border-color:#d2a447;
  background:#d2a447;
}

.permission-chip input:checked + .permission-box:after{
  content:"✓";
  color:#171108;
  font-size:10px;
  font-weight:900;
  line-height:1;
}

.permission-chip:has(input:checked){
  border-color:#8f6e29;
  background:#17130b;
  color:#f0dfab;
}

.permission-text{
  font-size:9px;
  line-height:1.2;
  white-space:nowrap;
}

.permission-info{
  display:inline-block;
  padding:6px 9px;
  border:1px dashed #34404a;
  border-radius:999px;
  background:#0a1016;
  color:#7f8c98;
  font-size:9px;
}

.permission-info.admin-info{
  color:#d5c38d;
  border-color:#665324;
  background:#151208;
}

/* Rechteverwaltung insgesamt kompakter */
.user-card{
  grid-template-columns:minmax(160px,.9fr) 140px minmax(260px,2.3fr) auto;
  gap:10px;
  padding:11px 12px;
}

.user-card select{
  min-height:34px;
  padding:7px 9px;
}

.user-card button{
  padding:8px 11px;
}

@media(max-width:900px){
  .user-card{
    grid-template-columns:1fr;
  }

  .permission-compact{
    gap:6px;
  }

  .permission-chip{
    padding:6px 8px;
  }

  .permission-text{
    white-space:normal;
  }
}


/* V1.2.16 – Scrollbar- und Mobile-Logout-Korrektur */

/*
   Der Browser soll nur dann vertikal scrollen, wenn der eigentliche Inhalt
   höher als das Fenster ist. Keine 1–2px Überhöhe durch Layoutcontainer.
*/
html,
body{
  min-height:100%;
  margin:0;
  padding:0;
}

html{
  overflow-x:hidden;
}

body{
  min-height:100dvh;
  overflow-x:hidden;
}

/* Grid selbst nicht künstlich höher als der Viewport machen. */
.app{
  min-height:100dvh;
  height:auto;
}

/* Sidebar exakt im sichtbaren Viewport halten. */
.app aside{
  box-sizing:border-box;
  height:100dvh;
  max-height:100dvh;
}

/* Hauptbereich verursacht keine horizontale/vertikale Überbreite. */
main,
.content-shell{
  min-width:0;
}

/* Desktop: zusätzlicher Logout im Drawer bleibt unsichtbar. */
.mobile-drawer-logout{
  display:none;
}

/* Verhindert zusätzliche Scrollhöhe durch letzte Elemente/Margins. */
main > .content-shell > :last-child{
  margin-bottom:0;
}

/* Moderne Browser: dvh statt klassischem vh verhindert Mobile-Viewport-Überhöhe. */
@supports(height:100dvh){
  .app aside{
    height:100dvh;
    max-height:100dvh;
  }
}

@media(max-width:900px){
  /*
     Im mobilen Drawer wird Logout bewusst dort angezeigt,
     unabhängig davon ob die Desktop-Identity ausgeblendet ist.
  */
  .mobile-drawer-logout{
    display:flex;
    align-items:center;
    gap:12px;
    margin-top:auto;
    padding:13px 14px;
    border-top:1px solid #27323f;
    color:#d9e1e7;
    text-decoration:none;
    font-size:12px;
    background:#0a1016;
  }

  .mobile-drawer-logout span:first-child{
    width:22px;
    text-align:center;
    font-size:17px;
    color:#e3b449;
  }

  .mobile-drawer-logout:hover{
    background:#15120b;
    color:#f1cf79;
  }

  /* Auf Mobil darf nur der Drawer selbst scrollen, falls sein Menü zu hoch ist. */
  .app aside{
    overflow-y:auto;
    overscroll-behavior:contain;
  }

  /* Desktop-Logout oben darf auf schmalen Geräten zusätzlich ausgeblendet sein;
     Logout ist dennoch sicher im Drawer vorhanden. */
  .top-logout{
    display:none;
  }
}

@media(min-width:901px){
  .top-logout{
    display:grid;
  }
}

/* Safari/ältere Browser ohne dvh */
@supports not (height:100dvh){
  body,
  .app{
    min-height:100vh;
  }

  .app aside{
    height:100vh;
    max-height:100vh;
  }
}


/* V1.2.17 – Suche beim Vorfall erfassen */
.incident-member-picker{
  width:100%;
}

.incident-search-row{
  min-height:42px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 11px;
  border:1px solid #27323f;
  background:#080d12;
}

.incident-search-row:focus-within{
  border-color:#9b772d;
  box-shadow:0 0 0 2px rgba(210,164,71,.07);
}

.incident-search-icon{
  flex:0 0 auto;
  color:#d2a447;
  font-size:17px;
}

.incident-member-search{
  flex:1;
  min-width:0;
  width:100%;
  padding:10px 0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

.incident-member-search:focus{
  outline:none;
}

.incident-search-count{
  flex:0 0 auto;
  color:#758390;
  font-size:9px;
  white-space:nowrap;
}

.incident-select-label{
  margin-top:12px!important;
}

#member-select{
  width:100%;
}

.incident-search-empty{
  margin-top:8px;
  color:#e36b72;
  font-size:10px;
}

@media(max-width:640px){
  .incident-search-row{
    min-height:46px;
  }

  .incident-member-search{
    font-size:16px!important;
  }

  .incident-search-count{
    display:none;
  }
}


/* V1.2.18 – Rollenverwaltung */
.permission-info{
  white-space:normal;
}

.user-card select[name="role"]{
  cursor:pointer;
}

@media(max-width:900px){
  .user-card{
    width:100%;
  }
}


/* V1.2.19 – Barometer ohne Goldfüllung */
.dashboard-meter-fill,
.score-meter-fill{
  display:none!important;
}

.dashboard-meter,
.score-meter{
  overflow:visible;
}

/* Farbbereiche bleiben immer vollständig sichtbar */
.dashboard-meter{
  background:
    linear-gradient(90deg,
      rgba(227,107,114,.34) 0%,
      rgba(227,107,114,.34) 45.45%,
      rgba(230,182,76,.32) 45.45%,
      rgba(230,182,76,.32) 72.73%,
      rgba(83,207,138,.32) 72.73%,
      rgba(83,207,138,.32) 100%)!important;
}

.score-meter{
  background:
    linear-gradient(90deg,
      rgba(227,107,114,.34) 0%,
      rgba(227,107,114,.34) 45.45%,
      rgba(230,182,76,.32) 45.45%,
      rgba(230,182,76,.32) 72.73%,
      rgba(83,207,138,.32) 72.73%,
      rgba(83,207,138,.32) 100%)!important;
}


/* Bewertungsregeln – Sortierfeld */
.rule-order-input{
  width:82px!important;
  min-width:82px;
  text-align:center;
}

.rule-card{
  grid-template-columns:1.2fr 100px 1.8fr 82px auto auto;
}

@media(max-width:900px){
  .rule-card{
    grid-template-columns:1fr;
  }

  .rule-order-input{
    width:100%!important;
  }
}


/* V1.2.25 – Zug Verwaltung */
.train-page-card{
  padding:24px 26px;
}

.train-page-card h2{
  margin:7px 0 0;
  font-size:24px;
}

@media(max-width:640px){
  .train-page-card{
    padding:18px 16px;
  }

  .train-page-card h2{
    font-size:20px;
  }
}


/* V1.2.26 – Zugverwaltung */
.train-page-card,
.train-current-card,
.train-builder-card{
  padding:22px 24px;
  margin-bottom:16px;
}

.train-title-row,
.train-section-heading,
.train-panel-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.train-title-row h2,
.train-section-heading h3{
  margin:6px 0 0;
}

.train-date-badge{
  padding:6px 10px;
  border:1px solid #705927;
  border-radius:999px;
  background:#17130b;
  color:#e5c66c;
  font-size:9px;
  white-space:nowrap;
}

.train-empty-state{
  margin-top:18px;
  padding:22px;
  border:1px dashed #33404b;
  color:#7f8c98;
  text-align:center;
}

.train-list-current{
  margin-top:16px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:7px;
}

.train-current-row{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  padding:9px 10px;
  border:1px solid #26333e;
  background:#0a1118;
}

.train-position{
  width:24px;
  flex:0 0 24px;
  color:#d2a447;
  font-size:10px;
  font-weight:800;
}

.train-member-name{
  min-width:0;
  flex:1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:10px;
}

.train-role,
.train-selected-role{
  color:#78aee4;
  font-size:8px;
}

.train-start-date{
  max-width:300px;
  margin:20px 0;
}

.train-start-date label{
  display:block;
  margin-bottom:7px;
  color:#8393a1;
  font-size:9px;
  letter-spacing:.1em;
}

.train-start-date input{
  width:100%;
}

.train-builder-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:14px;
}

.train-picker-panel,
.train-selected-panel{
  min-width:0;
  border:1px solid #283540;
  background:#091017;
  padding:14px;
}

.train-panel-heading{
  margin-bottom:10px;
}

.train-panel-heading strong{
  display:block;
  font-size:11px;
}

.train-panel-heading small{
  display:block;
  margin-top:3px;
  color:#71808c;
  font-size:8px;
}

.train-member-search{
  width:100%;
  margin-bottom:10px;
}

.train-member-pool,
.train-selected-list{
  max-height:420px;
  overflow-y:auto;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
  padding-right:4px;
}

.train-member-option{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:7px;
  padding:8px 9px;
  border:1px solid #27343f;
  border-radius:4px;
  background:#0d151c;
  color:#dbe2e7;
  text-align:left;
  cursor:pointer;
}

.train-member-option:hover{
  border-color:#8b6a29;
  background:#15120b;
}

.train-member-option span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px;
}

.train-member-option small{
  flex:0 0 auto;
  color:#78aee4;
  font-size:7px;
}

.train-selected-list{
  grid-template-columns:1fr;
}

.train-selected-member{
  display:grid;
  grid-template-columns:28px minmax(0,1fr) auto 30px;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:6px 8px;
  border:1px solid #54461e;
  background:#151209;
}

.train-selected-position{
  color:#e5bd4d;
  font-size:10px;
  font-weight:900;
}

.train-selected-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px;
}

.train-remove-member{
  width:28px;
  height:28px;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid #76343a;
  border-radius:50%;
  background:#180d0f;
  color:#e77379;
  cursor:pointer;
}

.train-selected-empty,
.train-no-results{
  grid-column:1/-1;
  padding:22px 10px;
  color:#687681;
  text-align:center;
  font-size:9px;
  line-height:1.6;
}

.train-builder-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:14px;
}

@media(max-width:900px){
  .train-builder-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:640px){
  .train-page-card,
  .train-current-card,
  .train-builder-card{
    padding:16px 13px;
  }

  .train-title-row,
  .train-section-heading{
    align-items:flex-start;
    flex-direction:column;
  }

  .train-title-row button,
  .train-section-heading button{
    width:100%;
  }

  .train-list-current,
  .train-member-pool{
    grid-template-columns:1fr;
  }

  .train-member-pool,
  .train-selected-list{
    max-height:360px;
  }

  .train-start-date{
    max-width:none;
  }
}


/* V1.2.27 – Zug-Tagesplan */
.train-upcoming-note{
  margin:14px 0 16px;
  padding:11px 13px;
  border-left:2px solid #d2a447;
  background:#151208;
  color:#b8a56e;
  font-size:10px;
  line-height:1.5;
}

.train-schedule-wrap{
  margin-top:14px;
}

.train-schedule-table{
  width:100%;
  border-collapse:collapse;
}

.train-schedule-table th{
  color:#71808d;
  font-size:8px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.train-schedule-table td{
  vertical-align:middle;
}

.train-schedule-table td:nth-child(1){
  width:54px;
}

.train-schedule-table td:nth-child(2){
  width:130px;
  color:#cbd3da;
}

.train-schedule-table td:nth-child(3),
.train-schedule-table td:nth-child(4){
  width:auto;
}

.train-schedule-table strong{
  font-size:10px;
}

.train-vip-name{
  color:#d6be78;
  font-size:10px;
  font-weight:700;
}

.train-vip-empty{
  color:#56636e;
}

@media(max-width:640px){
  .train-schedule-table{
    min-width:560px;
  }
}


/* V1.2.28 – vereinfachter Zuglisten-Builder */
.train-builder-grid{
  display:block!important;
}

.train-picker-panel,
.train-selected-panel{
  width:100%;
}

.train-selected-panel{
  margin-top:14px;
}

/* Verfügbare Mitglieder in vier Spalten */
.train-member-pool{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}

/* Gewählte Reihenfolge ebenfalls in vier Spalten */
.train-selected-list{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}

.train-selected-member{
  grid-template-columns:28px minmax(0,1fr) 30px!important;
  min-width:0;
}

.train-member-option{
  min-width:0;
}

.train-member-option span,
.train-selected-name{
  font-size:9px;
}

/* Führungshinweise im Zugbereich vollständig ausblenden */
.train-role,
.train-selected-role,
.train-member-option small{
  display:none!important;
}

@media(max-width:1100px){
  .train-member-pool,
  .train-selected-list{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

@media(max-width:800px){
  .train-member-pool,
  .train-selected-list{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:520px){
  .train-member-pool,
  .train-selected-list{
    grid-template-columns:1fr!important;
  }
}


/* V1.2.29 – Wochenbild */
.train-week-card{
  padding:20px 22px;
  margin-bottom:16px;
}

.train-week-grid{
  display:grid;
  grid-template-columns:minmax(180px,.9fr) minmax(300px,1.2fr) minmax(210px,.8fr);
  align-items:end;
  gap:22px;
}

.train-week-summary h3{
  margin:6px 0 5px;
}

.train-week-summary p{
  margin:0;
  color:#7f8d99;
  font-size:10px;
}

.train-week-label{
  margin-bottom:7px;
  color:#8d9aa6;
  font-size:9px;
  letter-spacing:.08em;
}

.train-week-picker{
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 38px;
  align-items:center;
  border:1px solid #283641;
  background:#0a1118;
}

.train-week-arrow{
  height:42px;
  display:grid;
  place-items:center;
  color:#dbe2e7;
  text-decoration:none;
  font-size:22px;
}

.train-week-arrow:hover{
  background:#15120b;
  color:#e5bd4d;
}

.train-week-current{
  min-width:0;
  text-align:center;
}

.train-week-current span{
  display:block;
  color:#e5e9ec;
  font-size:11px;
  font-weight:700;
}

.train-week-current small{
  display:block;
  margin-top:2px;
  color:#778590;
  font-size:8px;
}

.train-week-action{
  display:flex;
  justify-content:flex-end;
}

.train-generate-button{
  width:100%;
  max-width:300px;
  text-align:center;
}

.train-week-preview-wrap{
  margin-top:18px;
  overflow:hidden;
  border:1px solid #293641;
  background:#05090d;
}

.train-week-preview{
  display:block;
  width:100%;
  height:auto;
}

.train-week-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:12px;
}

.train-week-footer span{
  color:#80909c;
  font-size:9px;
  line-height:1.5;
}

@media(max-width:1000px){
  .train-week-grid{
    grid-template-columns:1fr 1fr;
  }

  .train-week-action{
    grid-column:1/-1;
    justify-content:flex-start;
  }
}

@media(max-width:640px){
  .train-week-card{
    padding:15px 12px;
  }

  .train-week-grid{
    grid-template-columns:1fr;
    gap:14px;
  }

  .train-week-action{
    grid-column:auto;
  }

  .train-generate-button{
    max-width:none;
  }

  .train-week-footer{
    align-items:stretch;
    flex-direction:column;
  }

  .train-week-footer .button{
    width:100%;
    text-align:center;
  }
}


/* V1.2.30 – Zug Wochenansicht & Entfernen */
.train-week-grid{
  grid-template-columns:minmax(180px,.8fr) minmax(320px,1.4fr)!important;
}

.train-week-footer-download-only{
  justify-content:flex-end!important;
}

.train-actions-head{
  width:52px;
}

.train-remove-cell{
  width:52px;
  text-align:right;
}

.train-remove-cell form{
  margin:0;
  display:inline-flex;
}

.train-schedule-remove{
  width:30px;
  height:30px;
  min-width:30px;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid #8d343a;
  border-radius:50%;
  background:#190d0f;
  color:#ef737a;
  font-size:18px;
  line-height:1;
  cursor:pointer;
}

.train-schedule-remove:hover{
  border-color:#d34d55;
  background:#281014;
  color:#ff969b;
}

@media(max-width:1000px){
  .train-week-grid{
    grid-template-columns:1fr!important;
  }
}

@media(max-width:640px){
  .train-week-footer-download-only .button{
    width:100%;
    text-align:center;
  }
}


/* V1.2.31 – Zugliste bearbeiten */
.train-move-cell{
  min-width:190px;
}

.train-move-form{
  display:flex;
  align-items:center;
  gap:6px;
  margin:0;
}

.train-move-form input[type="date"]{
  min-width:140px;
  padding:6px 8px;
  font-size:9px;
}

.train-move-button{
  width:30px;
  height:30px;
  min-width:30px;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid #806527;
  border-radius:50%;
  background:#16120a;
  color:#e0ba51;
  cursor:pointer;
}

.train-move-button:hover{
  border-color:#d2a447;
  color:#f1cf79;
}

@media(max-width:640px){
  .train-move-cell{
    min-width:180px;
  }
}


/* V1.3.2 – persönliche nächste Zugfahrt */
.train-personal-next-card{
  padding:22px 24px;
}

.train-personal-next-card h2{
  margin:6px 0 18px;
}

.train-personal-next-content{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:16px 18px;
  border:1px solid #394835;
  background:#0d1711;
}

.train-personal-role{
  color:#8ee0a9;
  font-size:15px;
  font-weight:800;
}

.train-personal-date{
  color:#f1cf79;
  font-size:20px;
  font-weight:900;
}

.train-personal-empty{
  padding:16px 18px;
  border:1px dashed #34414c;
  background:#0a1016;
  color:#82909d;
  font-size:11px;
}

@media(max-width:640px){
  .train-personal-next-content{
    align-items:flex-start;
    flex-direction:column;
  }

  .train-personal-date{
    font-size:18px;
  }
}

/* V1.3.3 – Abwesenheiten */
.absence-layout{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(0,1.2fr);gap:16px}
.absence-form-card,.absence-list-card{padding:22px 24px}
.absence-date-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.absence-list{display:flex;flex-direction:column;gap:8px}
.absence-row{display:grid;grid-template-columns:minmax(190px,.8fr) minmax(0,1.2fr) 34px;align-items:center;gap:12px;padding:11px 12px;border:1px solid #293641;background:#0a1118}
.absence-row.is-current{border-color:#806427;background:#151208}.absence-row.is-past{opacity:.6}
.absence-dates,.absence-meta{display:flex;align-items:center;gap:7px;font-size:10px}.absence-dates span,.absence-meta small{color:#788691}
.absence-state{padding:4px 7px;border-radius:999px;background:#111921;color:#8795a0;font-size:8px}.absence-state.active{background:#241b0b;color:#e5bd4d}.absence-state.upcoming{background:#0d1a14;color:#73d69a}
.absence-remove{width:30px;height:30px;padding:0;display:grid;place-items:center;border:1px solid #83383e;border-radius:50%;background:#180d0f;color:#ef737a;font-size:18px}
.absence-empty,.dashboard-absence-empty{padding:14px 16px;border:1px dashed #34414c;color:#788691;background:#0a1016;font-size:10px}
.dashboard-absence-card{padding:20px 22px;margin-bottom:16px}.dashboard-absence-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.dashboard-absence-head h3{margin:5px 0 0}
.dashboard-absence-status{display:flex;align-items:center;gap:14px;padding:12px 14px;border:1px solid #34414c;background:#0a1118}.dashboard-absence-status.is-current{border-color:#806427;background:#151208}.dashboard-absence-status.is-upcoming{border-color:#355342;background:#0d1711}
.incident-absence-warning{display:flex;align-items:flex-start;gap:11px;margin:10px 0 2px;padding:12px 13px;border:1px solid #9a7429;border-left:4px solid #e5bd4d;background:#1a1509;color:#d7c58f}.incident-absence-warning[hidden]{display:none!important}
.incident-absence-warning-icon{width:26px;height:26px;min-width:26px;display:grid;place-items:center;border-radius:50%;background:#d2a447;color:#171108;font-weight:900}.incident-absence-warning strong{display:block;color:#f1cf79;font-size:10px}.incident-absence-warning p{margin:4px 0 0;font-size:10px}
@media(max-width:800px){.absence-layout{grid-template-columns:1fr}}@media(max-width:640px){.absence-date-grid{grid-template-columns:1fr}.absence-row{grid-template-columns:1fr 34px}.dashboard-absence-head,.dashboard-absence-status{align-items:stretch;flex-direction:column}}


/* V1.3.4 – Abwesenheiten Layout */
.absence-note-block{
  margin-top:14px;
}

.absence-note-block label{
  display:block;
  margin-bottom:6px;
}

.absence-row{
  grid-template-columns:minmax(0,1fr) 34px!important;
}

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

.absence-dates{
  margin-bottom:7px;
}

.absence-meta{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}

.absence-meta small{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.absence-overview-card{
  padding:22px 24px;
}

.absence-overview-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}

.absence-overview-head h2{
  margin:5px 0 0;
}

.absence-overview-list{
  display:flex;
  flex-direction:column;
  gap:7px;
}

.absence-overview-row{
  display:grid;
  grid-template-columns:minmax(150px,.8fr) minmax(220px,1fr) minmax(220px,1.2fr) auto;
  align-items:center;
  gap:14px;
  padding:11px 12px;
  border:1px solid #293641;
  background:#0a1118;
}

.absence-overview-row.is-current{
  border-color:#806427;
  background:#151208;
}

.absence-overview-row.is-past{
  opacity:.58;
}

.absence-overview-user{
  min-width:0;
}

.absence-overview-user strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:10px;
}

.absence-overview-user small{
  display:block;
  margin-top:3px;
  color:#78aee4;
  font-size:8px;
}

.absence-overview-dates{
  display:flex;
  align-items:center;
  gap:7px;
  color:#d8dfe4;
  font-size:10px;
}

.absence-date-separator{
  color:#66747f;
}

.absence-overview-status{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
}

.absence-overview-status small{
  min-width:0;
  color:#82909b;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px;
}

.absence-overview-edit{
  padding:7px 10px;
  white-space:nowrap;
}

@media(max-width:900px){
  .absence-overview-row{
    grid-template-columns:1fr 1fr;
  }

  .absence-overview-edit{
    justify-self:start;
  }
}

@media(max-width:640px){
  .absence-overview-card{
    padding:16px 13px;
  }

  .absence-overview-row{
    grid-template-columns:1fr;
    gap:8px;
  }

  .absence-overview-status{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
  }
}


/* V1.3.5 – Team-1 Kampfkraft */
.team-power-card{
  padding:22px 24px;
  margin-bottom:16px;
}

.team-power-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.team-power-head h3{
  margin:5px 0 0;
}

.team-power-latest{
  min-width:190px;
  text-align:right;
}

.team-power-latest small,
.team-power-latest span{
  display:block;
  color:#7f8d99;
  font-size:8px;
}

.team-power-latest strong{
  display:block;
  margin:3px 0;
  color:#f1cf79;
  font-size:24px;
}

.team-power-success{
  margin-bottom:12px;
  padding:9px 11px;
  border-left:3px solid #53cf8a;
  background:#0d1711;
  color:#8edfac;
  font-size:10px;
}

.team-power-form{
  display:grid;
  grid-template-columns:minmax(150px,.65fr) minmax(220px,1.3fr) auto;
  gap:10px;
  align-items:end;
  padding:14px;
  border:1px solid #293641;
  background:#091017;
}

.team-power-field label{
  display:block;
  margin-bottom:6px;
  color:#82909c;
  font-size:8px;
  letter-spacing:.08em;
}

.team-power-field select,
.team-power-field input{
  width:100%;
}

.team-power-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  margin-top:14px;
}

.team-power-stat{
  padding:11px 12px;
  border:1px solid #293641;
  background:#0a1118;
}

.team-power-stat small{
  display:block;
  color:#72808c;
  font-size:8px;
  margin-bottom:5px;
}

.team-power-stat strong{
  display:block;
  font-size:15px;
}

.team-power-chart-wrap{
  margin-top:15px;
  padding:14px;
  border:1px solid #293641;
  background:linear-gradient(180deg,#0b131a,#080e13);
}

.team-power-chart-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.team-power-chart-title strong{
  font-size:10px;
}

.team-power-chart-title small{
  color:#71808c;
  font-size:8px;
}

.team-power-chart{
  width:100%;
  height:auto;
  min-height:180px;
  overflow:visible;
}

.team-power-axis{
  stroke:#34424e;
  stroke-width:1;
}

.team-power-line{
  fill:none;
  stroke:#d2a447;
  stroke-width:4;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.team-power-dot{
  fill:#f1cf79;
  stroke:#171108;
  stroke-width:3;
}

.team-power-chart-label{
  fill:#9aa7b1;
  font-size:14px;
}

.team-power-no-chart,
.team-power-empty{
  padding:16px;
  border:1px dashed #34414c;
  background:#0a1016;
  color:#788691;
  font-size:10px;
}

.team-power-history{
  margin-top:14px;
}

.team-power-history-title{
  margin-bottom:7px;
  color:#82909c;
  font-size:8px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.team-power-history-row{
  display:grid;
  grid-template-columns:110px 90px minmax(140px,1fr) 130px;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-top:1px solid #202b35;
  font-size:9px;
}

.team-power-history-date,
.team-power-history-type{
  color:#84929e;
}

.team-power-history-row strong{
  font-size:10px;
}

.team-power-history-delta{
  text-align:right;
  font-weight:800;
}

.team-power-history-delta.neutral{
  color:#687681;
  font-weight:500;
}

@media(max-width:900px){
  .team-power-form{
    grid-template-columns:1fr 1fr;
  }

  .team-power-form button{
    grid-column:1/-1;
  }

  .team-power-stats{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:640px){
  .team-power-card{
    padding:16px 13px;
  }

  .team-power-head{
    flex-direction:column;
  }

  .team-power-latest{
    min-width:0;
    text-align:left;
  }

  .team-power-form{
    grid-template-columns:1fr;
  }

  .team-power-form button{
    grid-column:auto;
    width:100%;
  }

  .team-power-stats{
    grid-template-columns:1fr 1fr;
  }

  .team-power-history-row{
    grid-template-columns:1fr 1fr;
  }

  .team-power-history-delta{
    text-align:left;
  }
}

/* V1.3.6 – Kampfkraft Verlauf & Mitgliederakte */
.team-power-form{column-gap:18px!important}
.team-power-form>button{margin-left:8px}
.team-power-more-button{margin-top:10px;padding:7px 12px;border:1px solid #34414c;background:#0b1218;color:#aab5bd;font-size:9px;cursor:pointer}
.team-power-more-button:hover{border-color:#806427;color:#f1cf79;background:#151208}
.team-power-history-row[hidden]{display:none!important}
.member-team-power-card{padding:22px 24px;margin-bottom:16px}
@media(max-width:900px){.team-power-form>button{margin-left:0;margin-top:5px}}
@media(max-width:640px){.member-team-power-card{padding:16px 13px}}


/* V1.3.7 – Mitgliederakte: Kampfkraft unter Spielerakte + Vorfallhistorie */
.member-team-power-card{
  width:100%;
  box-sizing:border-box;
  margin-top:16px;
}


/* V1.3.8 – Kampfkraft-Hover */
.team-power-dot{
  cursor:help;
  transition:r .12s ease, stroke-width .12s ease;
}

.team-power-dot:hover{
  r:8px;
  stroke-width:4px;
}


/* V1.3.9 – Navigation immer bis zum unteren Fensterrand */
.app{
  min-height:100dvh;
}

.app aside{
  align-self:stretch;
  min-height:100dvh;
  height:auto!important;
  max-height:none!important;
  box-sizing:border-box;
  border-right:1px solid #27323f;
  background:#080d12;
}

@supports not (height:100dvh){
  .app{
    min-height:100vh;
  }

  .app aside{
    min-height:100vh;
  }
}

@media(max-width:900px){
  .app aside{
    min-height:100%;
  }
}


/* V1.3.9 – Wüstensturm */
.desert-page-head,
.desert-builder-card,
.desert-detail-head,
.desert-event-list-card{
  padding:22px 24px;
  margin-bottom:16px;
}

.desert-page-head,
.desert-builder-head,
.desert-detail-head,
.desert-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.desert-page-head h2,
.desert-builder-head h2,
.desert-detail-head h2,
.desert-section-head h3{
  margin:5px 0 0;
}

.desert-page-head p,
.desert-detail-head p{
  margin:7px 0 0;
  color:#7e8c98;
  font-size:10px;
}

.desert-event-list{
  display:flex;
  flex-direction:column;
  gap:7px;
}

.desert-event-row{
  display:grid;
  grid-template-columns:120px minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  padding:11px 13px;
  border:1px solid #293641;
  background:#0a1118;
  color:#dbe2e7;
  text-decoration:none;
}

.desert-event-row:hover{
  border-color:#806427;
  background:#151208;
}

.desert-event-row.is-upcoming{
  border-left:3px solid #d2a447;
}

.desert-event-date small,
.desert-event-row div:nth-child(2) small{
  display:block;
  color:#778590;
  font-size:8px;
}

.desert-event-date strong{
  display:block;
  margin-top:3px;
  font-size:11px;
}

.desert-open{
  color:#d2a447;
  font-size:9px;
}

.desert-empty{
  padding:18px;
  border:1px dashed #34414c;
  background:#0a1016;
  color:#788691;
  font-size:10px;
}

.desert-date-field{
  max-width:320px;
  margin:20px 0 18px;
}

.desert-date-field label{
  display:block;
  margin-bottom:6px;
  color:#82909c;
  font-size:8px;
  letter-spacing:.08em;
}

.desert-date-field input{
  width:100%;
}

.desert-date-field small{
  display:block;
  margin-top:6px;
  color:#697681;
  font-size:8px;
}

.desert-wizard-progress{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:6px;
  margin-bottom:18px;
}

.desert-progress-step{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  padding:8px 9px;
  border:1px solid #27343f;
  background:#0a1118;
  color:#697681;
  font-size:8px;
}

.desert-progress-step span{
  width:20px;
  height:20px;
  min-width:20px;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:1px solid #3b4853;
  font-size:8px;
}

.desert-progress-step.is-active{
  border-color:#9a7429;
  background:#17130b;
  color:#f1cf79;
}

.desert-progress-step.is-active span{
  border-color:#d2a447;
  background:#d2a447;
  color:#171108;
}

.desert-progress-step.is-done{
  color:#7fcf9d;
  border-color:#31513e;
}

.desert-step-copy{
  margin-bottom:13px;
}

.desert-step-copy h3{
  margin:5px 0 5px;
}

.desert-step-copy p{
  margin:0;
  color:#7d8a96;
  font-size:10px;
}

.desert-picker-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:14px;
}

.desert-picker-panel,
.desert-selected-panel{
  min-width:0;
  padding:14px;
  border:1px solid #293641;
  background:#091017;
}

.desert-picker-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}

.desert-picker-head strong{
  display:block;
  font-size:10px;
}

.desert-picker-head small{
  display:block;
  margin-top:3px;
  color:#71808c;
  font-size:8px;
}

#desert-member-search{
  width:100%;
  margin-bottom:10px;
}

.desert-member-pool{
  max-height:430px;
  overflow-y:auto;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
}

.desert-member-option{
  min-width:0;
  padding:8px 9px;
  border:1px solid #27343f;
  border-radius:4px;
  background:#0d151c;
  color:#dbe2e7;
  text-align:left;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px;
  cursor:pointer;
}

.desert-member-option:hover{
  border-color:#806427;
  background:#151208;
}

.desert-selected-list{
  max-height:430px;
  overflow-y:auto;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}

.desert-selected-member{
  display:grid;
  grid-template-columns:26px minmax(0,1fr) 28px;
  align-items:center;
  gap:7px;
  min-width:0;
  padding:7px 8px;
  border:1px solid #54461e;
  background:#151209;
}

.desert-selected-position{
  color:#e5bd4d;
  font-size:9px;
  font-weight:800;
}

.desert-selected-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px;
}

.desert-selected-remove{
  width:27px;
  height:27px;
  padding:0;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:1px solid #76343a;
  background:#180d0f;
  color:#e77379;
  cursor:pointer;
}

.desert-selected-empty,
.desert-no-results{
  grid-column:1/-1;
  padding:22px 10px;
  text-align:center;
  color:#687681;
  font-size:9px;
}

.desert-builder-actions{
  display:flex;
  justify-content:flex-end;
  gap:9px;
  margin-top:14px;
}

.desert-detail-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.desert-group-card{
  padding:17px 18px;
}

.desert-both-card{
  grid-column:1/-1;
}

.desert-group-title{
  display:grid;
  grid-template-columns:58px minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}

.desert-group-title > span{
  width:54px;
  height:36px;
  display:grid;
  place-items:center;
  border-radius:4px;
  font-size:9px;
  font-weight:900;
}

.desert-team-b{
  background:#102033;
  border:1px solid #355f8d;
  color:#8fc3f5;
}

.desert-team-a{
  background:#21150b;
  border:1px solid #8a5c2c;
  color:#f0b66c;
}

.desert-reserve{
  background:#15151a;
  border:1px solid #4a4e57;
  color:#b4bbc2;
}

.desert-both{
  background:#121a10;
  border:1px solid #4e743e;
  color:#9ad183;
}

.desert-group-title strong{
  display:block;
  font-size:10px;
}

.desert-group-title small{
  display:block;
  margin-top:2px;
  color:#72808c;
  font-size:8px;
}

.desert-group-title b{
  color:#f1cf79;
  font-size:18px;
}

.desert-group-members{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}

.desert-member-row{
  min-width:0;
  padding:8px 9px;
  border:1px solid #293641;
  background:#0a1118;
}

.desert-member-row span{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px;
}

.desert-empty-mini{
  grid-column:1/-1;
  padding:12px;
  border:1px dashed #34414c;
  color:#687681;
  font-size:9px;
  text-align:center;
}

@media(max-width:1100px){
  .desert-member-pool{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:900px){
  .desert-picker-layout,
  .desert-detail-grid{
    grid-template-columns:1fr;
  }

  .desert-both-card{
    grid-column:auto;
  }

  .desert-wizard-progress{
    grid-template-columns:1fr;
  }
}

@media(max-width:700px){
  .desert-member-pool,
  .desert-selected-list,
  .desert-group-members{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:520px){
  .desert-page-head,
  .desert-builder-head,
  .desert-detail-head{
    align-items:stretch;
    flex-direction:column;
  }

  .desert-page-head .button,
  .desert-builder-head .button,
  .desert-detail-head .button{
    width:100%;
    text-align:center;
  }

  .desert-member-pool,
  .desert-selected-list,
  .desert-group-members{
    grid-template-columns:1fr;
  }

  .desert-builder-actions{
    flex-wrap:wrap;
  }

  .desert-builder-actions button{
    flex:1 1 140px;
  }
}


/* V1.4.0 – Wüstensturm finale Aufstellung */
.desert-lineup-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:16px;
}

.desert-lineup-team{
  min-width:0;
  padding:18px;
}

.desert-lineup-team-b{
  border-top:2px solid #4f8bc5;
}

.desert-lineup-team-a{
  border-top:2px solid #c78743;
}

.desert-lineup-team-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.desert-lineup-team-head h3{
  margin:5px 0 0;
}

.desert-lineup-counts{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.desert-lineup-counts span{
  padding:5px 7px;
  border:1px solid #303d48;
  background:#0a1118;
  color:#84929d;
  font-size:8px;
}

.desert-lineup-counts strong{
  color:#f1cf79;
}

.desert-lineup-list{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.desert-lineup-person{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border:1px solid #293641;
  background:#0a1118;
}

.desert-lineup-person.is-assigned{
  border-color:#6c5725;
  background:#141109;
}

.desert-lineup-person.is-crossed{
  opacity:.42;
  background:#090d11;
}

.desert-lineup-person.is-crossed .desert-lineup-name-row strong,
.desert-lineup-person.is-crossed .desert-lineup-power{
  text-decoration:line-through;
}

.desert-lineup-person-main{
  min-width:0;
}

.desert-lineup-name-row{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
}

.desert-lineup-name-row strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:10px;
}

.desert-both-badge{
  flex:0 0 auto;
  padding:3px 5px;
  border:1px solid #4d713f;
  background:#111a0f;
  color:#9ad183;
  font-size:7px;
  font-weight:800;
}

.desert-lineup-power{
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:4px;
}

.desert-lineup-power strong{
  color:#f1cf79;
  font-size:10px;
}

.desert-lineup-power span{
  color:#72808c;
  font-size:8px;
}

.desert-lineup-actions{
  display:flex;
  align-items:center;
  gap:5px;
}

.desert-lineup-actions form{
  margin:0;
}

.desert-slot-button{
  min-width:58px;
  padding:7px 8px;
  border:1px solid #345a43;
  background:#0e1812;
  color:#80d29e;
  font-size:8px;
  cursor:pointer;
}

.desert-slot-button.reserve{
  border-color:#555b63;
  background:#11161b;
  color:#a9b0b6;
}

.desert-slot-button.is-active{
  border-color:#d2a447;
  background:#221a09;
  color:#f1cf79;
}

.desert-slot-button:disabled{
  opacity:.35;
  cursor:not-allowed;
}

.desert-unassign{
  width:29px;
  height:29px;
  padding:0;
  display:grid;
  place-items:center;
  border:1px solid #813940;
  border-radius:50%;
  background:#180d0f;
  color:#ef737a;
  font-size:16px;
  cursor:pointer;
}

.desert-crossed-note{
  color:#8a949b;
  font-size:8px;
  white-space:nowrap;
}

@media(max-width:1000px){
  .desert-lineup-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:640px){
  .desert-lineup-team{
    padding:13px;
  }

  .desert-lineup-person{
    grid-template-columns:1fr;
  }

  .desert-lineup-actions{
    flex-wrap:wrap;
  }

  .desert-lineup-team-head{
    flex-direction:column;
  }

  .desert-lineup-counts{
    justify-content:flex-start;
  }
}

/* V1.4.1 – Wüstensturm Ersatz-Trennung + AJAX */
.desert-candidate-divider{display:flex;align-items:center;gap:10px;margin:12px 0 5px;color:#778590;font-size:8px;text-transform:uppercase;letter-spacing:.08em}
.desert-candidate-divider::before,.desert-candidate-divider::after{content:"";height:1px;flex:1;background:#2c3741}
.desert-candidate-divider span{white-space:nowrap}
.desert-ajax-status{position:fixed;right:18px;bottom:18px;z-index:1000;max-width:320px;padding:10px 13px;border:1px solid #3f624b;background:#0d1812;color:#8edfac;font-size:9px;box-shadow:0 8px 30px rgba(0,0,0,.35)}
.desert-ajax-status.is-error{border-color:#873b41;background:#190e10;color:#ef8b91}
@media(max-width:640px){.desert-ajax-status{left:12px;right:12px;bottom:12px;max-width:none}}


/* V1.4.3 – Ersatzbereich deutlicher absetzen */
.desert-candidate-divider{
  margin:18px 0 9px!important;
  padding:9px 10px!important;
  border-top:2px solid #656d76!important;
  border-bottom:1px solid #323d47!important;
  background:linear-gradient(90deg,#111820,#0b1117)!important;
  color:#c2c9cf!important;
  font-size:9px!important;
  font-weight:800!important;
  letter-spacing:.11em!important;
}

.desert-candidate-divider::before,
.desert-candidate-divider::after{
  display:none!important;
}

/* V1.4.3 – Wüstensturm Kampfkraft-Check */
.desert-power-check-card{
  padding:22px 24px;
}

.desert-power-check-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:17px;
}

.desert-power-check-head h2{
  margin:5px 0 7px;
}

.desert-power-check-head p{
  margin:0;
  max-width:700px;
  color:#7e8c98;
  font-size:10px;
  line-height:1.55;
}

.desert-power-date{
  min-width:130px;
  text-align:right;
}

.desert-power-date small{
  display:block;
  color:#778590;
  font-size:8px;
}

.desert-power-date strong{
  display:block;
  margin-top:4px;
  color:#f1cf79;
  font-size:15px;
}

.desert-power-info{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:13px;
  padding:11px 13px;
  border:1px solid #374651;
  background:#0b1218;
}

.desert-power-info strong{
  font-size:10px;
}

.desert-power-info span{
  color:#82909c;
  font-size:9px;
}

.desert-power-info b{
  color:#e5bd4d;
}

.desert-power-list{
  display:flex;
  flex-direction:column;
  gap:7px;
}

.desert-power-row{
  display:grid;
  grid-template-columns:minmax(190px,1fr) 150px 190px;
  align-items:end;
  gap:13px;
  padding:11px 12px;
  border:1px solid #293641;
  background:#0a1118;
}

.desert-power-player{
  min-width:0;
}

.desert-power-player > strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:10px;
}

.desert-power-player small{
  display:block;
  margin-top:5px;
  color:#798793;
  font-size:8px;
}

.desert-power-state{
  display:inline-block;
  margin-top:5px;
  padding:4px 6px;
  border-radius:999px;
  font-size:7px;
  font-weight:800;
}

.desert-power-state.missing{
  border:1px solid #8e3c43;
  background:#1a0d10;
  color:#ef858c;
}

.desert-power-state.stale{
  border:1px solid #806427;
  background:#1b1609;
  color:#e6bd50;
}

.desert-power-type label,
.desert-power-value label{
  display:block;
  margin-bottom:6px;
  color:#75838e;
  font-size:7px;
  letter-spacing:.08em;
}

.desert-power-type select,
.desert-power-value input{
  width:100%;
}

.desert-power-input-wrap{
  position:relative;
}

.desert-power-input-wrap input{
  padding-right:43px;
}

.desert-power-input-wrap span{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  color:#7f8d98;
  font-size:8px;
  pointer-events:none;
}

.desert-power-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:14px;
}

.desert-power-complete{
  padding:18px;
  border:1px solid #355342;
  background:#0d1711;
  color:#8edfac;
  font-size:10px;
}

@media(max-width:800px){
  .desert-power-row{
    grid-template-columns:1fr 1fr;
  }

  .desert-power-player{
    grid-column:1/-1;
  }
}

@media(max-width:560px){
  .desert-power-check-card{
    padding:16px 13px;
  }

  .desert-power-check-head,
  .desert-power-info{
    align-items:flex-start;
    flex-direction:column;
  }

  .desert-power-date{
    text-align:left;
  }

  .desert-power-row{
    grid-template-columns:1fr;
  }

  .desert-power-player{
    grid-column:auto;
  }

  .desert-power-actions button,
  .desert-power-actions .button{
    width:100%;
    text-align:center;
  }
}


/* V1.4.4 – Kampfkraft-Check Teilspeichern / Layout */
.desert-power-row{
  grid-template-columns:minmax(0,1fr) minmax(130px,150px) minmax(170px,210px)!important;
}

.desert-power-row > *{
  min-width:0;
}

.desert-power-type,
.desert-power-value{
  min-width:0;
}

.desert-power-type select,
.desert-power-value input{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}

.desert-power-input-wrap{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}

.desert-power-input-wrap input{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}

.desert-power-actions-split{
  margin-top:16px;
}

.desert-power-skip-form{
  display:flex;
  justify-content:flex-end;
  margin-top:9px;
}

.desert-power-skip-form .button{
  min-width:250px;
}

@media(max-width:900px){
  .desert-power-row{
    grid-template-columns:minmax(0,1fr) minmax(140px,180px)!important;
  }

  .desert-power-value{
    grid-column:1/-1;
  }
}

@media(max-width:560px){
  .desert-power-row{
    grid-template-columns:1fr!important;
  }

  .desert-power-value{
    grid-column:auto;
  }

  .desert-power-skip-form{
    display:block;
  }

  .desert-power-skip-form .button{
    width:100%;
    min-width:0;
    text-align:center;
  }
}

/* V1.5.0 – Wüstensturm Gebäudezuordnung */
.desert-lineup-next-card{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:16px;padding:16px 18px}
.desert-lineup-next-status{display:flex;gap:8px;flex-wrap:wrap}.desert-lineup-next-status>div{min-width:170px;padding:8px 10px;border:1px solid #34414c;background:#0a1118}.desert-lineup-next-status span,.desert-lineup-next-status small{display:block;color:#74828d;font-size:8px}.desert-lineup-next-status strong{display:block;margin:3px 0;font-size:10px}.desert-lineup-next-status .is-ready{border-color:#355342;background:#0d1711}.desert-lineup-next-status .is-ready strong{color:#8edfac}.desert-lineup-next-hint{max-width:430px;color:#788691;font-size:9px;text-align:right}
.desert-position-head,.desert-final-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:22px 24px;margin-bottom:16px}.desert-position-head h2,.desert-final-head h2{margin:5px 0 7px}.desert-position-head p,.desert-final-head p{margin:0;color:#7d8a96;font-size:10px}.desert-position-date{text-align:right}.desert-position-date small{display:block;color:#778590;font-size:8px}.desert-position-date strong{display:block;margin-top:4px;color:#f1cf79;font-size:15px}
.desert-position-team-grid,.desert-final-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}.desert-position-team,.desert-final-team{min-width:0;padding:18px}.desert-position-team-head,.desert-final-team-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.desert-position-team-head h3,.desert-final-team-head h3{margin:5px 0 0}.desert-position-progress{padding:5px 8px;border:1px solid #34414c;background:#0a1118;color:#9aa7b1;font-size:8px}
.desert-position-player-pool{min-height:52px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:15px;padding:10px;border:1px dashed #4a5761;background:#080e13}.desert-draggable-player{min-width:0;padding:8px 9px;border:1px solid #806427;background:#161208;cursor:grab}.desert-draggable-player strong,.desert-draggable-player small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.desert-draggable-player strong{font-size:9px}.desert-draggable-player small{margin-top:3px;color:#d2a447;font-size:8px}
.desert-building-board{display:flex;flex-direction:column;gap:9px}.desert-building-group{padding:10px;border:1px solid #293641;background:#0a1118}.desert-building-group-title{display:flex;justify-content:space-between;gap:10px;margin-bottom:7px}.desert-building-group-title strong{font-size:9px}.desert-building-group-title small{color:#71808c;font-size:8px}.desert-building-slots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.desert-building-slot{min-height:48px;display:grid;grid-template-columns:24px minmax(0,1fr) 26px;align-items:center;gap:7px;padding:7px;border:1px dashed #4b5862;background:#080e13}.desert-building-slot.is-over{border-color:#d2a447;background:#171309}.desert-slot-number{color:#697681;font-size:8px}.desert-slot-content{min-width:0}.desert-slot-content strong,.desert-slot-content small,.desert-slot-content span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.desert-slot-content strong{font-size:9px}.desert-slot-content small{margin-top:3px;color:#d2a447;font-size:8px}.desert-slot-content span{color:#596671;font-size:8px}.desert-slot-remove{width:24px;height:24px;padding:0;display:grid;place-items:center;border:1px solid #79363d;border-radius:50%;background:#180d0f;color:#ef737a}
.desert-position-reserves{margin-top:14px;padding-top:12px;border-top:2px solid #404b55}.desert-position-reserve-title{margin-bottom:7px;color:#aeb7be;font-size:8px;font-weight:800;text-transform:uppercase}.desert-position-reserve-list,.desert-final-reserve-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.desert-position-reserve-list>div,.desert-final-reserve-list>div{padding:7px 8px;border:1px solid #303a43;background:#0b1117}.desert-position-reserve-list strong,.desert-position-reserve-list small,.desert-final-reserve-list strong,.desert-final-reserve-list small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.desert-position-reserve-list strong,.desert-final-reserve-list strong{font-size:8px}.desert-position-reserve-list small,.desert-final-reserve-list small{margin-top:3px;color:#71808c;font-size:7px}
.desert-position-save-card{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:16px;padding:14px 16px}.desert-position-save-card strong,.desert-position-save-card small{display:block}.desert-position-save-card small{margin-top:3px;color:#778590;font-size:8px}.desert-position-save-card button:disabled{opacity:.35}
.desert-final-head-actions{display:flex;flex-wrap:wrap;gap:7px}.desert-final-team.team-b{border-top:2px solid #4f8bc5}.desert-final-team.team-a{border-top:2px solid #c78743}.desert-final-buildings{display:flex;flex-direction:column;gap:8px}.desert-final-building{padding:9px;border:1px solid #293641;background:#0a1118}.desert-final-building-title{margin-bottom:6px;color:#b8c1c8;font-size:8px;font-weight:800;text-transform:uppercase}.desert-final-building-members{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.desert-final-player{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:6px;padding:6px 7px;border:1px solid #303a43;background:#080e13}.desert-final-player strong{font-size:8px}.desert-final-player small{color:#d2a447;font-size:7px}.desert-final-reserves{margin-top:14px;padding-top:12px;border-top:2px solid #424d57}.desert-final-reserve-head{display:flex;justify-content:space-between;margin-bottom:7px}.desert-final-empty{padding:8px;color:#65727d;font-size:8px}
@media(max-width:1050px){.desert-position-team-grid,.desert-final-grid{grid-template-columns:1fr}}@media(max-width:760px){.desert-position-player-pool,.desert-position-reserve-list,.desert-final-reserve-list{grid-template-columns:repeat(2,minmax(0,1fr))}.desert-lineup-next-card,.desert-position-save-card{align-items:stretch;flex-direction:column}.desert-lineup-next-hint{text-align:left}}@media(max-width:520px){.desert-position-head,.desert-final-head{flex-direction:column}.desert-position-player-pool,.desert-position-reserve-list,.desert-final-reserve-list,.desert-final-building-members,.desert-building-slots{grid-template-columns:1fr}.desert-final-head-actions .button{width:100%;text-align:center}}


/* V1.5.1 – Gebäudezuordnung lesbarer + 2 Schritte */
.desert-position-stepper{
  width:100%;
}

.desert-position-step-tabs{
  display:flex;
  gap:10px;
  margin-bottom:14px;
}

.desert-position-step-tab{
  min-width:170px;
  padding:12px 16px;
  border:1px solid #34414c;
  background:#0a1118;
  color:#8d9aa5;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}

.desert-position-step-tab.is-active{
  border-color:#d2a447;
  background:#181309;
  color:#f1cf79;
}

.desert-position-step-tab:disabled{
  opacity:.35;
  cursor:not-allowed;
}

.desert-position-team-grid{
  grid-template-columns:1fr!important;
}

.desert-position-team{
  padding:24px!important;
}

.desert-position-team.is-step-hidden{
  display:none!important;
}

.desert-position-team-head h3{
  font-size:20px!important;
}

.desert-position-progress{
  font-size:10px!important;
  padding:7px 10px!important;
}

.desert-position-player-pool{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:9px!important;
  padding:14px!important;
  margin-bottom:20px!important;
}

.desert-draggable-player{
  padding:11px 12px!important;
  font-size:11px!important;
}

.desert-draggable-player strong{
  font-size:11px!important;
}

.desert-draggable-player small{
  margin-top:5px!important;
  font-size:9px!important;
}

.desert-building-board{
  gap:12px!important;
}

.desert-building-group{
  padding:14px!important;
}

.desert-building-group-title{
  margin-bottom:10px!important;
}

.desert-building-group-title strong{
  font-size:11px!important;
}

.desert-building-group-title small{
  font-size:9px!important;
}

.desert-building-slots{
  gap:9px!important;
}

.desert-building-slot{
  min-height:62px!important;
  grid-template-columns:28px minmax(0,1fr) 30px!important;
  padding:10px!important;
}

.desert-slot-number{
  font-size:10px!important;
}

.desert-slot-content strong{
  font-size:11px!important;
}

.desert-slot-content small,
.desert-slot-content span{
  font-size:9px!important;
}

.desert-position-reserve-title{
  font-size:10px!important;
}

.desert-position-reserve-list{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
}

.desert-position-reserve-list > div{
  padding:9px 10px!important;
}

.desert-position-reserve-list strong{
  font-size:10px!important;
}

.desert-position-reserve-list small{
  font-size:8px!important;
}

.desert-position-step-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:14px;
}

.desert-position-step-actions button{
  min-width:190px;
}

.desert-position-save-card{
  margin-top:18px!important;
}

@media(max-width:1000px){
  .desert-position-player-pool,
  .desert-position-reserve-list{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

@media(max-width:760px){
  .desert-position-player-pool,
  .desert-position-reserve-list{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .desert-position-step-tabs{
    flex-direction:column;
  }

  .desert-position-step-tab{
    width:100%;
  }
}

@media(max-width:520px){
  .desert-position-team{
    padding:14px!important;
  }

  .desert-position-player-pool,
  .desert-position-reserve-list,
  .desert-building-slots{
    grid-template-columns:1fr!important;
  }

  .desert-position-step-actions{
    flex-direction:column;
  }

  .desert-position-step-actions button{
    width:100%;
    min-width:0;
  }
}

/* V1.5.2 – Wüstensturm Statistik & Pool-Sortierung */
.desert-lineup-history{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:6px}
.desert-lineup-history>span{padding:3px 6px;border:1px solid #34414c;border-radius:999px;background:#0b1218;color:#82909c;font-size:7px}
.desert-lineup-history>span strong{color:#d6dde2;font-size:8px}
.desert-lineup-history>span.has-no-show{border-color:#7f3b41;background:#190f11;color:#e18a90}
.desert-lineup-history>span.has-no-show strong{color:#ef858c}
.desert-position-player-pool{align-content:start}
.desert-draggable-player[hidden]{display:none!important}

/* V1.5.3 – kompakte Gebäudezuordnung */
.desert-position-player-pool{
  position:sticky;
  top:10px;
  z-index:20;
  max-height:190px;
  overflow-y:auto;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  padding:10px!important;
  margin-bottom:12px!important;
  box-shadow:0 8px 18px rgba(0,0,0,.28);
}
.desert-draggable-player{
  padding:8px 9px!important;
  cursor:pointer!important;
}
.desert-draggable-player strong{font-size:10px!important}
.desert-draggable-player small{font-size:8px!important;margin-top:3px!important}
.desert-draggable-player.is-selected{
  border-color:#f0c65a!important;
  background:#261e0d!important;
  box-shadow:0 0 0 1px #f0c65a inset;
}
.desert-building-board{gap:7px!important}
.desert-building-group{padding:9px 10px!important}
.desert-building-group-title{margin-bottom:6px!important}
.desert-building-slot{
  min-height:46px!important;
  padding:6px 8px!important;
}
.desert-slot-content strong{font-size:10px!important}
.desert-slot-content small,.desert-slot-content span{font-size:8px!important}
.desert-position-team{padding:18px!important}
@media(max-width:1100px){
 .desert-position-player-pool{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:760px){
 .desert-position-player-pool{position:static;max-height:none;grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* V1.5.4 – deutlichere Auswahl + schönere Wüstensturm-Statistik */
.desert-position-selected-bar{
  position:sticky;
  top:0;
  z-index:24;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
  padding:9px 12px;
  border:1px solid #384550;
  background:#0a1118;
  color:#7c8994;
  font-size:9px;
}
.desert-position-selected-bar span{
  text-transform:uppercase;
  letter-spacing:.08em;
}
.desert-position-selected-bar strong{
  color:#9ba7b0;
  font-size:11px;
}
.desert-position-selected-bar.has-selection{
  border-color:#d2a447;
  background:#1b160a;
  box-shadow:0 0 0 1px rgba(210,164,71,.2) inset;
}
.desert-position-selected-bar.has-selection strong{
  color:#f1cf79;
}
.desert-draggable-player.is-selected{
  position:relative;
  border:2px solid #f0c65a!important;
  background:#2a210e!important;
  box-shadow:0 0 0 2px rgba(240,198,90,.12),0 0 18px rgba(210,164,71,.18)!important;
  transform:translateY(-1px);
}
.desert-draggable-player.is-selected::after{
  content:"AUSGEWÄHLT";
  position:absolute;
  right:6px;
  top:5px;
  padding:2px 5px;
  border-radius:999px;
  background:#d2a447;
  color:#171108;
  font-size:6px;
  font-weight:900;
  letter-spacing:.05em;
}
.desert-lineup-history{
  margin-top:7px!important;
}
.desert-lineup-history>span{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 7px!important;
  border-radius:5px!important;
  font-size:8px!important;
}
.desert-lineup-history>span:first-child{
  border-color:#31513e;
  background:#0d1711;
  color:#7ecb99;
}
.desert-lineup-history>span:first-child strong{
  color:#a8e7bf;
}
.desert-lineup-history>span.has-no-show{
  border-color:#7f3b41!important;
  background:#190f11!important;
  color:#e18a90!important;
}
.desert-lineup-history>span:not(.has-no-show):last-child{
  border-color:#3d4954;
  background:#0b1218;
  color:#8d9aa5;
}
@media(max-width:760px){
  .desert-position-selected-bar{
    position:static;
  }
}

/* V1.5.5 */
.rule-expiry-input{min-width:120px}.form-help{display:block;margin:5px 0 12px;color:#7f8c96;font-size:9px;line-height:1.45}


/* V1.5.6 – Bewertungsregeln als klare Tabelle */
.rule-table-head,
.rule-table-row{
  display:grid!important;
  grid-template-columns:92px minmax(170px,1.15fr) 105px minmax(210px,1.45fr) 165px 105px 105px!important;
  align-items:center;
  gap:9px!important;
}

.rule-table-head{
  margin:14px 0 6px;
  padding:0 12px;
  color:#82909c;
  font-size:8px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.rule-table-row{
  padding:10px 12px!important;
}

.rule-table-row input{
  min-width:0;
  width:100%;
  box-sizing:border-box;
}

.rule-move-buttons{
  display:flex;
  gap:5px;
}

.rule-move{
  width:34px;
  height:34px;
  min-width:34px;
  padding:0!important;
  display:grid;
  place-items:center;
  border:1px solid #3a4752;
  background:#0c1319;
  color:#c0c8ce;
  font-size:16px;
  line-height:1;
  cursor:pointer;
}

.rule-move:hover:not(:disabled){
  border-color:#d2a447;
  color:#f1cf79;
  background:#181309;
}

.rule-move:disabled{
  opacity:.25;
  cursor:not-allowed;
}

.rule-expiry-cell{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}

.rule-expiry-cell span{
  color:#72808c;
  font-size:8px;
}

.rule-expiry-input{
  min-width:0!important;
}

.rule-active-check{
  display:flex!important;
  align-items:center;
  gap:6px;
  min-width:0;
  font-size:8px;
}

.rule-active-check span{
  color:#9aa6af;
}

.rule-save-button{
  white-space:nowrap;
}

.rule-new-marker{
  display:grid;
  place-items:center;
  height:32px;
  border:1px dashed #4b5862;
  color:#72808c;
  font-size:8px;
}

.rule-new-active{
  color:#70808a;
  font-size:8px;
}

@media(max-width:1100px){
  .rule-table-head{
    display:none!important;
  }

  .rule-table-row{
    grid-template-columns:90px 1fr 110px!important;
  }

  .rule-table-row > input[name="description"],
  .rule-expiry-cell{
    grid-column:2/-1;
  }

  .rule-table-row > input[name="name"]{
    grid-column:2;
  }

  .rule-active-check,
  .rule-save-button{
    grid-column:auto;
  }
}

@media(max-width:650px){
  .rule-table-row{
    grid-template-columns:1fr!important;
  }

  .rule-table-row > *,
  .rule-table-row > input[name="description"],
  .rule-expiry-cell,
  .rule-table-row > input[name="name"]{
    grid-column:1!important;
  }

  .rule-move-buttons{
    justify-content:flex-start;
  }

  .rule-save-button{
    width:100%;
  }
}

/* V1.5.7 – Wüstensturm Sperren & Priorität */
.desert-lineup-person.has-desert-ban{border-color:#7b3b41!important;background:linear-gradient(90deg,#190f11,#0b1117)!important}
.desert-lineup-person.has-desert-priority:not(.has-desert-ban){border-color:#365e45!important;background:linear-gradient(90deg,#0f1912,#0b1117)!important}
.desert-ban-badge{border-color:#8b4047!important;background:#1d1012!important;color:#ef959b!important}
.desert-priority-badge{border-color:#3c684d!important;background:#101b13!important;color:#96d6aa!important}


/* V1.5.8 – Wüstensturm Status deutlich hervorheben */

/* Spielsperre: komplette Zeile klar rot markieren */
.desert-lineup-person.has-desert-ban{
  position:relative;
  border:1px solid #a84b53!important;
  border-left:5px solid #d85d66!important;
  background:
    linear-gradient(90deg,rgba(106,27,34,.55) 0%,rgba(56,19,24,.42) 48%,rgba(11,17,23,.96) 100%)!important;
  box-shadow:
    inset 0 0 0 1px rgba(216,93,102,.10),
    0 0 0 1px rgba(216,93,102,.08)!important;
}

.desert-lineup-person.has-desert-ban:hover{
  border-color:#dc6972!important;
  border-left-color:#ef737c!important;
  background:
    linear-gradient(90deg,rgba(126,31,39,.65) 0%,rgba(65,22,28,.48) 48%,rgba(11,17,23,.98) 100%)!important;
}

.desert-lineup-person.has-desert-ban .desert-lineup-name-row strong{
  color:#ffd9dc!important;
}

.desert-lineup-person.has-desert-ban .desert-lineup-power strong{
  color:#ffb8bd!important;
}

.desert-lineup-person.has-desert-ban .desert-ban-badge{
  border:1px solid #d45d66!important;
  background:#46171c!important;
  color:#ffb8bd!important;
  font-weight:800!important;
}

.desert-lineup-person.has-desert-ban .desert-ban-badge strong{
  color:#fff0f1!important;
}

/* Bevorzugen: komplette Zeile klar grün markieren */
.desert-lineup-person.has-desert-priority:not(.has-desert-ban){
  position:relative;
  border:1px solid #4f8d63!important;
  border-left:5px solid #67b77f!important;
  background:
    linear-gradient(90deg,rgba(29,83,46,.55) 0%,rgba(22,53,33,.42) 48%,rgba(11,17,23,.96) 100%)!important;
  box-shadow:
    inset 0 0 0 1px rgba(103,183,127,.10),
    0 0 0 1px rgba(103,183,127,.08)!important;
}

.desert-lineup-person.has-desert-priority:not(.has-desert-ban):hover{
  border-color:#68ad7d!important;
  border-left-color:#7bd493!important;
  background:
    linear-gradient(90deg,rgba(34,96,53,.65) 0%,rgba(25,62,38,.48) 48%,rgba(11,17,23,.98) 100%)!important;
}

.desert-lineup-person.has-desert-priority:not(.has-desert-ban) .desert-lineup-name-row strong{
  color:#d7f6df!important;
}

.desert-lineup-person.has-desert-priority:not(.has-desert-ban) .desert-lineup-power strong{
  color:#aee5bd!important;
}

.desert-lineup-person.has-desert-priority:not(.has-desert-ban) .desert-priority-badge{
  border:1px solid #63ad78!important;
  background:#173b22!important;
  color:#bfe8cb!important;
  font-weight:800!important;
}

/* Status bleibt auch bei bereits zugeteilten Spielern sichtbar */
.desert-lineup-person.has-desert-ban.is-assigned,
.desert-lineup-person.has-desert-priority.is-assigned{
  outline-offset:1px;
}

/* auf Mobile ebenfalls klar, aber nicht überladen */
@media(max-width:640px){
  .desert-lineup-person.has-desert-ban,
  .desert-lineup-person.has-desert-priority:not(.has-desert-ban){
    border-left-width:4px!important;
  }
}


/* V1.5.9 – Wüstensturm finale Textübersicht */
.desert-text-team-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:16px;
}

.desert-text-team-card{
  min-width:0;
  padding:22px 24px;
}

.desert-text-team-card.team-a{
  border-top:3px solid #c78743;
}

.desert-text-team-card.team-b{
  border-top:3px solid #4f8bc5;
}

.desert-text-team-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
}

.desert-text-team-head h3{
  margin:5px 0 0;
  font-size:20px;
}

.desert-copy-button{
  white-space:nowrap;
}

.desert-readable-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.desert-readable-group{
  padding:12px 14px;
  border:1px solid #293641;
  background:#0a1118;
}

.desert-readable-title{
  margin-bottom:8px;
  padding-bottom:6px;
  border-bottom:1px solid #303b45;
  color:#f1cf79;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
}

.desert-readable-names{
  display:flex;
  flex-direction:column;
  gap:5px;
}

.desert-readable-names > div{
  color:#e1e7eb;
  font-size:12px;
  line-height:1.35;
}

.desert-readable-empty{
  color:#66747f;
  font-size:11px;
}

.desert-readable-reserve{
  margin-top:4px;
  border:1px solid #545e67;
  border-top:3px solid #7d8790;
  background:#0d1319;
}

.desert-readable-reserve .desert-readable-title{
  color:#c6cdd2;
}

.desert-copy-text{
  position:absolute!important;
  left:-99999px!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
}

.desert-copy-status{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:1000;
  padding:10px 14px;
  border:1px solid #3f624b;
  background:#0d1812;
  color:#9de2b8;
  font-size:10px;
  box-shadow:0 8px 28px rgba(0,0,0,.35);
}

@media(max-width:1000px){
  .desert-text-team-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:620px){
  .desert-text-team-card{
    padding:16px 14px;
  }

  .desert-text-team-head{
    align-items:stretch;
    flex-direction:column;
  }

  .desert-copy-button{
    width:100%;
  }

  .desert-readable-names > div{
    font-size:11px;
  }

  .desert-copy-status{
    left:12px;
    right:12px;
    bottom:12px;
    text-align:center;
  }
}


/* V1.7.0 – Schluchtensturm */
.canyon-page-head,
.canyon-event-list-card,
.canyon-builder-card,
.canyon-power-card,
.canyon-balance-head,
.canyon-overview-head{
  padding:22px 24px;
  margin-bottom:16px;
}

.canyon-page-head,
.canyon-builder-head,
.canyon-power-head,
.canyon-overview-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}

.canyon-page-head h2,
.canyon-builder-head h2,
.canyon-power-head h2,
.canyon-balance-head h2,
.canyon-overview-head h2{
  margin:5px 0 7px;
}

.canyon-page-head p,
.canyon-builder-head p,
.canyon-power-head p,
.canyon-balance-head p,
.canyon-overview-head p{
  margin:0;
  color:#7d8a96;
  font-size:10px;
  line-height:1.5;
}

.canyon-event-list{
  display:flex;
  flex-direction:column;
  gap:7px;
}

.canyon-event-row{
  display:grid;
  grid-template-columns:120px minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  padding:11px 13px;
  border:1px solid #293641;
  background:#0a1118;
  color:#dbe2e7;
  text-decoration:none;
}

.canyon-event-row:hover{
  border-color:#5a6f85;
  background:#0d151d;
}

.canyon-event-row small{
  display:block;
  margin-top:3px;
  color:#778590;
  font-size:8px;
}

.canyon-open{
  color:#8fb5d8;
  font-size:9px;
}

.canyon-empty{
  padding:18px;
  border:1px dashed #34414c;
  background:#0a1016;
  color:#788691;
  font-size:10px;
}

.canyon-date-field{
  max-width:320px;
  margin:20px 0 18px;
}

.canyon-date-field label,
.canyon-power-row label{
  display:block;
  margin-bottom:6px;
  color:#82909c;
  font-size:8px;
  letter-spacing:.08em;
}

.canyon-date-field input{
  width:100%;
}

.canyon-picker-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:14px;
}

.canyon-picker-panel,
.canyon-selected-panel{
  padding:14px;
  border:1px solid #293641;
  background:#091017;
}

.canyon-picker-head{
  margin-bottom:10px;
}

.canyon-picker-head strong,
.canyon-picker-head small{
  display:block;
}

.canyon-picker-head strong{
  font-size:10px;
}

.canyon-picker-head small{
  margin-top:3px;
  color:#71808c;
  font-size:8px;
}

#canyon-member-search{
  width:100%;
  margin-bottom:10px;
}

.canyon-member-pool{
  max-height:450px;
  overflow-y:auto;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
}

.canyon-member-option{
  min-width:0;
  padding:8px 9px;
  border:1px solid #27343f;
  border-radius:4px;
  background:#0d151c;
  color:#dbe2e7;
  text-align:left;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px;
  cursor:pointer;
}

.canyon-member-option:hover{
  border-color:#56728e;
  background:#101a24;
}

.canyon-selected-list{
  max-height:450px;
  overflow-y:auto;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}

.canyon-selected-member{
  display:grid;
  grid-template-columns:28px minmax(0,1fr) 28px;
  align-items:center;
  gap:7px;
  padding:7px 8px;
  border:1px solid #36526e;
  background:#0d1720;
}

.canyon-selected-position{
  color:#8fb5d8;
  font-size:9px;
  font-weight:800;
}

.canyon-selected-member strong{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px;
}

.canyon-selected-remove{
  width:27px;
  height:27px;
  padding:0;
  display:grid;
  place-items:center;
  border-radius:50%;
  border:1px solid #76343a;
  background:#180d0f;
  color:#e77379;
}

.canyon-selected-empty{
  grid-column:1/-1;
  padding:22px 10px;
  text-align:center;
  color:#687681;
  font-size:9px;
}

.canyon-builder-actions,
.canyon-power-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:14px;
}

.canyon-power-date{
  text-align:right;
}

.canyon-power-date small,
.canyon-power-date strong{
  display:block;
}

.canyon-power-date small{
  color:#778590;
  font-size:8px;
}

.canyon-power-date strong{
  margin-top:4px;
  color:#9dc5e9;
  font-size:15px;
}

.canyon-power-info{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:13px;
  padding:11px 13px;
  border:1px solid #374651;
  background:#0b1218;
}

.canyon-power-info strong{
  font-size:10px;
}

.canyon-power-info span{
  color:#82909c;
  font-size:9px;
}

.canyon-power-info b{
  color:#9dc5e9;
}

.canyon-power-list{
  display:flex;
  flex-direction:column;
  gap:7px;
}

.canyon-power-row{
  display:grid;
  grid-template-columns:minmax(190px,1fr) minmax(130px,150px) minmax(170px,210px);
  align-items:end;
  gap:13px;
  padding:11px 12px;
  border:1px solid #293641;
  background:#0a1118;
}

.canyon-power-player strong,
.canyon-power-player small{
  display:block;
}

.canyon-power-player strong{
  font-size:10px;
}

.canyon-power-player small{
  margin-top:5px;
  color:#798793;
  font-size:8px;
}

.canyon-power-state{
  display:inline-block;
  margin-top:5px;
  padding:4px 6px;
  border-radius:999px;
  font-size:7px;
  font-weight:800;
}

.canyon-power-state.missing{
  border:1px solid #8e3c43;
  background:#1a0d10;
  color:#ef858c;
}

.canyon-power-state.stale{
  border:1px solid #806427;
  background:#1b1609;
  color:#e6bd50;
}

.canyon-power-input-wrap{
  position:relative;
}

.canyon-power-input-wrap input{
  width:100%;
  padding-right:43px;
  box-sizing:border-box;
}

.canyon-power-input-wrap span{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  color:#7f8d98;
  font-size:8px;
}

.canyon-power-complete{
  padding:18px;
  border:1px solid #355342;
  background:#0d1711;
  color:#8edfac;
  font-size:10px;
}

.canyon-team-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:16px;
}

.canyon-team-card{
  min-width:0;
  padding:18px;
  border-top:3px solid #52769b;
}

.canyon-team-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.canyon-team-card-head h3{
  margin:5px 0 0;
  font-size:18px;
}

.canyon-team-power{
  color:#9dc5e9;
  font-size:15px;
  font-weight:900;
}

.canyon-team-type-summary{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.canyon-team-type-summary span{
  padding:5px 7px;
  border:1px solid #34414c;
  background:#0a1118;
  color:#84929d;
  font-size:8px;
}

.canyon-team-type-summary strong{
  color:#dbe5ec;
}

.canyon-team-members{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.canyon-team-member{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border:1px solid #293641;
  background:#0a1118;
}

.canyon-team-member strong,
.canyon-team-member small{
  display:block;
}

.canyon-team-member strong{
  font-size:10px;
}

.canyon-team-member small{
  margin-top:3px;
  color:#7e8b96;
  font-size:8px;
}

.canyon-team-member > span{
  color:#9dc5e9;
  font-size:9px;
}

.canyon-balance-save{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:16px;
  padding:14px 16px;
}

.canyon-balance-save strong,
.canyon-balance-save small{
  display:block;
}

.canyon-balance-save small{
  margin-top:3px;
  color:#778590;
  font-size:8px;
}

.canyon-overview-actions{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.canyon-overview-total{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
  padding:8px 10px;
  border:1px solid #34414c;
  background:#0b1218;
}

.canyon-overview-total span{
  color:#81909c;
  font-size:8px;
}

.canyon-overview-total strong{
  color:#9dc5e9;
  font-size:11px;
}

.canyon-copy-text{
  position:absolute!important;
  left:-99999px!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
}

.canyon-copy-status{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:1000;
  padding:10px 14px;
  border:1px solid #3f624b;
  background:#0d1812;
  color:#9de2b8;
  font-size:10px;
}

@media(max-width:1000px){
  .canyon-picker-layout,
  .canyon-team-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:800px){
  .canyon-member-pool{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .canyon-power-row{
    grid-template-columns:1fr 1fr;
  }

  .canyon-power-player{
    grid-column:1/-1;
  }
}

@media(max-width:620px){
  .canyon-page-head,
  .canyon-builder-head,
  .canyon-power-head,
  .canyon-overview-head,
  .canyon-balance-save{
    align-items:stretch;
    flex-direction:column;
  }

  .canyon-member-pool,
  .canyon-selected-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .canyon-power-row{
    grid-template-columns:1fr;
  }

  .canyon-power-player{
    grid-column:auto;
  }

  .canyon-power-date{
    text-align:left;
  }

  .canyon-overview-actions .button,
  .canyon-balance-save button{
    width:100%;
    text-align:center;
  }
}


/* V1.7.1 – Storm scheduling / Schluchtensturm overview fixes */
.canyon-event-list-card{
  overflow:hidden;
}

.canyon-event-row{
  display:grid!important;
  grid-template-columns:150px minmax(0,1fr) 90px!important;
  align-items:center!important;
  gap:16px!important;
  min-height:58px;
  padding:12px 14px!important;
}

.canyon-event-row > *{
  min-width:0;
}

.canyon-event-date strong{
  display:block;
  font-size:12px;
  white-space:nowrap;
}

.canyon-event-row > div:nth-child(2) strong{
  display:block;
  font-size:10px;
  line-height:1.3;
}

.canyon-event-row > div:nth-child(2) small{
  display:block;
  margin-top:4px;
  font-size:8px;
  line-height:1.3;
}

.canyon-open{
  justify-self:end;
  white-space:nowrap;
}

.canyon-fixed-date,
.storm-fixed-date{
  display:flex;
  flex-direction:column;
  gap:4px;
  max-width:340px;
  margin:18px 0;
  padding:12px 14px;
  border:1px solid #3d4b57;
  background:#0b1218;
}

.canyon-fixed-date span,
.storm-fixed-date span{
  color:#7d8a96;
  font-size:8px;
  letter-spacing:.08em;
}

.canyon-fixed-date strong,
.storm-fixed-date strong{
  color:#9dc5e9;
  font-size:13px;
}

@media(max-width:650px){
  .canyon-event-row{
    grid-template-columns:1fr!important;
    gap:6px!important;
  }

  .canyon-open{
    justify-self:start;
  }
}

/* V1.7.2 – besser lesbare Schluchtensturm-Verwaltung */
.canyon-event-list-card .canyon-section-head h3{
  font-size:18px;
  margin:5px 0 14px;
}
.canyon-event-row{
  min-height:78px!important;
  padding:16px 18px!important;
  grid-template-columns:180px minmax(0,1fr) 110px!important;
}
.canyon-event-date strong{
  font-size:16px!important;
}
.canyon-event-row > div:nth-child(2) strong{
  font-size:14px!important;
}
.canyon-event-row > div:nth-child(2) small{
  margin-top:6px!important;
  font-size:10px!important;
}
.canyon-open{
  font-size:11px!important;
  font-weight:800;
}
@media(max-width:650px){
  .canyon-event-row{
    grid-template-columns:1fr!important;
    min-height:auto!important;
  }
}

/* V1.7.3 – interaktive Schluchtensturm-Aufteilung */
.canyon-balance-selection{min-width:190px;padding:10px 12px;border:1px solid #34414c;background:#0a1118}
.canyon-balance-selection span,.canyon-balance-selection strong{display:block}
.canyon-balance-selection span{color:#778590;font-size:8px;letter-spacing:.08em;text-transform:uppercase}
.canyon-balance-selection strong{margin-top:4px;color:#9ba7b0;font-size:11px}
.canyon-balance-selection.has-selection{border-color:#d2a447;background:#1b160a}
.canyon-balance-selection.has-selection strong{color:#f1cf79}
.canyon-team-dropzone{transition:border-color .15s ease,background .15s ease}
.canyon-team-dropzone.is-drag-over{border-color:#d2a447!important;background:#10171d!important}
.canyon-team-members-editable{min-height:100px}
.canyon-team-member-editable{cursor:pointer;user-select:none;transition:border-color .12s ease,background .12s ease,transform .12s ease}
.canyon-team-member-editable:hover{border-color:#536a80;background:#0d1720}
.canyon-team-member-editable.is-selected{border:2px solid #f0c65a!important;background:#261e0d!important;box-shadow:0 0 0 1px rgba(240,198,90,.15) inset;transform:translateY(-1px)}
.canyon-team-member-editable.is-dragging{opacity:.45}
.canyon-team-type-summary span{display:grid;grid-template-columns:auto auto;column-gap:5px;align-items:center}
.canyon-team-type-summary span small{grid-column:1/-1;margin-top:3px;color:#64727d;font-size:7px}
.canyon-team-card-head h3 small{color:#74828d;font-size:10px;font-weight:500}
@media(max-width:620px){.canyon-balance-selection{width:100%;min-width:0;box-sizing:border-box}}

/* V1.7.4 – Schluchtensturm Gebäude */
.canyon-building-head{display:flex;align-items:center;justify-content:space-between;gap:18px}
.canyon-building-counter{min-width:120px;padding:10px 14px;border:1px solid #3a4854;background:#0b1218;text-align:center}
.canyon-building-counter span,.canyon-building-counter strong{display:block}.canyon-building-counter span{font-size:8px;color:#778590}.canyon-building-counter strong{font-size:16px;color:#f1cf79;margin-top:3px}
.canyon-player-pool-card{margin-top:14px}.canyon-building-section-title{display:flex;align-items:end;justify-content:space-between;margin-bottom:12px}
.canyon-building-pool{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;min-height:55px}
.canyon-building-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.canyon-building-slot-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.canyon-building-slot-head h3{font-size:13px}.canyon-building-slot-head span{font-size:9px;color:#83909b}
.canyon-building-drop{min-height:82px;border:1px dashed #34434f;padding:7px;margin-top:9px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;align-content:start}
.canyon-building-drop.is-over{border-color:#d2a447;background:#161408}
.canyon-building-player{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding:8px;border:1px solid #2e3b46;background:#0b131a;cursor:grab;min-width:0}
.canyon-building-player strong{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.canyon-building-player span{font-size:9px;color:#aeb9c2}.canyon-building-player small{grid-column:1/-1;font-size:7px;color:#6f7d88}.canyon-building-player.is-dragging{opacity:.4}
.canyon-building-save{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:12px}.canyon-building-save small{display:block;margin-top:3px;color:#778590}
.canyon-final-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.canyon-final-building{border-top:1px solid #27333d;padding:11px 0}.canyon-final-building h4{margin:0 0 7px;color:#d5b761;font-size:11px}.canyon-final-names{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.canyon-final-names span{padding:6px 8px;background:#0b131a;border:1px solid #27333d;font-size:9px}
@media(max-width:850px){.canyon-building-pool{grid-template-columns:repeat(2,minmax(0,1fr))}.canyon-building-grid,.canyon-final-grid{grid-template-columns:1fr}}
@media(max-width:520px){.canyon-building-head,.canyon-building-save{align-items:stretch;flex-direction:column}.canyon-building-pool,.canyon-building-drop,.canyon-final-names{grid-template-columns:1fr}}

/* V1.7.6 – Umfrage-Layout */
.canyon-wizard-progress{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:16px 0}
.canyon-progress-step{display:flex;align-items:center;gap:7px;padding:8px 9px;border:1px solid #27343f;background:#0a1118;color:#697681;font-size:8px}
.canyon-progress-step span{width:20px;height:20px;min-width:20px;display:grid;place-items:center;border-radius:50%;border:1px solid #3b4853;font-size:8px}
.canyon-progress-step.is-active{border-color:#b98c37;color:#e7c66f;background:#171409}
.canyon-step-copy{margin:0 0 12px}
.canyon-member-pool{max-height:620px;min-height:430px}
.canyon-selected-list{max-height:620px;min-height:430px;grid-template-columns:1fr}
.canyon-selected-member{grid-template-columns:minmax(0,1fr) 34px;gap:14px;padding:8px 10px}
.canyon-selected-member strong{font-size:10px;overflow:visible;text-overflow:clip}
.canyon-selected-remove{justify-self:end;margin-left:8px}
.desert-wizard-progress{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:900px){.desert-wizard-progress{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.canyon-wizard-progress,.desert-wizard-progress{grid-template-columns:1fr}.canyon-member-pool,.canyon-selected-list{min-height:300px}}

/* V1.7.7 – Mitgliederakte / Vorfallhistorie */
.canyon-selected-list{grid-template-columns:repeat(2,minmax(0,1fr))}
.canyon-selected-member{min-width:0}
.incident-expired{opacity:.58}
.incident-expired td:not(.incident-actions){text-decoration:line-through;text-decoration-thickness:1px;text-decoration-color:rgba(220,226,231,.45)}
.incident-expired-badge{display:inline-block;margin-left:7px;padding:2px 5px;border:1px solid #59636b;background:#11171c;color:#8c969e;font-size:7px;letter-spacing:.08em;text-decoration:none!important;vertical-align:middle}
.incident-statistics{margin-top:30px;padding-top:24px;border-top:1px solid #2a353e}
.incident-statistics-head p{max-width:760px;margin:6px 0 0;color:#7e8b95;font-size:9px;line-height:1.55}
.incident-stat-filter{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap;margin:16px 0}
.incident-stat-filter label{display:grid;gap:5px}.incident-stat-filter label span{font-size:7px;color:#74818b;letter-spacing:.09em}.incident-stat-filter input{min-width:155px}
.incident-stat-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0 15px}
.incident-stat-card{padding:13px;border:1px solid #2b3944;background:#0a1218}
.incident-stat-card span,.incident-stat-card strong{display:block}.incident-stat-card span{font-size:8px;color:#74818b}.incident-stat-card strong{margin-top:5px;font-size:18px;color:#dde5ea}.incident-stat-card:nth-child(2) strong{color:#e47a80}.incident-stat-card .incident-stat-period{font-size:11px;line-height:1.45}
.incident-stat-empty{padding:16px;border:1px dashed #303d47;color:#74818b;font-size:9px;text-align:center}
@media(max-width:620px){.canyon-selected-list{grid-template-columns:1fr}.incident-stat-cards{grid-template-columns:1fr}.incident-stat-filter{align-items:stretch;flex-direction:column}.incident-stat-filter label,.incident-stat-filter input,.incident-stat-filter button,.incident-stat-filter .button{width:100%}}

/* V1.7.8 – Audit-Filter / Kill-Statistik */
.audit-head p,.kill-stat-head p{margin:6px 0 0;color:#7d8993;font-size:9px;line-height:1.55}
.audit-filters{display:grid;grid-template-columns:2fr repeat(5,minmax(120px,1fr));gap:9px;align-items:end;margin-top:15px}
.audit-filters label,.kill-range-form label{display:grid;gap:5px}.audit-filters label span,.kill-range-form label span{font-size:7px;color:#74818b;letter-spacing:.09em}
.audit-filter-actions{display:flex;gap:7px;grid-column:1/-1}
.kill-range-form{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) auto;gap:10px;align-items:end}
.kill-profile-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:14px 0}
.kill-profile-summary>div{padding:13px;border:1px solid #2b3944;background:#0a1218}.kill-profile-summary span,.kill-profile-summary strong,.kill-profile-summary small{display:block}.kill-profile-summary span{font-size:8px;color:#74818b}.kill-profile-summary strong{margin:5px 0;font-size:18px}.kill-profile-summary small{color:#74818b;font-size:8px}
.kill-ranking tr:nth-child(2) td{background:rgba(185,140,55,.08)}.kill-ranking td:last-child strong{font-size:12px}
@media(max-width:1050px){.audit-filters{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.audit-filters,.kill-range-form,.kill-profile-summary{grid-template-columns:1fr}.audit-filter-actions{grid-column:auto}}

/* V1.7.9 – Audit / Datenschutz / Security UI */
.audit-table td:nth-child(2),.audit-table td:nth-child(3){font-weight:400;color:inherit}
.login-privacy-link{margin-top:14px;text-align:center;font-size:8px}.login-privacy-link a,.site-legal a{color:#788691;text-decoration:none}.login-privacy-link a:hover,.site-legal a:hover{color:#d6b25c}
.site-legal{padding:18px 0 6px;text-align:right;font-size:8px}
.privacy-page{max-width:900px;margin:0 auto;padding:32px 18px}.privacy-card{line-height:1.65}.privacy-card h1{margin:6px 0 18px}.privacy-card h3{margin:24px 0 7px}.privacy-card p{color:#8b98a2;font-size:10px}.privacy-legal-note{margin-top:25px;padding-top:18px;border-top:1px solid #2a353e}.privacy-actions{margin-top:22px}

/* V1.8.0 – Finales UI-Fundament / konsistente Darstellung */
:root{--ksb-bg:#070a0e;--ksb-panel:#0f161e;--ksb-panel-2:#0a1218;--ksb-border:#27323f;--ksb-border-soft:#1c2630;--ksb-gold:#d2a447;--ksb-gold-light:#f1cf79;--ksb-text:#edf2f5;--ksb-muted:#82909e;--ksb-radius:0px}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body,button,input,select,textarea{font-family:Arial,Helvetica,sans-serif}
body{background:var(--ksb-bg);color:var(--ksb-text)}
.card,.user-card,.rule-card,.login-card,.note,input,select,textarea,.button,button{border-radius:var(--ksb-radius)}
.card{border-color:var(--ksb-border);background:var(--ksb-panel)}
button,.button,input,select,textarea{font-size:11px;line-height:1.25}
button,.button{min-height:38px;display:inline-flex;align-items:center;justify-content:center}
input,select,textarea{min-height:38px}
a,button,input,select,textarea{-webkit-tap-highlight-color:transparent}
button:focus-visible,.button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--ksb-gold-light);outline-offset:2px}
.privacy-card a:not(.button){color:var(--ksb-gold-light)}
.privacy-card p{font-size:11px;line-height:1.7}
.danger-button{background:#241014!important;border:1px solid #6f2c34!important;color:#ef9aa0!important}
.table-wrap{max-width:100%}
img,svg,canvas{max-width:100%}

@media(max-width:900px){
  .app aside{max-width:calc(100vw - 42px)}
  .app nav a,.mobile-drawer-logout{min-height:44px;display:flex;align-items:center}
  .mobile-menu-button,.mobile-nav-close{min-width:44px;min-height:44px}
  .site-legal{text-align:center;padding-bottom:10px}
}
@media(max-width:640px){
  main{padding-left:10px!important;padding-right:10px!important}
  header{margin-bottom:16px}
  .card{padding:14px}
  .button,button,input,select,textarea{min-height:44px;font-size:12px}
  .button,button{padding:11px 13px}
  .note{font-size:11px;line-height:1.55}
  .table-wrap{margin-left:-4px;margin-right:-4px;width:calc(100% + 8px)}
  th,td{line-height:1.35}
  .audit-filter-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .audit-filter-actions>*{width:100%}
  .canyon-selected-member{min-height:44px;align-items:center}
  .privacy-page{padding:12px 10px 24px}
  .privacy-card{padding:16px}
  .privacy-card h1{font-size:24px}
  .privacy-card p{font-size:12px}
  .user-card>button,.rule-card>button{width:100%}
}
@media(max-width:380px){
  .audit-filter-actions{grid-template-columns:1fr}
  .mobile-top-row{gap:9px}
  header h1{font-size:18px}
}


/* V1.8.1 – Logo, Seitenreihenfolge und kompakte Formulare */
.brand-logo{width:58px;height:58px;object-fit:contain;display:block;flex:0 0 58px;filter:drop-shadow(0 2px 8px rgba(0,0,0,.28))}
.crest{display:none!important}
.dashboard-history-card{margin-bottom:16px}
.member-file-stack{display:flex;flex-direction:column;gap:16px;margin-bottom:16px}
.member-file-stack>.card{width:100%;margin:0}
.member-team-power-card,.member-kill-card{width:100%;margin-bottom:16px}
.absence-form-card form{display:flex;flex-direction:column;gap:14px}
.absence-form-card h2{margin-bottom:18px}
.absence-date-grid>div,.absence-note-block{display:flex;flex-direction:column;gap:7px}
.absence-date-grid label,.absence-note-block label{margin:0;color:#778595;font-size:9px;letter-spacing:.08em}
.absence-date-grid input,.absence-note-block textarea{width:100%}
.absence-note-block textarea{min-height:150px;resize:vertical;line-height:1.55}
.absence-note-hint{align-self:flex-end;margin-top:-2px;color:#62717d;font-size:8px}
.absence-form-card form>button{align-self:flex-start;margin-top:2px}
.user-card-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:max-content}
.user-card-actions button{margin:0;white-space:nowrap}
.user-card-actions .danger-button{order:0}.user-card-actions button:not(.danger-button){order:1}
@media(max-width:1100px){.user-card{grid-template-columns:minmax(130px,1fr) 150px minmax(260px,2fr) auto}.user-card-actions{flex-direction:column;align-items:stretch;min-width:180px}.user-card-actions button{width:100%}}
@media(max-width:900px){.brand-logo{width:48px;height:48px;flex-basis:48px}.user-card{grid-template-columns:1fr}.user-card-actions{display:grid;grid-template-columns:1fr 1fr;min-width:0;width:100%}}
@media(max-width:640px){.brand-logo{width:44px;height:44px;flex-basis:44px}.member-file-stack{gap:12px;margin-bottom:12px}.member-team-power-card,.member-kill-card,.dashboard-history-card{margin-bottom:12px}.absence-form-card,.absence-list-card{padding:16px}.absence-date-grid{grid-template-columns:1fr}.absence-note-block textarea{min-height:170px}.absence-form-card form>button{width:100%}.user-card-actions{grid-template-columns:1fr}.user-card-actions .danger-button{order:1}.user-card-actions button:not(.danger-button){order:0}}

/* V1.8.2 – kompakter Aktiv-Schalter bei Bewertungsregeln */
.rule-active-check{
  width:auto!important;
  justify-self:start;
  padding:2px 5px!important;
  gap:4px!important;
  font-size:7px!important;
  line-height:1.1;
}
.rule-active-check input[type="checkbox"]{
  width:13px!important;
  height:13px!important;
  min-width:13px!important;
  min-height:13px!important;
  margin:0!important;
}
.rule-active-check span{font-size:7px!important}
@media(max-width:650px){
  .rule-active-check{width:max-content!important}
}

/* V1.8.5 – 12h-Doppelprüfung bei Vorfällen */
.incident-duplicate-confirm{max-width:760px}
.incident-duplicate-confirm h2{margin:6px 0 12px}
.incident-duplicate-confirm p{line-height:1.65}
.incident-duplicate-meta{margin:16px 0;padding:12px 14px;border:1px solid #394653;background:#0b1219}
.incident-duplicate-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:18px}
@media(max-width:650px){
  .incident-duplicate-actions{display:grid;grid-template-columns:1fr}
  .incident-duplicate-actions .button,.incident-duplicate-actions button{width:100%;text-align:center}
}

/* V1.8.6 – kompakte, einklappbare Ränge auf der Mitgliederseite */
.member-rank-card{padding-bottom:14px}
.member-rank-groups{display:grid;gap:10px;margin-top:14px}
.member-rank-group{border:1px solid #2c3945;background:#0a1118}
.member-rank-group>summary{
  min-height:44px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:9px 12px;
  cursor:pointer;
  list-style:none;
  user-select:none;
}
.member-rank-group>summary::-webkit-details-marker{display:none}
.member-rank-group>summary:hover{background:rgba(255,255,255,.025)}
.member-rank-group>summary:focus-visible{outline:2px solid #d4aa4a;outline-offset:-2px}
.member-rank-chevron{font-size:20px;line-height:1;transform:rotate(0deg);transition:transform .15s ease;color:#8e9aa5}
.member-rank-group[open] .member-rank-chevron{transform:rotate(90deg)}
.member-rank-count{
  margin-left:auto;
  min-width:28px;
  padding:3px 7px;
  text-align:center;
  border:1px solid #3b4854;
  font-size:9px;
  color:#aab4bd;
}
.member-rank-table-wrap{border-top:1px solid #27333e}
.member-rank-table-wrap table{margin:0}
.member-rank-empty{padding:18px 0;color:#8f9aa4}
@media(max-width:650px){
  .member-rank-card{padding-left:10px;padding-right:10px}
  .member-rank-group>summary{min-height:42px;padding:8px 10px}
  .member-rank-table-wrap{overflow-x:auto}
  .member-rank-table-wrap table{min-width:560px}
}

/* V1.8.7 – Mitgliederliste: feinere Typografie und Rang-Header */
.member-rank-table-wrap th{
  padding-top:12px;
  padding-bottom:12px;
  font-size:9px;
  letter-spacing:.08em;
  color:#8997a3;
}
.member-rank-table-wrap td{vertical-align:middle}
.member-rank-table-wrap td:nth-child(1),
.member-rank-table-wrap td:nth-child(2){
  font-size:11px;
  line-height:1.25;
  font-weight:600;
}
.member-rank-table-wrap .member-name-link{
  font-size:11px;
  font-weight:600;
  line-height:1.25;
}
.member-rank-table-wrap td:nth-child(3)>strong{
  display:inline;
  margin:0;
  font-size:27px;
  line-height:1;
  font-weight:800;
}
.member-rank-group>summary{
  position:relative;
  min-height:50px;
  padding:10px 14px;
  gap:10px;
  border-left:3px solid #485663;
  background:linear-gradient(90deg,rgba(255,255,255,.025),rgba(255,255,255,0));
}
.member-rank-group>summary>strong{
  margin:0;
  font-size:13px;
  line-height:1.15;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.member-rank-group>summary:hover{
  background:linear-gradient(90deg,rgba(212,170,74,.075),rgba(255,255,255,.012));
}
.member-rank-lead>summary{border-left-color:#d4aa4a}
.member-rank-r3>summary{border-left-color:#53cf8a}
.member-rank-r2>summary{border-left-color:#e6b64c}
.member-rank-r1>summary{border-left-color:#e36b72}
.member-rank-chevron{
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border:1px solid #3b4854;
  font-size:17px;
  background:#0c141b;
}
.member-rank-count{
  min-width:30px;
  padding:4px 8px;
  background:#0c141b;
  font-size:9px;
  font-weight:700;
}
@media(max-width:650px){
  .member-rank-group>summary{min-height:46px;padding:9px 10px}
  .member-rank-group>summary>strong{font-size:12px}
  .member-rank-table-wrap td:nth-child(3)>strong{font-size:24px}
}

/* V1.8.8 – eigene Vorfälle 10 Minuten editier-/löschbar */
.incident-actions a,
.incident-actions button{transition:filter .15s ease,transform .15s ease}
.incident-actions a:hover,
.incident-actions button:hover{filter:brightness(1.12);transform:translateY(-1px)}

/* V1.8.9 – sichtbare 10-Minuten-Sonderfreigabe */
.incident-own-window{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:3px 7px;
  border:1px solid #566574;
  background:#0b141c;
  font-size:8px;
  font-weight:800;
  letter-spacing:.08em;
  white-space:nowrap;
}

/* V1.9.0 – Event-Nachmeldung */
.event-head-actions,.event-quick-actions,.canyon-balance-head-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px}
.event-quick-actions{margin:0 0 14px}.canyon-balance-head-actions{flex-direction:column;align-items:flex-end}
.late-register-card{max-width:760px}.late-register-card>p{line-height:1.65}.late-register-form{display:grid;gap:16px;margin-top:20px}
.late-register-form label{display:grid;gap:7px}.late-register-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-top:4px}
@media(max-width:650px){.event-head-actions,.event-quick-actions,.canyon-balance-head-actions,.late-register-actions{display:grid;grid-template-columns:1fr;width:100%}.event-head-actions .button,.event-quick-actions .button,.canyon-balance-head-actions .button,.late-register-actions .button,.late-register-actions button{width:100%;text-align:center}.canyon-balance-head-actions{align-items:stretch}}


/* V1.9.1 – Vorfallshistorie auf Smartphones bedienbar */
.incident-history-scroll{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  touch-action:pan-x pan-y;
}
.incident-history-table{
  width:100%;
}
.incident-history-table td.incident-actions{
  display:table-cell!important;
  white-space:nowrap!important;
}
.incident-history-table td.incident-actions>div{
  display:flex!important;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  min-width:max-content;
}

@media(max-width:650px){
  /*
   * Die Tabelle bleibt eine echte Tabelle. Das alte globale
   * table{display:block} wird hier gezielt aufgehoben und der
   * äußere Container übernimmt das horizontale Scrollen.
   */
  .incident-history-scroll{
    margin-inline:0;
    padding-bottom:7px;
    scrollbar-width:thin;
  }
  .incident-history-table{
    display:table!important;
    overflow:visible!important;
    white-space:normal!important;
    width:max-content;
    min-width:720px;
    border-collapse:separate;
    border-spacing:0;
  }
  .incident-history-table th,
  .incident-history-table td{
    white-space:normal;
  }
  .incident-history-table th:nth-child(1),
  .incident-history-table td:nth-child(1){
    min-width:132px;
  }
  .incident-history-table th:nth-child(2),
  .incident-history-table td:nth-child(2){
    min-width:180px;
  }
  .incident-history-table th:nth-child(3),
  .incident-history-table td:nth-child(3){
    min-width:92px;
    white-space:nowrap;
  }
  .incident-history-table th:nth-child(4),
  .incident-history-table td:nth-child(4){
    min-width:180px;
  }

  /*
   * Aktionen bleiben am rechten Bildschirmrand sichtbar.
   * Damit muss man zum Bearbeiten/Löschen nicht erst bis ganz
   * ans Tabellenende wischen.
   */
  .incident-history-table .incident-action-head,
  .incident-history-table td.incident-actions{
    position:sticky;
    right:0;
    z-index:3;
    min-width:104px;
    background:#0d151d;
    box-shadow:-10px 0 14px rgba(0,0,0,.28);
  }
  .incident-history-table .incident-action-head{
    z-index:4;
    background:#111b25;
  }
  .incident-history-table td.incident-actions>div{
    justify-content:center;
  }
  .incident-history-table tr.incident-expired td.incident-actions{
    background:#11161b;
  }
}


/* V1.9.2 – Startseite: Servertransfer 1636 / KSB Login */
.login.login-split{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(420px,.82fr);
  background:#080d12;
}
.login-split .transfer-hero{
  position:relative;
  min-height:100vh;
  padding:clamp(42px,7vw,110px);
  display:flex;
  align-items:center;
  border-right:1px solid #27323f;
  overflow:hidden;
}
.login-split .transfer-hero::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(135deg,rgba(212,170,74,.07),transparent 42%),
    repeating-linear-gradient(90deg,rgba(255,255,255,.018) 0 1px,transparent 1px 48px),
    repeating-linear-gradient(0deg,rgba(255,255,255,.012) 0 1px,transparent 1px 48px);
}
.transfer-panel{position:relative;z-index:1;max-width:720px}
.transfer-kicker{
  margin-top:20px;
  font-size:clamp(18px,2.1vw,30px);
  font-weight:800;
  letter-spacing:.16em;
  color:#d7e1e8;
}
.login-split .transfer-hero h1{
  margin:4px 0 12px;
  font-size:clamp(92px,16vw,220px);
  line-height:.8;
  letter-spacing:-.055em;
}
.transfer-status{
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin-top:22px;
  padding:8px 11px;
  border:1px solid #43505b;
  background:#0d151d;
  font-size:10px;
  font-weight:800;
  letter-spacing:.15em;
}
.transfer-status-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#d4aa4a;
  box-shadow:0 0 14px rgba(212,170,74,.52);
}
.transfer-panel>p{
  max-width:560px;
  margin-top:22px;
  color:#8f9ba5;
  line-height:1.7;
}
.login-side{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:34px;
  background:linear-gradient(180deg,#0b1118,#080d12);
}
.login-split .login-card{
  align-self:auto;
  justify-self:auto;
  width:min(430px,100%);
}
@media(max-width:820px){
  .login.login-split{grid-template-columns:1fr}
  .login-split .transfer-hero{
    display:flex;
    min-height:auto;
    padding:36px 24px 32px;
    border-right:0;
    border-bottom:1px solid #27323f;
  }
  .login-split .transfer-hero h1{font-size:clamp(76px,25vw,130px)}
  .transfer-kicker{font-size:16px}
  .transfer-panel>p{margin-bottom:0}
  .login-side{min-height:auto;padding:28px 18px 44px}
  .login-split .login-card{width:100%;max-width:430px}
}

/* V1.9.3 – Datenschutz-Hinweis Login */
.login-data-note{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid #27323f;
  color:#7f8d98;
  font-size:9px;
  line-height:1.55;
  letter-spacing:.025em;
}


/* V1.9.4 – Login / Servertransfer */
.login.login-split{
  min-height:100svh;
  grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr);
  overflow:hidden;
}
.transfer-hero{
  position:relative;
  min-height:100svh;
  padding:clamp(42px,7vw,92px);
  display:flex;
  align-items:center;
  justify-content:center;
}
.transfer-hero::before,
.transfer-hero::after{
  content:"";
  position:absolute;
  pointer-events:none;
}
.transfer-hero::before{
  inset:9%;
  border:1px solid rgba(255,255,255,.06);
  clip-path:polygon(0 0,100% 0,100% 74%,74% 100%,0 100%);
}
.transfer-hero::after{
  width:min(40vw,520px);
  aspect-ratio:1;
  border:1px solid rgba(212,170,74,.14);
  transform:rotate(45deg);
  opacity:.55;
}
.transfer-panel{
  position:relative;
  z-index:1;
  width:min(620px,100%);
}
.transfer-kicker{
  margin-top:14px;
  font-size:clamp(16px,1.5vw,23px);
  letter-spacing:.22em;
  font-weight:800;
}
.transfer-panel h1{
  margin:8px 0 18px;
  font-size:clamp(92px,12vw,188px);
  line-height:.78;
  letter-spacing:-.055em;
}
.transfer-status{
  display:inline-flex;
  align-items:center;
  gap:12px;
  padding:12px 16px;
  border:1px solid #465462;
  background:rgba(8,14,20,.72);
  font-size:clamp(18px,1.9vw,28px);
  font-weight:900;
  letter-spacing:.16em;
}
.transfer-status-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#d4aa4a;
  box-shadow:0 0 0 5px rgba(212,170,74,.1);
}

.login-side{
  min-height:100svh;
  display:grid;
  place-items:center;
  padding:clamp(28px,5vw,68px);
  position:relative;
}
.login-side::before{
  content:"";
  position:absolute;
  inset:22px;
  border:1px solid rgba(255,255,255,.045);
  pointer-events:none;
}
.login-side .login-card{
  position:relative;
  z-index:1;
  width:min(470px,100%);
  padding:38px;
  border:1px solid #33414f;
  background:
    linear-gradient(180deg,rgba(255,255,255,.025),rgba(255,255,255,0)),
    #0c131b;
  box-shadow:0 24px 70px rgba(0,0,0,.28);
}
.login-side .login-card::before{
  content:"";
  position:absolute;
  top:-1px;
  left:28px;
  right:28px;
  height:2px;
  background:linear-gradient(90deg,transparent,#d4aa4a,transparent);
}
.login-side .login-card h2{
  margin:7px 0 24px;
  font-size:clamp(28px,3vw,42px);
  letter-spacing:-.03em;
}
.login-side .login-card label{
  margin-top:13px;
}
.login-side .login-card input{
  min-height:48px;
}
.login-side .login-card button{
  min-height:48px;
}
.login-privacy-link{
  margin-top:10px;
  font-size:9px;
}

/* Smartphone: Login ohne Scrollen im normalen Zustand */
@media(max-width:900px){
  .login.login-split{
    min-height:100svh;
    grid-template-columns:1fr;
    grid-template-rows:auto 1fr;
    overflow:auto;
  }
  .transfer-hero{
    display:flex;
    min-height:0;
    height:auto;
    padding:18px 18px 12px;
    border-right:0;
  }
  .transfer-hero::before,
  .transfer-hero::after{
    display:none;
  }
  .transfer-panel{
    width:100%;
    text-align:center;
  }
  .transfer-panel .eyebrow,
  .transfer-kicker,
  .transfer-panel h1{
    display:none;
  }
  .transfer-status{
    padding:8px 12px;
    gap:8px;
    font-size:13px;
    letter-spacing:.12em;
  }
  .transfer-status::before{
    content:"SERVERTRANSFER 1636";
    margin-right:4px;
    color:#dce5ec;
  }
  .transfer-status-dot{
    width:7px;
    height:7px;
  }
  .login-side{
    min-height:0;
    padding:8px 16px 16px;
    place-items:start center;
  }
  .login-side::before{
    display:none;
  }
  .login-side .login-card{
    width:100%;
    max-width:430px;
    padding:20px;
    align-self:start;
  }
  .login-side .login-card h2{
    margin:4px 0 14px;
    font-size:27px;
  }
  .login-side .login-card label{
    margin-top:8px;
  }
  .login-side .login-card input{
    min-height:42px;
  }
  .login-side .login-card button{
    min-height:43px;
    margin-top:12px;
  }
  .login-data-note{
    margin-top:10px;
    padding-top:9px;
    line-height:1.4;
  }
}

@media(max-width:420px) and (max-height:760px){
  .transfer-hero{
    padding:10px 12px 6px;
  }
  .transfer-status{
    font-size:11px;
    padding:6px 9px;
  }
  .login-side{
    padding:4px 12px 10px;
  }
  .login-side .login-card{
    padding:16px;
  }
  .login-side .login-card .eyebrow{
    font-size:8px;
  }
  .login-side .login-card h2{
    font-size:24px;
    margin-bottom:10px;
  }
  .login-side .login-card input{
    min-height:39px;
  }
  .login-side .login-card button{
    min-height:40px;
    margin-top:9px;
  }
  .login-data-note{
    font-size:8px;
    margin-top:8px;
    padding-top:7px;
  }
  .login-privacy-link{
    margin-top:7px;
    font-size:8px;
  }
}


/* V1.9.7 – einheitliche Datenschutz-Typografie */
.privacy-card .privacy-emphasis{
  color:inherit;
  font:inherit;
  font-weight:700;
  letter-spacing:0;
  background:none;
  border:0;
  padding:0;
}
.privacy-card .privacy-note{
  margin-top:16px;
  padding:14px 16px;
  border-left:2px solid #526271;
  background:rgba(255,255,255,.018);
}
.privacy-card .privacy-note-label{
  display:block;
  margin-bottom:5px;
  color:#9eabb5;
  font-size:9px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
}
