:root {
    --bg: #0f1729;
    --bg-soft: #1a2438;
    --card: #ffffff;
    --ink: #1a2438;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #1d4ed8;
    --brand-2: #0ea5e9;
    --green: #16a34a;
    --red: #dc2626;
    --amber: #d97706;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(15, 23, 41, .08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 240px, #f8fafc 100%);
    line-height: 1.5;
}

.container { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 16px; }

/* ---------- Topbar ---------- */
.topbar {
    background: linear-gradient(110deg, var(--bg) 0%, #16315f 100%);
    color: #fff;
    box-shadow: var(--shadow);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { color: #fff; font-weight: 700; font-size: 1.15rem; text-decoration: none; margin-right: auto; }
.nav { display: flex; align-items: center; gap: 16px; }
.nav a { color: #e2e8f0; text-decoration: none; font-weight: 500; }
.nav a:hover { color: #fff; }
.nav-user { color: #94a3b8; font-size: .9rem; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; }

@media (max-width: 700px) {
    .nav-toggle { display: block; }
    .nav {
        position: absolute; top: 60px; left: 0; right: 0;
        flex-direction: column; align-items: flex-start; gap: 12px;
        background: var(--bg); padding: 16px; display: none; z-index: 20;
    }
    .nav-open .nav { display: flex; }
    .topbar-inner { position: relative; }
}

/* ---------- Layout ---------- */
main.container { padding-top: 24px; padding-bottom: 48px; }
h1 { font-size: 1.6rem; margin: .2em 0 .6em; }
h2 { font-size: 1.2rem; margin: 1.4em 0 .6em; }
a { color: var(--brand); }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}
.card-narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.lead { color: var(--muted); font-size: 1.05rem; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line);
    border-radius: 10px; font-size: 1rem; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--brand-2); border-color: var(--brand-2); }

.btn {
    display: inline-block; background: var(--brand); color: #fff; border: 0;
    padding: 10px 18px; border-radius: 10px; font-size: 1rem; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: background .15s;
}
.btn:hover { background: #1742b8; }
.btn-ghost { background: rgba(255,255,255,.12); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 6px 12px; font-size: .9rem; }
.btn-danger { background: var(--red); }

/* ---------- Flash ---------- */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error   { background: #fee2e2; color: #991b1b; }
.flash-info    { background: #dbeafe; color: #1e40af; }

/* ---------- Tabellen ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tbody tr:hover { background: #f8fafc; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ---------- Tipp-Spiele ---------- */
.match {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center; gap: 10px;
    padding: 14px 0; border-bottom: 1px solid var(--line);
}
.match:last-child { border-bottom: 0; }
.match .team { font-weight: 600; }
.match .team.home { text-align: right; }
.match .score-inputs { display: flex; align-items: center; gap: 6px; }
.match .score-inputs input { width: 56px; text-align: center; padding: 8px; }
.match-meta { font-size: .82rem; color: var(--muted); margin-bottom: 4px; }
.match-result { font-weight: 700; }
.locked { opacity: .65; }
.pts { display: inline-block; min-width: 22px; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.pts-4 { background: #dcfce7; color: #166534; }
.pts-3 { background: #d1fae5; color: #047857; }
.pts-1 { background: #fef3c7; color: #92400e; }
.pts-0 { background: #fee2e2; color: #991b1b; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; background: #e0e7ff; color: #3730a3; font-weight: 600; }
.lock-note { color: var(--amber); font-size: .82rem; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
    padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
    cursor: pointer; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem;
}
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.rank-1 td { background: #fffbeb; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.site-footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: .85rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px){ .grid-2 { grid-template-columns: 1fr; } }
