/* ============================================================
   TSC Wämpledon – "Doppelfehler international" – Designsystem
   Durchgängig dunkles Wimbledon-Theme (Grün/Gold/Lila).
   Ball-Cursor: Gold statt Gelb.
   ============================================================ */

:root {
    --gruen: #00704A;
    --gruen-hell: #28B463;
    --lila: #7B68A6;
    --gold: #D4AF37;

    --ink: #0A0E18;
    --ink-soft: #0F1420;
    --ink-line: rgba(0, 112, 74, .18);

    --seite: #0A0E18;
    --flaeche: #151C2E;
    --flaeche-2: rgba(255, 255, 255, .05);
    --linie: rgba(0, 112, 74, .2);
    --linie-stark: rgba(0, 112, 74, .38);

    --text: #E8EDF5;
    --text-2: #A6ADBB;
    --text-3: #7B8395;

    --gelb: var(--gruen-hell);
    --gelb-tief: #06210F;
    --gelb-tint: rgba(40, 180, 99, .16);

    --gold-tief: #0A0E18;
    --gold-tint: rgba(212, 175, 55, .16);

    --lila-tint: rgba(123, 104, 166, .16);
    --rot: #E5484D;
    --rot-tint: rgba(229, 72, 77, .14);

    --r: 14px;
    --r-klein: 10px;
    --ball: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgdmlld0JveD0iMCAwIDI4IDI4Ij4KPGNpcmNsZSBjeD0iMTQiIGN5PSIxNCIgcj0iMTIiIGZpbGw9IiNENEFGMzciIHN0cm9rZT0iIzBBMEUxOCIgc3Ryb2tlLXdpZHRoPSIxLjIiLz4KPHBhdGggZD0iTTMuNSA2IFExNCAxNCAzLjUgMjIiIHN0cm9rZT0iIzBBMEUxOCIgc3Ryb2tlLXdpZHRoPSIxLjYiIGZpbGw9Im5vbmUiLz4KPHBhdGggZD0iTTI0LjUgNiBRMTQgMTQgMjQuNSAyMiIgc3Ryb2tlPSIjMEEwRTE4IiBzdHJva2Utd2lkdGg9IjEuNiIgZmlsbD0ibm9uZSIvPgo8L3N2Zz4=") 14 14;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Inter, Roboto, sans-serif;
    background: var(--seite);
    color: var(--text);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    cursor: var(--ball), auto;
}

a, button, .btn, label, select, summary,
input[type=checkbox], input[type=radio], input[type=submit] {
    cursor: var(--ball), pointer;
}

input[type=text], input[type=password], input[type=email], input[type=url],
input[type=number], input[type=datetime-local], input[type=date], input[type=time],
textarea { cursor: text; }

h1, h2, h3 {
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.7px;
    line-height: 1.15;
}

h1 { font-size: 1.9rem; margin: 0 0 1.2rem; letter-spacing: -1.1px; }
h2 { font-size: 1.15rem; margin: 0 0 0.6rem; }
h3 { font-size: 0.95rem; margin: 1.4rem 0 0.5rem; }

p { line-height: 1.6; }

/* ---------- Topbar (Glasnavbar wie auf der Startseite) ---------- */
header.topbar {
    background: rgba(10, 14, 24, .82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    padding: 0.85rem 1.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--linie);
}

header.topbar .marke,
header.topbar strong {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    font-style: normal;
}

header.topbar .marke-name,
header.topbar strong {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.3px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

header.topbar .marke-name::before,
header.topbar strong::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gruen-hell);
    flex-shrink: 0;
}

header.topbar .marke-tag {
    font-size: 0.66rem;
    color: var(--gold);
    letter-spacing: 0.04em;
    margin-left: 1.15rem;
}

header.topbar a {
    color: var(--text-2);
    text-decoration: none;
    margin-left: 1.1rem;
    font-size: 0.83rem;
    transition: color .15s ease;
}

header.topbar a:hover { color: #fff; }

header.topbar a:last-child {
    background: var(--gruen);
    color: #fff;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    transition: background .2s ease, transform .2s ease;
}

header.topbar a:last-child:hover {
    background: var(--gruen-hell);
    transform: translateY(-1px);
}

/* ---------- Layout ---------- */
.container {
    max-width: 1000px;
    margin: 2.2rem auto;
    padding: 0 1.2rem;
}

.card {
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--r);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1rem;
    transition: border-color .2s ease;
}

