:root {
  --bg: #11141B;
  --panel: #171B24;
  --panel-2: #1E2330;
  --panel-3: #252B3A;
  --line: #2A3140;
  --text: #E9ECF3;
  --muted: #8A93A7;

  --teal: #1FC9C2;            /* große Akzente (primär) */
  --teal-soft: rgba(31,201,194,.15);
  --pink: #D92274;           /* kleine Akzente (sekundär) */
  --pink-soft: rgba(217,34,116,.16);
  --pink-text: #FF8FBE;
  --gold: #E6B34D;
  --silver: #C7CEDA;
  --bronze: #D8915A;

  --radius: 14px;
  --radius-lg: 16px;

  --head: 'Roboto Condensed', system-ui, sans-serif;
  --body: 'Roboto', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Überschriften / Condensed-Elemente */
h1, h2, h3 {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}
h1 { font-size: 1.7rem; font-weight: 700; margin-bottom: 4px; }
h2 { font-size: 1.2rem; font-weight: 600; margin: 26px 0 12px; }
h3 { font-size: 1rem; font-weight: 600; }
.sub { color: var(--muted); margin: 0 0 20px; }

/* ============ Floating App-Bar ============ */
.appbar {
  position: sticky;
  top: 14px;
  z-index: 50;
  margin: 14px auto 0;
  width: calc(100% - 28px);
}
.appbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: rgba(20, 24, 33, .72);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .38);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand i { color: var(--teal); font-size: 1.05rem; }
.brand-logo { height: 26px; width: auto; display: block; }

.mainnav { display: flex; gap: 4px; margin-left: 4px; flex: 1; }
.navlink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 11px;
  color: var(--muted);
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  font-size: .92rem;
  transition: background .15s, color .15s;
}
.navlink:hover { color: var(--text); background: rgba(255, 255, 255, .05); text-decoration: none; }
.navlink.active { color: var(--teal); background: var(--teal-soft); }
.navlink.admin.active { color: var(--pink); background: var(--pink-soft); }
.navlink i { font-size: .95rem; }

.userbox { display: flex; align-items: center; gap: 10px; }
.who {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  font-size: .9rem;
}
.logout {
  display: flex;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: 10px;
  color: var(--muted);
}
.logout:hover { color: var(--pink); background: var(--pink-soft); text-decoration: none; }

@media (max-width: 640px) {
  .appbar { top: 0; margin: 0; width: 100%; }
  .appbar-inner {
    border-radius: 0;
    border-left: 0; border-right: 0; border-top: 0;
    padding: 10px 14px;
  }
  .nav-label, .brand-text, .who { display: none; }
  .brand-logo { height: 20px; }
  .mainnav { justify-content: flex-end; gap: 2px; }
  .navlink { padding: 9px 10px; }
  .container { padding-left: 11px; padding-right: 11px; }
  .card, .match, .feature { padding-left: 14px; padding-right: 14px; }
}

/* ============ Layout ============ */
.container { max-width: none; margin: 0 auto; padding: 24px 28px 80px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
}

/* ============ Dashboard ============ */
/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  font-size: .72rem;
  padding: 5px 12px;
  border-radius: 20px;
}
.pill.green { color: var(--teal); background: var(--teal-soft); border: 1px solid var(--teal); }
.pill.pink  { color: var(--pink-text); background: var(--pink-soft); border: 1px solid var(--pink); }

/* Featured – nächstes Spiel */
.feature { text-align: center; padding: 28px 18px; }
.feat-pill { margin-bottom: 16px; }
.feat-when {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal);
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 18px;
}
.feature-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
}
.feature-teams .team {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: clamp(1.15rem, 4.5vw, 1.55rem);
}
.feature-teams .team.home { justify-content: flex-end; text-align: right; }
.feature-teams .team.away { justify-content: flex-start; text-align: left; }
.feature-teams .iflag { font-size: 1.3rem; }
.feature-teams .dash {
  justify-self: center;
  color: var(--muted);
  font-weight: 700;
  font-size: clamp(1.3rem, 5vw, 1.7rem);
}
.feat-cta { margin-top: 24px; }
.feat-cta .btn { display: inline-flex; align-items: center; gap: 9px; }

