/* UnoClub Verwaltung – ergänzt css/fresh.css */
body.adm { background: var(--paper); }
.adm__bar { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.adm__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; flex-wrap: wrap; }
.adm__bar .nav__brand small { color: #a7a1b3; }
.adm__bar .nav__brand img { background: #fff; border-radius: 10px; padding: 3px; }
.adm__nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.adm__nav a, .adm__nav button { color: #fff; text-decoration: none; font: 600 .92rem/1 var(--body); padding: 10px 14px; border-radius: 99px; background: none; border: 0; cursor: pointer; }
.adm__nav a:hover, .adm__nav button:hover { background: rgba(255,255,255,.1); }
.adm__nav form { margin: 0; }
.adm__nav button { border: 2px solid rgba(255,255,255,.25); }
.adm__main { padding: 40px 0 90px; }

.adm h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
.adm h2 { font-size: 1.3rem; margin-bottom: 16px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.back { display: inline-block; font-weight: 700; text-decoration: none; margin-bottom: 10px; }
.back::before { content: "← "; }

.box { background: var(--white); border: 2px solid var(--ink); border-radius: 22px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--pop); margin-bottom: 26px; }
.box.narrow { max-width: 620px; }
.box.empty { text-align: center; padding: 50px 30px; }
.box.empty p { max-width: 560px; margin: 10px auto 24px; color: var(--muted); }
.small { font-size: .85rem; margin: 14px 0 0; }
code { background: var(--cream); padding: 2px 6px; border-radius: 6px; }

.btn--sm { padding: 10px 18px; font-size: .9rem; box-shadow: 3px 3px 0 var(--ink); }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.row.sticky { position: sticky; bottom: 0; padding: 16px 0; background: linear-gradient(transparent, var(--paper) 30%); }

.alert { padding: 14px 18px; border-radius: 14px; font-weight: 600; border: 2px solid var(--ink); margin: 0 0 18px; }
.alert--ok { background: #d9f7e8; }
.alert--info { background: #e3ecff; }
.alert--err { background: #ffe1e3; }

/* Formulare */
.stack { display: grid; gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-bottom: 16px; }
.adm label { display: flex; flex-direction: column; gap: 7px; font-weight: 700; font-size: .92rem; }
.adm label small { font-weight: 500; color: var(--muted); }
.adm input[type=text], .adm input[type=email], .adm input[type=password], .adm input[type=date], .adm input[type=time], .adm input[type=search], .adm select, .adm textarea {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--paper);
  border: 2px solid transparent; border-radius: 12px; padding: 12px 14px; width: 100%;
}
.adm input:focus, .adm select:focus, .adm textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 3px 3px 0 var(--yellow); }
.adm input[type=file] { font: inherit; font-weight: 400; }
.adm label.check { flex-direction: row; align-items: center; gap: 10px; align-self: end; padding-bottom: 12px; }
.adm label.check input { width: 20px; height: 20px; accent-color: var(--red); }
.adm hr { border: 0; border-top: 2px dashed var(--line); margin: 6px 0; width: 100%; }
textarea { resize: vertical; }

/* Login */
.auth { min-height: 70vh; display: grid; place-items: center; }
.auth__card { width: min(480px, 100%); background: #fff; border: 2px solid var(--ink); border-radius: 26px; padding: clamp(26px, 5vw, 40px); box-shadow: 10px 10px 0 var(--ink); }
.auth__card h1 { margin-bottom: 14px; }
.auth__card .muted { margin-bottom: 20px; }

/* Liste */
.filters { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { text-decoration: none; font-weight: 600; font-size: .9rem; padding: 8px 14px; border-radius: 99px; border: 2px solid var(--ink); background: #fff; }
.chip b { margin-left: 4px; color: var(--muted); }
.chip.is-on { background: var(--ink); color: #fff; }
.chip.is-on b { color: var(--yellow); }
.search { display: flex; gap: 8px; }
.search input { min-width: 220px; background: #fff !important; border-color: var(--ink) !important; }

.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 56px 1fr auto 24px; gap: 16px; align-items: center; text-decoration: none; background: #fff; border: 2px solid var(--ink); border-radius: 18px; padding: 10px 16px 10px 10px; transition: transform .15s, box-shadow .15s; }
.item:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.item__pic { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; font: 800 1.5rem/1 var(--display); color: #fff; background: var(--red); }
.item__pic img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.item__main { display: flex; flex-direction: column; min-width: 0; }
.item__main strong { font: 750 1.15rem/1.2 var(--display); }
.item__main em { font-style: normal; color: var(--red); font-size: .95rem; }
.item__main .muted { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.item__go { font-weight: 800; font-size: 1.2rem; }
.tag { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 99px; background: var(--cream); white-space: nowrap; }
.tag--yellow { background: var(--yellow); }
.s-aktiv { background: var(--green); color: #fff; }
.s-gastspieler { background: var(--blue); color: #fff; }
.s-zahlender-inaktiver { background: #8b5cf6; color: #fff; }
.s-inaktiver { background: #9c97a6; color: #fff; }

/* Foto */
.foto { display: grid; grid-template-columns: 160px 1fr; gap: 24px; align-items: start; }
.foto__prev { width: 160px; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--cream); border: 2px solid var(--ink); display: grid; place-items: center; }
.foto__prev img { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.foto__prev span { font: 800 4rem/1 var(--display); color: var(--muted); }

@media (max-width: 700px) {
  .grid2, .foto { grid-template-columns: 1fr; }
  .item { grid-template-columns: 48px 1fr 18px; }
  .item__tags { grid-column: 2 / 3; justify-content: flex-start; }
  .item__go { grid-row: 1; grid-column: 3; }
  .item__pic { width: 48px; height: 48px; }
  .search input { min-width: 0; }
}

/* Spiele & Ergebnisse */
.games-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.tablewrap { overflow-x: auto; }
table.results, table.standings { width: 100%; border-collapse: collapse; }
.results th, .results td, .standings th, .standings td { padding: 8px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.results thead th, .standings thead th { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); }
.results tbody th { font-weight: 700; white-space: nowrap; }
.results select { min-width: 150px; padding: 9px 10px !important; }
.results input[type=number] { width: 110px; font: inherit; padding: 9px 10px; border-radius: 10px; border: 2px solid transparent; background: var(--paper); }
.results input.in-platz { width: 70px; }
.results input[type=number]:focus { outline: none; border-color: var(--ink); background: #fff; }
.results tr.is-da th::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--green); margin-right: 8px; }
.results tr.is-fehlt th::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--red); margin-right: 8px; }
.results tr.is-fehlt input[type=number] { opacity: .45; }
.results td.tot { font: 800 1.05rem/1 var(--display); white-space: nowrap; }
.more { margin-top: 14px; }
.more summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.standings td:last-child { text-align: right; }
.standings thead th:last-child { text-align: right; }
.standings tr.lead th::after { content: " 🏆"; }
.standings tr.lead { background: #fff7dc; }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.podium__p { border: 2px solid var(--ink); border-radius: 18px; padding: 16px 18px; background: #fff; display: flex; flex-direction: column; gap: 4px; box-shadow: 4px 4px 0 var(--ink); }
.podium__p.p1 { background: var(--yellow); }
.podium__p.p2 { background: #e8e6ee; }
.podium__p.p3 { background: #f6d2b0; }
.podium__rank { font: 800 1.8rem/1 var(--display); }
.podium__p strong { font: 750 1.1rem/1.2 var(--display); }
.podium__p span:last-child { font-size: .9rem; }

.item--game { grid-template-columns: 64px 1fr auto 24px; }
.item__date { width: 64px; height: 56px; border-radius: 14px; background: var(--blue); color: #fff; display: grid; place-content: center; text-align: center; font-size: .72rem; line-height: 1.2; }
.item__date b { font: 800 1.05rem/1.1 var(--display); display: block; }

@media (max-width: 980px) { .games-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .podium { grid-template-columns: 1fr; }
  .item--game { grid-template-columns: 56px 1fr 18px; }
  .item__date { width: 56px; }
}

/* Tipp-Stand */
.tipbars { display: grid; gap: 8px; }
.tipbar { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--paper); overflow: hidden; isolation: isolate; font-weight: 700; }
.tipbar i { position: absolute; inset: 0 auto 0 0; background: var(--yellow); z-index: -1; }
.tipbar b { white-space: nowrap; }

/* Automatik-Optionen Ergebnisse */
.autos { display: grid; gap: 10px; margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--paper); }
.adm .autos label.check { align-self: start; padding: 0; }
.editor:has(input[name="auto_sonder"]:checked) .results input[name$="[sonder]"] { opacity: .45; background: transparent; }