.login-box {
    max-width: 400px;
    margin: 4.5rem auto;
    padding: 2rem;
    text-align: center;
}

.login-marke {
    display: inline-flex;
    flex-direction: column;
    margin-bottom: 1.4rem;
}
.login-marke .name {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.3px;
    color: var(--text);
}
.login-marke .tag {
    font-size: 0.72rem;
    color: var(--gold);
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}

.login-box h1 { text-align: left; }
.login-box form { text-align: left; }

/* Bento-Grid für Dashboards */
.bento {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.bento .card { margin-bottom: 0; }

.stat {
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--r);
    padding: 1.1rem 1.2rem;
}

.stat-zahl {
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -1.2px;
    line-height: 1;
    margin: 0;
    color: var(--text);
}

.stat-label {
    color: var(--text-3);
    font-size: 0.78rem;
    margin: 0.4rem 0 0;
}

.karte-gelb {
    background: linear-gradient(145deg, var(--gold), #B8912B);
    border-color: var(--gold);
    color: var(--gold-tief);
}

.karte-gelb h2, .karte-gelb .stat-zahl { color: var(--gold-tief); }
.karte-gelb p, .karte-gelb .stat-label { color: rgba(10, 14, 24, .72); }
.karte-gelb .btn { background: var(--gold-tief); border-color: var(--gold-tief); color: #fff; }
.karte-gelb .btn:hover { background: #000; }

/* ---------- Formulare ---------- */
label {
    display: block;
    margin: 1rem 0 0.35rem;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-2);
}

input[type=text], input[type=password], input[type=number],
input[type=email], input[type=url], input[type=datetime-local],
input[type=date], input[type=time],
textarea, select {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--linie);
    border-radius: var(--r-klein);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, .04);
    font-family: inherit;
    color: var(--text);
    transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
}

input::placeholder, textarea::placeholder { color: var(--text-3); }

input:hover, textarea:hover, select:hover { border-color: var(--linie-stark); }

input:focus, textarea:focus, select:focus {
    outline: none;
    background: rgba(255, 255, 255, .06);
    border-color: var(--gruen-hell);
    box-shadow: 0 0 0 3px var(--gelb-tint);
}

textarea { resize: vertical; min-height: 90px; line-height: 1.5; }

input[type=file] { font-size: 0.85rem; color: var(--text-2); }

select option { background: var(--flaeche); color: var(--text); }

/* ---------- Buttons ---------- */
button, .btn {
    display: inline-block;
    background: var(--gruen);
    color: #fff;
    border: 1px solid var(--gruen);
    padding: 0.62rem 1.3rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: -0.1px;
    text-decoration: none;
    margin-top: 1rem;
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}

button:hover, .btn:hover {
    background: var(--gruen-hell);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 112, 74, .4);
}

button:active, .btn:active { transform: translateY(0); box-shadow: none; }

.btn-hell {
    background: var(--flaeche-2);
    color: var(--text);
    border: 1px solid var(--linie-stark);
}

.btn-hell:hover { background: rgba(255, 255, 255, .09); color: var(--text); box-shadow: none; }

.btn-gelb {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--gold-tief);
}

