/* ======================================
   JAHRESWERTUNG – Layout analog statistik.css
====================================== */
.jahreswertung-area {
  display: grid;
  grid-template-columns: calc(100% - 654px) 640px;
  gap: 14px;
  align-items: start;
}
.jahreswertung-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.jahreswertung-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}

/* ── Kopfbereich ── */
.jahreswertung-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.00));
}
.jahreswertung-head h2 {
  margin: 0 0 6px;
  font-size: 2rem;
  color: #e6eaee;
  font-weight: 700;
}
.jahreswertung-head p {
  margin: 0;
  font-size: 1.05rem;
  color: #aeb7bf;
}

/* ── Statusmeldungen ── */
.meldung {
  margin: 14px 22px 0;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
}
.meldung-ok {
  background: rgba(100,200,80,0.12);
  color: #8acc50;
  border: 1px solid rgba(100,200,80,0.3);
}
.meldung-fehler {
  background: rgba(220,80,60,0.12);
  color: #e07060;
  border: 1px solid rgba(220,80,60,0.3);
}

/* ── Haupttabelle ── */
.jw-tabelle-wrap {
  overflow-x: auto;
  padding: 18px 22px;
}
.jw-tabelle {
  border-collapse: collapse;
  font-size: 1.05rem;
  white-space: nowrap;
  width: 100%;
}

/* Kopfzeile */
.jw-tabelle th {
  text-align: center;
  padding: 3px 4px;
  color: #f0be29;
  font-weight: 600;
  font-size: 0.72rem;
  border-bottom: 2px solid rgba(240,190,41,0.3);
  white-space: nowrap;
}
.jw-tabelle th.jw-th-name  { text-align: left; min-width: 90px; }
.jw-th-tag   { width: 30px; font-size: 0.65rem; line-height: 1.2; }
.jw-th-platz { width: 26px; }
.jw-th-sum   { width: 50px; }
.jw-th-ges   { width: 58px; }