/* Nächste Spiele – Liste */
.next-list { display: flex; flex-direction: column; }
.next-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.next-row:last-child { border-bottom: none; }
.next-when {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  font-size: .78rem;
  margin-bottom: 3px;
}
.next-teams { font-weight: 600; }
.next-teams .iflag { font-size: .85rem; }
.next-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.next-link {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  font-size: .8rem;
  white-space: nowrap;
}

@media (max-width: 460px) {
  .next-row { flex-direction: column; align-items: flex-start; gap: 9px; }
  .next-actions { align-self: stretch; justify-content: flex-end; }
}

/* Tagestrenner */
.dayhead {
  font-family: var(--head);
  color: var(--teal);
  font-weight: 700;
  font-size: .92rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 24px 0 10px;
  padding-left: 2px;
}

/* ============ Match-Karten ============ */
.match {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  scroll-margin-top: 90px;
}
.meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: 10px;
}
.meta .grp {
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal);
  font-weight: 600;
}
.meta-center {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 12px;
}
.locked-badge { color: var(--pink); font-weight: 600; }

/* generisches Teams-Grid (Spiele/Admin) */
.teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}
.teams .team { font-weight: 700; }
.teams .team.home { text-align: right; }
.teams .team.away { text-align: left; }
.teams .vs { color: var(--muted); font-size: .85rem; }
.result-final {
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--pink);
  text-align: center;
}

/* ============ Tipp-Eingabe (Meine Tipps) ============ */
.tiprow {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.mb-match { width: 100%; max-width: 440px; }
.mb-minute { width: 100%; max-width: 200px; }
.mb-minute .mb-head { min-height: 0; }

.mb-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.teams-line, .score-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.teams-line .team {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
}
.teams-line .team.home { justify-content: flex-end; text-align: right; }
.teams-line .team.away { justify-content: flex-start; text-align: left; }
.teams-line .dash { color: var(--muted); font-weight: 700; justify-self: center; }

/* flache SVG-Flaggen (flag-icons) */
.iflag {
  font-size: 0.78rem;                /* steuert die Größe (em-basiert) */
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
  vertical-align: -1px;
}
.teams-line .iflag { font-size: 0.95rem; }
.score-line .colon { justify-self: center; font-size: 1.5rem; font-weight: 700; color: var(--muted); }
.score-line .ro-score { grid-column: 1 / -1; }

input.goal, input.min {
  width: 100%;
  height: 58px;
  text-align: center;
  font-family: var(--head);
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  -moz-appearance: textfield;
  transition: border-color .15s, box-shadow .15s;
}
input.goal::-webkit-outer-spin-button,
input.goal::-webkit-inner-spin-button,
input.min::-webkit-outer-spin-button,
input.min::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.goal:focus, input.min:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.minute-label {
  font-family: var(--head);
  color: var(--muted);
  font-weight: 600;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  line-height: 1.25;
}

.ro-score, .ro-min {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 58px;
}
.ro-pill {
  min-width: 46px; height: 50px;
  display: inline-flex;
  align-items: center; justify-content: center;
  padding: 0 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.4rem;
}
.match-note { text-align: center; margin-top: 10px; }

/* Desktop: Mittelachse (Doppelpunkt) exakt zentriert, Minute floatet rechts */
@media (min-width: 860px) {
  .tiprow { display: block; }
  .mb-match { max-width: none; width: 100%; }
  .score-line > input.goal { max-width: 200px; width: 100%; }
  .score-line > input.goal:first-of-type { justify-self: end; }
  .score-line > input.goal:last-of-type { justify-self: start; }
  .mb-minute {
    position: absolute;
    top: 0;
    right: 0;
    width: 160px;
    max-width: 160px;
  }
  .mb-minute .mb-head { min-height: 46px; margin-bottom: 10px; }
}

/* ============ Buttons / Formulare ============ */
button, .btn {
  background: var(--teal);
  color: #06201F;
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: filter .15s;
}
button:hover, .btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn-sticky {
  position: sticky;
  bottom: 14px;
  width: 100%;
  margin-top: 16px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .4);
}

