/* Tennis Manager · Design aus dem Prototyp (06.09.2026)
   Palette: Tiefblau (Kopf), Signalblau (Blattköpfe), Türkis (Untermenü, Knöpfe), heller Grund, Zitrone als Akzent für Ergebnisse und Geld.
   Aufbau: Kopfleiste, Hauptmenü (Bereiche), Untermenü (Unterpunkte), Blätter (.panel) mit farbigem Kopf. */

:root {
    --navy-900: #062a4a; --navy-800: #0a3860; --navy-700: #114c7d; --blue-500: #1f6fb2;
    --teal-600: #0e8f92; --teal-500: #14a8a0; --teal-300: #6fd7cd;
    --paper: #eef4f8; --card: #ffffff; --card2: #f8fbfd; --line: #cfdde8; --line2: #e8f0f5; --thead: #e6eff6;
    --ink: #12283a; --ink2: #587287; --head-ink: #0a3860;
    --lemon: #ffd63d; --win: #1a8f52; --win-soft: #e2f5ea; --loss: #c0392b; --loss-soft: #fbe3e0; --warn-soft: #fff3d6;
    --hover: #f3f9fc; --me: #e4f7f4; --radius: 3px;
}
@media (prefers-color-scheme: dark) {
    :root { --paper: #0b1824; --card: #12222f; --card2: #172a39; --line: #27415a; --line2: #1d3346; --thead: #1a3143;
        --ink: #e3edf5; --ink2: #93abc0; --head-ink: #bfe0f5; --win: #5fd08a; --win-soft: #173223; --loss: #ff7d72; --loss-soft: #3a1a18; --warn-soft: #3a3210;
        --hover: #18303f; --me: #133a3a; }
}
* { box-sizing: border-box; }
html { color-scheme: light dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink);
    font: 14px/1.45 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--blue-500); text-decoration: none; } a:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) { a { color: var(--teal-300); } }
:focus-visible { outline: 2px solid var(--lemon); outline-offset: 1px; }
code { font: .9em ui-monospace, Menlo, Consolas, monospace; background: var(--thead); padding: 0 .3rem; border-radius: var(--radius); }
code.big { font-size: 1.15rem; letter-spacing: .06em; user-select: all; background: var(--lemon); color: var(--navy-900); }
.muted { color: var(--ink2); } .u-normal { font-weight: 400; } .u0, .u-mt0 { margin-top: 0; } .u-mt-1rem { margin-top: 1rem; } .u-auto { width: auto; }