/* Turnier-Spalten */
.turnier-kopf  { color: #d4a800 !important; }
.turnier-stern { font-size: 0.65rem; }

/* Zeilen */
.jw-tabelle tbody tr:hover td { background: rgba(255,255,255,0.04); }
.jw-tabelle .row-first td     { background: rgba(240,190,41,0.06); }
.jw-tabelle .row-first .jw-td-name { color: #f0be29; font-weight: 700; }
.jw-tabelle .row-top3 td      { background: rgba(255,255,255,0.02); }

/* Zellen */
.jw-tabelle td {
  text-align: center;
  padding: 2px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #d0d8e0;
  font-size: 1.15rem;
}
.jw-td-platz { font-size: 1.2rem; }

/* FIX: Stärkerer Selektor damit text-align: left nicht von .jw-tabelle td überschrieben wird */
.jw-tabelle td.jw-td-name  {
  text-align: left;
  font-weight: 500;
  color: #e6eaee;
  white-space: nowrap;
  font-size: 1.2rem;
  padding-left: 8px;
}

.jw-td-sum {
  border-left: 1px solid rgba(255,255,255,0.08);
  color: #c0cad4;
  font-size: 1.1rem;
}
.jw-td-ges {
  border-left: 2px solid rgba(240,190,41,0.25);
  font-weight: 500;
  color: #e6eaee;
  font-size: 1.2rem;
}

/* Spieltag eingetragen aber Spieler nicht dabei */
.jw-td-tag.eingetragen { background: rgba(255,255,255,0.01); }
.jw-td-tag.leer        { background: transparent; }
.turnier-zelle         { background: rgba(200,160,0,0.04); }

/* Punktfarben */
.pos       { color: #8acc50; }
.neg       { color: #e07060; }
.absent    { opacity: 0.22; }
.teilnahme { color: #60a8d0; }

/* Platzierungen 1–3 */
.platz-top {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}
.row-first .platz-top { background: rgba(240,190,41,0.25); color: #f0be29; }
.row-top3  .platz-top { background: rgba(180,180,180,0.15); color: #c0c8d0; }

/* ── Formular-Bereiche ── */
.jw-form-bereich,
.jw-bearbeiten-bereich,
.jw-spieler-bereich {
  margin: 0 22px 14px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  background: rgba(255,255,255,0.02);
}
.jw-spieler-bereich { margin-bottom: 22px; }

.jw-form-bereich h3,
.jw-bearbeiten-bereich h3,
.jw-spieler-bereich h3 {
  margin: 0 0 12px;
  font-size: 1.0rem;
  font-weight: 500;
  color: #e6eaee;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 8px;
}

/* Spieltag-Auswahl */
.jw-form-kopf { margin-bottom: 14px; }
.jw-form-zeile {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 360px;
}
.jw-form-zeile label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a9bb0;
}

.jw-form-zeile select,
.jw-foto-input {
  color-scheme: dark;
}
.jw-form-zeile select {
  border-radius: 3px;
  padding: 7px 10px;
  font-size: 0.95rem;
  border: 1px solid rgba(255,255,255,0.15);
  background: #1e2030;   /* ← ändern: von rgba auf festes Dunkelblau */
  color: #e6eaee;
  width: 100%;
  color-scheme: dark;    /* ← neu */
}

/* ── Eingabetabelle ── */
.jw-eingabe-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.0rem;
  margin-bottom: 14px;
  background: transparent;
}
.jw-eingabe-tabelle thead tr {
  background: rgba(255,255,255,0.03);
}
.jw-eingabe-tabelle th {
  padding: 6px 10px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #f0be29;
  border-bottom: 1px solid rgba(240,190,41,0.2);
}
/* FIX: Zellen explizit dunkel – Browser setzt sonst weiß */
.jw-eingabe-zeile td {
  padding: 1px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
  color: #d0d8e0;
  font-size: 1.1rem;
  background: rgba(20, 22, 38, 0.85);
}
.jw-eingabe-zeile:hover td {
  background: rgba(255,255,255,0.04);
}
.jw-eingabe-name {
  font-weight: 500;
  min-width: 110px;
  color: #e6eaee;
  font-size: 1.15rem;
}

/* ── Punkte-Eingabefeld ── */
.jw-punkte-input {
  border-radius: 3px;
  padding: 3px 8px;
  font-size: 1.05rem;
  width: 90px;
  text-align: right;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07); /* FIX: dunkel statt browser-weiß */
  color: #e6eaee;
}
.jw-punkte-input:focus {
  outline: none;
  border-color: #f0be29;
  background: rgba(240,190,41,0.07);
}
/* FIX: Placeholder lesbar machen */
.jw-punkte-input::placeholder {
  color: rgba(174, 183, 191, 0.4);
}

.bonus-hint {
  font-size: 0.9rem;
  color: #8a9bb0;
}

/* ── Foto-Upload ── */
.jw-foto-zeile {
  margin-top: 12px;
  max-width: 420px;
}
.jw-foto-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* FIX: File-Input dunkel stylen */
.jw-foto-input {
  font-size: 0.88rem;
  color: #aeb7bf;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  padding: 4px 8px;
}
.jw-foto-input::file-selector-button {
  background: rgba(255,255,255,0.08);
  color: #e6eaee;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 3px;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-right: 8px;
}
.jw-foto-input::file-selector-button:hover {
  background: rgba(255,255,255,0.14);
}
.jw-foto-aktuell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.jw-foto-label {
  font-size: 0.78rem;
  color: #8a9bb0;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.jw-foto-vorschau {
  max-height: 80px;
  max-width: 160px;
  border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.12);
  object-fit: cover;
}

/* ── Buttons ── */
.jw-form-aktionen {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.jw-btn-speichern {
  border: none;
  border-radius: 3px;
  padding: 8px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, #f0be29, #e07a10);
  color: #1a1a2e;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.jw-btn-speichern:hover { filter: brightness(1.12); }
.jw-btn-abbrechen {
  text-decoration: none;
  font-size: 0.88rem;
  color: #8a9bb0;
}
.jw-btn-abbrechen:hover { color: #e6eaee; }
.jw-btn-loeschen {
  border: 1px solid rgba(220,80,60,0.4);
  border-radius: 3px;
  padding: 7px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  background: rgba(220,80,60,0.10);
  color: #e07060;
}
.jw-btn-loeschen:hover {
  background: rgba(220,80,60,0.22);
  border-color: #e07060;
}

/* ── Bearbeiten-Buttons ── */
.jw-bearbeiten-liste {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.jw-edit-btn {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 3px;
  font-size: 0.82rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.12);
  color: #aeb7bf;
  background: rgba(255,255,255,0.03);
}
.jw-edit-btn:hover {
  color: #e6eaee;
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.22);
}

/* ── Spieler-Bereich ── */
.jw-spieler-form {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.jw-spieler-input {
  border-radius: 3px;
  padding: 6px 12px;
  font-size: 0.95rem;
  flex: 1;
  max-width: 240px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: #e6eaee;
}
.jw-spieler-liste {
  font-size: 0.85rem;
  line-height: 1.8;
  color: #8a9bb0;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .jahreswertung-area { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .jw-tabelle  { font-size: 0.78rem; }
  .jw-tabelle td.jw-td-name  { min-width: 65px; }
  .jw-th-tag, .jw-td-tag { width: 28px; }
  .jw-form-bereich,
  .jw-bearbeiten-bereich,
  .jw-spieler-bereich { margin-left: 12px; margin-right: 12px; }
}