input[type=text], input[type=password], input[type=datetime-local] {
  width: 100%;
  padding: 12px 13px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 11px;
  font-family: var(--body);
  font-size: 1rem;
}
input[type=text]:focus, input[type=password]:focus, input[type=datetime-local]:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft);
}
label {
  display: block;
  margin: 12px 0 5px;
  color: var(--muted);
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  font-size: .82rem;
}

.flash {
  border-radius: 11px;
  padding: 12px 15px;
  margin-bottom: 16px;
  font-weight: 500;
}
.flash.ok { background: var(--teal-soft); border: 1px solid var(--teal); color: var(--teal); }
.flash.err { background: var(--pink-soft); border: 1px solid var(--pink); color: var(--pink-text); }

/* ============ Tabelle ============ */
table.standings { width: 100%; border-collapse: collapse; }
table.standings th, table.standings td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
table.standings th {
  font-family: var(--head);
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
table.standings td.name { text-align: left; font-weight: 700; }
table.standings td.total {
  font-family: var(--head);
  font-weight: 700;
  color: var(--teal);
  font-size: 1.1rem;
}
table.standings tr.me { background: var(--teal-soft); }
.rank { font-family: var(--head); font-weight: 700; color: var(--muted); }
.rank.r1 { color: var(--gold); }
.rank.r2 { color: var(--silver); }
.rank.r3 { color: var(--bronze); }

.pts {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 10px;
  font-family: var(--head);
  font-weight: 700;
  font-size: .82rem;
}
.pts.good { color: var(--teal); border-color: var(--teal); }
.pts.zero { color: var(--muted); }

/* ============ Admin-Reiter & Endrunde ============ */
.tabs {
  display: flex;
  gap: 6px;
  margin: 6px 0 20px;
  border-bottom: 1px solid var(--line);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--muted);
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  font-size: .9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--teal); border-bottom-color: var(--teal); }

.ko-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.ko-edit input[type=text] { width: auto; flex: 1 1 140px; min-width: 120px; }
.ko-edit input[type=datetime-local] { width: auto; }

/* Punkte-Schema-Editor */
.points-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.points-grid label { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.points-grid input[type=number] {
  width: 90px;
  padding: 9px;
  text-align: center;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.05rem;
}
.points-grid input[type=number]:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }

/* K.-o.-Platzhalter (Teams noch offen) */
.teams-line .ko-title { grid-column: 1 / -1; text-align: center; font-weight: 700; font-size: 1.05rem; }
.teams .ko-span,
.feature-teams .ko-span { grid-column: 1 / -1; text-align: center; font-weight: 700; }

/* ============ Login ============ */
.login-wrap { max-width: 380px; margin: 12vh auto; text-align: center; }
.login-logo { display: block; width: min(240px, 72%); height: auto; margin: 0 auto 12px; }
.login-wrap label { text-align: center; }
.login-wrap .field { position: relative; }
.login-wrap .field input { text-align: center; padding-left: 42px; padding-right: 42px; }
.login-wrap .fld-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1rem;
  pointer-events: none;
}
.login-wrap .field input::placeholder { color: rgba(255, 255, 255, 0.2); }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.foot {
  text-align: center;
  color: var(--muted);
  padding: 26px;
  font-size: .8rem;
  font-family: var(--head);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============ Admin ============ */
.adminrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.scoreinputs { display: flex; gap: 6px; align-items: center; }
.scoreinputs input {
  width: 52px; text-align: center; padding: 9px 4px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  font-family: var(--head); font-weight: 700; font-size: 1.05rem;
}
.scoreinputs input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.scoreinputs .colon { color: var(--muted); font-weight: 700; }
.scoreinputs .minute { font-family: var(--head); text-transform: uppercase; letter-spacing: 1px; font-size: .78rem; color: var(--muted); }