.btn-gelb:hover { background: #E4C158; color: var(--gold-tief); box-shadow: 0 6px 18px rgba(212, 175, 55, .35); }

/* ---------- Meldungen ---------- */
.fehler, .erfolg {
    padding: 0.8rem 1rem;
    border-radius: var(--r-klein);
    margin: 1rem 0;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.fehler { background: var(--rot-tint); color: var(--rot); border-color: rgba(229, 72, 77, .3); }
.erfolg { background: var(--gelb-tint); color: var(--gruen-hell); border-color: rgba(40, 180, 99, .3); }

/* ---------- Tabellen ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.8rem;
}

th, td {
    text-align: left;
    padding: 0.7rem 0.6rem;
    border-bottom: 1px solid var(--linie);
    font-size: 0.88rem;
    color: var(--text);
}

th {
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--linie-stark);
}

tbody tr:hover td, tr:hover td { background: rgba(255, 255, 255, .03); }
td:last-child, th:last-child { text-align: right; }

/* ---------- Status-Pills ---------- */
.tag {
    display: inline-block;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}

.tag-gelb    { background: var(--gruen-hell); color: var(--gelb-tief); }
.tag-lila    { background: var(--lila-tint); color: #C9BEDF; }
.tag-neutral { background: rgba(255, 255, 255, .07); color: var(--text-2); }
.tag-inaktiv { color: var(--text-3); font-size: 0.85rem; }

/* ---------- Sonstiges ---------- */
.thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: var(--r-klein);
    border: 1px solid var(--linie);
}

a { color: var(--lila); text-decoration: none; }
a:hover { text-decoration: underline; color: #9686C4; }

.aktionen a { margin-left: 0.7rem; font-size: 0.83rem; }
.aktionen a.loeschen { color: var(--rot); }
.byline { color: var(--text-3); font-size: 0.8rem; }

hr { border: none; border-top: 1px solid var(--linie); margin: 1.2rem 0; }

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0;
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0;
}

.avatar-name { display: inline-flex; align-items: center; }

@keyframes auf {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card, .stat { animation: auf .35s ease both; }

/* ============================================================
   Termine: Ansichtswechsel, Filter, Liste, Kalender
   ============================================================ */

.ansicht-schalter {
    display: inline-flex;
    background: var(--flaeche-2);
    border: 1px solid var(--linie);
    border-radius: 999px;
    padding: 3px;
    margin-bottom: 1rem;
    gap: 2px;
}

.ansicht-schalter a, .ansicht-schalter .aktiv {
    padding: 0.4rem 1.1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-2);
}

.ansicht-schalter .aktiv { background: var(--gruen); color: #fff; }
.ansicht-schalter a:hover { color: var(--text); text-decoration: none; }

.filter-leiste {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-leiste > div { flex: 1; min-width: 130px; }
.filter-leiste label { margin-top: 0; }

.sammelleiste {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 66px;
    z-index: 5;
    background: var(--flaeche);
}

.termin-kopf {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.termin-datum {
    font-size: 0.78rem;
    color: var(--lila);
    font-weight: 600;
    letter-spacing: 0.2px;
}

.termin h2 { font-size: 1.05rem; }
.termin.vergangen { opacity: 0.55; }

.termin-aktionen {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.9rem;
}

details summary {
    font-size: 0.8rem;
    color: var(--text-3);
    cursor: var(--ball), pointer;
}

details summary:hover { color: var(--text-2); }

/* ---------- Kalender ---------- */
.kal-kopf {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.kal-gitter {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.kal-wochentag {
    text-align: center;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-3);
    padding: 0.3rem 0;
}

.kal-tag {
    min-height: 74px;
    border: 1px solid var(--linie);
    border-radius: 8px;
    padding: 4px;
    background: rgba(255, 255, 255, .02);
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.kal-tag.fremd { background: transparent; opacity: 0.4; }
.kal-tag.heute { border-color: var(--gruen-hell); box-shadow: 0 0 0 2px var(--gelb-tint); }

.kal-zahl { font-size: 0.72rem; color: var(--text-3); font-weight: 600; }
.kal-tag.heute .kal-zahl { color: var(--text); }

.kal-chip {
    display: block;
    font-size: 0.63rem;
    line-height: 1.25;
    padding: 2px 4px;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kal-chip:hover { text-decoration: none; filter: brightness(1.1); }

.chip-zusage     { background: var(--gruen-hell); color: var(--gelb-tief); }
.chip-vielleicht { background: var(--lila);       color: #fff; }
.chip-absage     { background: rgba(255,255,255,.06); color: var(--text-3); text-decoration: line-through; }
.chip-offen      { background: rgba(255,255,255,.12); color: var(--text); }

.kal-legende {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
    font-size: 0.75rem;
    color: var(--text-3);
}

.kal-punkt {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
}

@media (max-width: 560px) {
    .kal-tag { min-height: 58px; padding: 3px; }
    .kal-chip { font-size: 0.55rem; }
    .sammelleiste { position: static; }
    header.topbar .marke-tag { display: none; }
}