h1 { font-size: 22px; font-weight: 600; margin: 0 0 14px; color: var(--head-ink); }
h1 small { font-size: 13px; font-weight: 400; color: var(--ink2); margin-left: .4rem; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 0; }
.note, label small { font-size: 12px; }
.note { color: var(--ink2); }
.panel .note, p.note { border-left: 3px solid var(--teal-300); padding: 6px 10px; background: var(--card2); }
.section-h { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.small-link { font-size: 12px; margin-left: .6rem; }

/* ---------- Kopfleiste ---------- */
.topbar { background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%); color: #fff; border-bottom: 1px solid #04203a; }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; } .brand:hover { text-decoration: none; }
.brand-ball { width: 26px; height: 26px; border-radius: 50%; background: var(--lemon); position: relative; box-shadow: inset 0 -3px 6px rgba(0,0,0,.18); flex: none; }
.brand-ball::before, .brand-ball::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--navy-900); clip-path: inset(0 60% 0 0); }
.brand-ball::after { clip-path: inset(0 0 0 60%); }
.brand-text { font-size: 17px; letter-spacing: .3px; font-weight: 300; color: #fff; } .brand-text b { font-weight: 700; color: var(--teal-300); }
.topbar-actions { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.tbtn { font-size: 12px; color: #d8e8f3; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; padding: 5px 12px; cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.tbtn:hover, .tbtn.on { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.tbtn.user { padding: 3px 12px 3px 3px; }
summary::-webkit-details-marker { display: none; }
.dd { position: relative; }
.ddmenu { position: absolute; left: 0; top: calc(100% + 6px); min-width: 220px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(6,42,74,.25); padding: 4px; z-index: 40; }
.ddmenu.right { left: auto; right: 0; }
.ddmenu a, .linkbtn { display: block; padding: 8px 10px; color: var(--ink); background: none; border: 0; width: 100%; text-align: left; font: inherit; font-size: 13px; cursor: pointer; margin: 0; border-radius: var(--radius); box-shadow: none; }
.ddmenu a:hover, .ddmenu a.on, .linkbtn:hover { background: var(--me); color: var(--ink); text-decoration: none; transform: none; box-shadow: none; }
.ddmenu form { margin: 0; }
.avatar { border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; flex: none; color: #fff; font-weight: 600; }
.badge { display: inline-block; background: var(--lemon); color: var(--navy-900); font-size: 10px; font-weight: 700; border-radius: 8px; padding: 0 5px; line-height: 1.5; }
.newdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lemon); }

/* ---------- Menüs ---------- */
.nav-inner { max-width: 1240px; margin: 0 auto; padding: 0 16px; display: flex; flex-wrap: wrap; }
.nav-main { background: var(--navy-700); }
.nav-item { position: relative; color: #d5e8f5; padding: 9px 15px; font-size: 13.5px; font-weight: 600; }
.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.nav-item.is-active { background: var(--teal-600); color: #fff; }
.nav-sub { background: var(--teal-600); border-bottom: 3px solid var(--teal-500); }
.nav-sub-empty { height: 6px; }
.sub-item { color: #e2fbf8; padding: 7px 14px; font-size: 13px; }
.sub-item:hover { background: rgba(255,255,255,.14); color: #fff; text-decoration: none; }
.sub-item.is-active { color: var(--navy-900); background: #fff; font-weight: 600; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }

/* ---------- Rahmen ---------- */
.wrap { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 18px 16px 30px; }
.footer { max-width: 1240px; width: 100%; margin: 0 auto; padding: 14px 16px 30px; font-size: 11.5px; color: var(--ink2); }

/* ---------- Blätter ---------- */
.panel { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 16px; overflow: hidden; }
.panel > h2:first-child, .panel-head { margin: -14px -14px 14px; background: linear-gradient(180deg, var(--blue-500), var(--navy-700)); color: #fff; font-size: 13.5px; font-weight: 600; letter-spacing: .2px; padding: 8px 14px; }
.panel > h2:first-child a, .panel-head a { color: #fff; }
.panel.narrow { max-width: 740px; }
.grid2, .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; } .grid2 > .panel, .cards > .panel { margin: 0; }
.sheet { box-shadow: 0 2px 10px rgba(6,42,74,.08); }
details.panel > summary, .sumlink { cursor: pointer; font-weight: 600; }
.hero { background: linear-gradient(120deg, var(--navy-800), var(--teal-600)); color: #fff; border: 1px solid var(--navy-700); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero-kicker { font-size: 12px; color: var(--teal-300); } .hero h1 { margin: 2px 0 6px; font-size: 24px; color: #fff; } .hero p { margin: 0; color: #cfe6f2; font-size: 13px; max-width: 60ch; }
.hero-stat { text-align: right; } .hero-stat .num { font-size: 40px; font-weight: 700; line-height: 1; color: var(--lemon); } .hero-stat .lbl { font-size: 12px; color: #cfe6f2; }
a.homecard { display: block; color: var(--ink); text-decoration: none; transition: box-shadow .1s, border-color .1s; } a.homecard:hover { border-color: var(--teal-500); box-shadow: 0 4px 14px rgba(14,143,146,.18); }
a.homecard .go { font-size: 12px; font-weight: 600; color: var(--teal-600); } a.homecard .go::after { content: ' →'; }
.soon { display: flex; gap: 14px; align-items: flex-start; } .soon .brand-ball { width: 40px; height: 40px; margin-top: 2px; }
.soon ul { margin: .4rem 0 0; padding-left: 1.2rem; }

/* ---------- Formulare ---------- */
label { display: block; font-size: 12px; color: var(--ink2); margin: 12px 0 4px; }
input:not([type=checkbox]):not([type=file]), select, textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 9px; font: inherit; font-size: 14px; background: var(--card); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal-300); outline-offset: 0; border-color: var(--teal-500); }
input:disabled { background: var(--card2); color: var(--ink2); }
input[type=file] { font: inherit; color: var(--ink); }
button, .btn { display: inline-block; margin-top: 12px; background: var(--teal-600); color: #fff; border: 1px solid var(--teal-600); border-radius: var(--radius); padding: 7px 16px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
button:hover, .btn:hover { background: var(--teal-500); border-color: var(--teal-500); color: #fff; text-decoration: none; }
button.ghost, .btn { background: transparent; color: var(--teal-600); } button.ghost:hover, .btn:hover { background: var(--me); color: var(--head-ink); }
@media (prefers-color-scheme: dark) { button.ghost, .btn { color: var(--teal-300); border-color: var(--teal-500); } }
button.small { padding: 3px 9px; font-size: 12px; margin: 2px 2px 0 0; }
button.danger { background: transparent; color: var(--loss); border-color: var(--loss); } button.danger:hover { background: var(--loss); color: #fff; }
.row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; } .row > div { flex: 1 1 220px; } .row button { margin-top: 0; }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--ink); font-size: 14px; } .check input { width: 1.05rem; height: 1.05rem; accent-color: var(--teal-600); }
.settingsgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; } .settingsgrid .full { grid-column: 1 / -1; }
.grp { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin: 18px 0 2px; padding-bottom: 3px; border-bottom: 1px dashed var(--line); }
.inputs { display: flex; gap: 6px; } .inputs > * { flex: 1 1 0; min-width: 0; }
.inl, form.inl { display: inline; margin: 0; } .iacts form.inl { display: inline-flex; gap: 5px; align-items: center; }

/* ---------- Meldungen, Marken ---------- */
.ok, .err, .warn { padding: 10px 14px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.ok { background: var(--win-soft); border-left: 4px solid var(--win); } .err { background: var(--loss-soft); border-left: 4px solid var(--loss); } .warn { background: var(--warn-soft); border-left: 4px solid var(--lemon); }
.chip { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); color: var(--ink2); white-space: nowrap; }
.chip.ok { background: var(--win-soft); border-color: var(--win); color: var(--win); margin: 0; padding: 1px 8px; border-left-width: 1px; }
.chip.bad { background: var(--loss-soft); border-color: var(--loss); color: var(--loss); }
.chip.warn, .chip.todo { background: var(--warn-soft); border-color: #f0dca4; color: #8a6100; margin: 0; padding: 1px 8px; border-left-width: 1px; }
@media (prefers-color-scheme: dark) { .chip.warn, .chip.todo { color: var(--lemon); border-color: #6b5a1c; } }
.chip.ver { background: var(--navy-700); border-color: var(--navy-700); color: #fff; } .chip.prio3 { opacity: .7; }
.win { color: var(--win); font-weight: 600; } .loss { color: var(--loss); font-weight: 600; }

/* ---------- Kacheln, Filter ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.tile { border: 1px solid var(--line); border-left: 3px solid var(--teal-500); border-radius: var(--radius); padding: 10px 12px; background: var(--card2); }
.tile .v { font-size: 20px; font-weight: 700; color: var(--head-ink); font-variant-numeric: tabular-nums; } .tile .l, .tile .k { font-size: 12px; color: var(--ink2); }
.v.accent { color: var(--teal-600); } .v.orange { color: #d96a00; } .v.gain { color: var(--win); } .v.muted { color: var(--ink2); }
.modebar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; font-size: 12px; color: var(--ink2); } .modebar .gap { margin-left: 14px; }
.pill { display: inline-flex; gap: 5px; align-items: center; padding: 4px 12px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: var(--card); font-size: 12px; cursor: pointer; margin: 0; text-decoration: none; }
.pill:hover { background: var(--me); color: var(--ink); text-decoration: none; } .pill.on { background: var(--teal-600); border-color: var(--teal-600); color: #fff; } .pill small { opacity: .75; font: inherit; }

/* ---------- Tabellen ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: var(--thead); text-align: left; font-weight: 600; color: var(--head-ink); padding: 7px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 7px 12px; border-bottom: 1px solid var(--line2); vertical-align: top; }
tr:last-child td { border-bottom: 0; } tbody tr:hover { background: var(--hover); }
td.r, th.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; } td.acts { white-space: nowrap; }
tr.off { opacity: .55; } tr.me td { background: var(--me); font-weight: 600; }
table.status td.lv { width: 6.5rem; white-space: nowrap; } table.status td.lb { width: 15rem; font-weight: 600; } table.status td.dt { color: var(--ink2); word-break: break-word; }
table.mini td { padding: 3px 8px 3px 0; border: 0; } table.mini td:nth-child(2) { white-space: nowrap; }

/* ---------- Anmeldung ---------- */
.loginbox { max-width: 400px; margin: 7vh auto 0; } .loginbox button { width: 100%; }
.loginball { width: 72px; height: 72px; margin: 0 0 14px; }

/* ---------- Ideen, Changelog ---------- */
.ibody { margin: 8px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.idea { margin-bottom: 12px; border-left: 4px solid var(--navy-700); }
.idea.doing { border-left-color: var(--lemon); } .idea.done { border-left-color: var(--win); } .idea.dropped { opacity: .6; border-left-color: var(--line); } .idea.proposed { border-left-color: var(--teal-500); border-left-style: dashed; }
.ihead { display: flex; flex-wrap: wrap; gap: 5px 8px; align-items: baseline; } .ihead .muted { font-size: 12px; font-weight: 600; } .ititle { font-size: 16px; font-weight: 600; } .ihead .push { margin-left: auto; }
.inote { white-space: pre-line; margin-bottom: 0; padding: 6px 10px; background: var(--card2); border-left: 3px solid var(--teal-300); }
.iacts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; } .iacts button, .iacts .btn { margin-top: 0; } .vin { width: 11rem; padding: 4px 7px; font-size: 13px; }
.thumb { display: inline-flex; gap: 5px; align-items: center; margin: 0; padding: 3px 10px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; font-size: 12px; font-weight: 600; }
.thumb:hover { background: var(--me); color: var(--ink); } .thumb.on { background: var(--lemon); border-color: #e0b800; color: var(--navy-900); } .thumb.ro { cursor: default; } .thumbico { flex: none; }
.clentry header { display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: baseline; } .clentry header b { font-size: 16px; } .clentry header .muted { margin-left: auto; font-size: 12px; }
.clbody p { margin: 8px 0 0; } .clbody ul { margin: 8px 0 0; padding-left: 1.2rem; }

/* ---------- Austausch mit Claude ---------- */
.xdrop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 14px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; text-align: center; color: var(--ink); margin: 0; font-size: 14px; background: var(--card2); }
.xdrop:hover, .xdrop.over, .xdrop:focus-within { background: var(--me); border-color: var(--teal-500); } .xdrop input { position: absolute; width: 1px; height: 1px; opacity: 0; } .xdropicon { font-size: 1.8rem; }
.xpick { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; } .xpick li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 3px 8px; align-items: center; } .xpn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xbar2 { grid-column: 1 / -1; grid-row: 2; height: 6px; background: var(--line2); border-radius: 3px; overflow: hidden; } .xbar2 i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue-500), var(--teal-500)); transition: width .2s; }
.xsend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; } .xsend button { margin-top: 0; }
.xbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 18px 0 6px; } .xfilter { margin: 0; }
.xlist { display: flex; flex-direction: column; gap: 12px; }
.xmsg { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); width: min(100%, 46rem); }
.xmsg.xin { align-self: flex-end; border-left: 4px solid var(--teal-500); } .xmsg.xout { align-self: flex-start; border-left: 4px solid var(--navy-700); }
.xmsg header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; } .xmsg header .muted { margin-left: auto; }
.xnote { margin: 8px 0 0; overflow-wrap: anywhere; }
.xfile { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 10px; padding: 8px; background: var(--card2); border: 1px solid var(--line2); border-radius: var(--radius); }
.xthumb img { display: block; width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius); } .xicon { font-size: 2rem; width: 72px; text-align: center; }
.xmeta { flex: 1 1 10rem; min-width: 0; display: flex; flex-direction: column; } .xname { overflow-wrap: anywhere; } .xact { display: flex; gap: 6px; flex-wrap: wrap; } .xact .btn { padding: 4px 12px; margin-top: 0; }
.xdel { margin-top: 8px; display: flex; justify-content: flex-end; }

/* ---------- Profil ---------- */
.avatarbox { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; } .avatarbox h2 { margin-bottom: 4px; }
.avform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .avform button { margin-top: 0; } .avform input[type=file] { width: auto; max-width: 260px; border: 0; padding: 0; }
.warnnote { color: var(--loss); }

/* ---------- Schmal ---------- */
@media (max-width: 620px) {
    .topbar-inner { gap: 10px; }
    .nav-item, .sub-item { padding: 8px 11px; font-size: 12.5px; }
    .hero-stat { text-align: left; }
    table.status td.lb { width: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
