/* café Tassilo – Verwaltung */
:root {
    --espresso: #330a0a; --bordeaux: #8e2420; --cream: #fef9f1; --latte: #f4ead9;
    --line: #e7d9c4; --ink: #2b1a16; --muted: #7b655c; --ok: #2f7a4b; --warn: #a86b00;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: #f7f1e8; }
a { color: var(--bordeaux); }
h1, h2, h3 { font-family: "Palatino Linotype", Palatino, Georgia, serif; color: var(--espresso); line-height: 1.2; }
h1 { font-size: 1.9rem; margin: 0 0 .3em; }
h2 { font-size: 1.3rem; margin: 0 0 .7em; }
h3 { font-size: 1.05rem; margin: 1.2em 0 .5em; }

.a-header { background: var(--espresso); color: var(--cream); display: flex; align-items: center; gap: 24px; padding: 10px 24px; flex-wrap: wrap; position: sticky; top: 0; z-index: 10; }
.a-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); }
.a-brand img { width: 96px; }
.a-brand span { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.a-nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.a-nav a, .a-user a { color: var(--cream); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .93rem; font-weight: 500; opacity: .85; }
.a-nav a:hover, .a-user a:hover { background: rgba(255,255,255,.1); opacity: 1; }
.a-nav a.active { background: var(--cream); color: var(--espresso); opacity: 1; }
.a-user { display: flex; gap: 4px; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: #e0a526; color: var(--espresso); font-size: .75rem; font-weight: 700; text-align: center; margin-left: 4px; }

.a-main { max-width: 1100px; margin: 0 auto; padding: 30px 20px 60px; }
.a-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.a-card { background: #fff; border-radius: 14px; padding: 24px; box-shadow: 0 4px 16px -8px rgba(51,10,10,.2); margin-bottom: 20px; }
.a-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.a-grid-2 .a-card { margin: 0; }
.a-muted { color: var(--muted); }
.a-warn { color: var(--warn); font-weight: 500; }

.a-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 20px 0 24px; }
.a-stat { background: #fff; border-radius: 14px; padding: 20px 22px; text-decoration: none; color: var(--ink); box-shadow: 0 4px 16px -8px rgba(51,10,10,.2); border-left: 5px solid var(--bordeaux); transition: transform .15s; }
.a-stat:hover { transform: translateY(-2px); }
.a-stat strong { display: block; font-size: 2.2rem; line-height: 1; color: var(--espresso); }
.a-stat span { color: var(--muted); font-size: .9rem; }

.a-list { list-style: none; padding: 0; margin: 0 0 16px; }
.a-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.a-list li span { display: inline-block; min-width: 120px; font-weight: 600; color: var(--bordeaux); }

/* Buttons */
.a-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; color: var(--espresso); font: 600 .93rem/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.a-btn:hover { background: var(--latte); border-color: #d5c2a6; }
.a-btn-primary { background: var(--espresso); border-color: var(--espresso); color: var(--cream); }
.a-btn-primary:hover { background: #4a1712; border-color: #4a1712; }
.a-btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.a-btn-ok:hover { background: #276640; border-color: #276640; }
.a-btn-danger { color: var(--bordeaux); }
.a-btn-danger:hover { background: #fbe9e7; border-color: #e7b3ad; }
.a-btn-sm { padding: 6px 12px; font-size: .85rem; }
.a-btn-block { width: 100%; justify-content: center; padding: 12px; }

/* Forms */
.a-form label, .a-login label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; color: var(--espresso); }
input, textarea, select { display: block; width: 100%; margin-top: 5px; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 9px; background: var(--cream); color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: none; border-color: #c49a64; background: #fff; box-shadow: 0 0 0 3px rgba(196,154,100,.2); }
.a-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.a-actions { display: flex; gap: 10px; margin-top: 6px; }

/* Tabs */
.a-tabs { display: flex; gap: 4px; background: #fff; padding: 4px; border-radius: 10px; box-shadow: 0 2px 8px -4px rgba(51,10,10,.2); flex-wrap: wrap; }
.a-tabs a { padding: 7px 14px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; }
.a-tabs a.active { background: var(--espresso); color: var(--cream); }

/* Table */
.a-table { width: 100%; border-collapse: collapse; }
.a-table th, .a-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.a-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.a-td-actions { white-space: nowrap; text-align: right !important; }
.a-td-actions form { display: inline; }

/* List items */
.a-dayhead { font-size: 1.05rem; margin: 26px 0 10px; color: var(--muted); }
.a-item { display: flex; gap: 20px; justify-content: space-between; align-items: flex-start; border-left: 5px solid var(--line); padding: 18px 20px; margin-bottom: 12px; }
.a-item.status-neu { border-left-color: #e0a526; }
.a-item.status-bestaetigt { border-left-color: var(--ok); }
.a-item.status-abgelehnt { border-left-color: #c9b8a6; opacity: .75; }
.a-item-main { flex: 1; min-width: 0; }
.a-item-title { font-size: 1.05rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.a-item-meta { font-size: .87rem; color: var(--muted); margin-top: 3px; word-break: break-word; }
.a-item-text { margin: 10px 0 0; background: var(--cream); padding: 10px 12px; border-radius: 8px; white-space: normal; }
.a-item-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 140px; }
.a-item-actions form { margin: 0; }
.a-item-actions .a-btn { width: 100%; justify-content: center; }
.a-time { font-weight: 700; background: var(--espresso); color: var(--cream); padding: 2px 9px; border-radius: 6px; font-size: .9rem; }
.a-tag { font-style: normal; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--latte); color: var(--muted); }
.a-tag-neu, .a-tag-new { background: #fdf0d2; color: var(--warn); }
.a-tag-bestaetigt { background: #e2f3e8; color: var(--ok); }
.a-tag-abgelehnt { background: #eee; color: #777; }
.a-tag-art { background: var(--espresso); color: var(--cream); }
.a-stars { color: #e0a526; letter-spacing: 1px; }
.a-stars span { color: var(--line); }
.a-reply { margin-top: 10px; }
.a-reply summary { cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--bordeaux); }
.a-reply textarea { margin: 8px 0; }

/* Flash */
.a-flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; }
.a-flash-success { background: #e2f3e8; color: #1f5a35; }
.a-flash-error { background: #fbe9e7; color: var(--bordeaux); }

/* Login */
.a-login { max-width: 380px; margin: 8vh auto 0; text-align: center; }
.a-login-logo { width: 180px; margin: 0 auto 10px; }
.a-login form { text-align: left; }

@media (max-width: 720px) {
    .a-header { padding: 10px 14px; gap: 8px; position: static; }
    .a-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .a-nav a { white-space: nowrap; }
    .a-item { flex-direction: column; }
    .a-item-actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
    .a-item-actions .a-btn { width: auto; }
    .a-table thead { display: none; }
    .a-table tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
    .a-table td { display: block; border: 0; padding: 3px 0; }
    .a-table td[data-l]::before { content: attr(data-l) ": "; font-size: .78rem; color: var(--muted); font-weight: 600; }
    .a-td-actions { text-align: left !important; }
}

/* Newsletter */
.a-mail-preview { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: 10px; background: #f2e6d4; }
.a-inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.a-inline label { flex: 1 1 220px; margin: 0; }
.a-nl-send { margin-top: 6px; }
.a-btn[disabled] { opacity: .5; cursor: not-allowed; }
code { background: var(--latte); padding: 2px 6px; border-radius: 5px; font-size: .85em; word-break: break-all; }
.small { font-size: .88rem; }
.a-form label.a-check { display: flex; align-items: center; gap: 10px; }
.a-form label.a-check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--ok); }
.a-stack { display: grid; gap: 20px; }
.a-form h3 { font-size: 1rem; margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid rgba(0,0,0,.08); }
.a-form h3 .a-muted { font-weight: 400; font-size: .85rem; }

/* breite Tabellen in schmalen Karten seitlich scrollbar statt abgeschnitten */
.a-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.a-scroll .a-table td, .a-scroll .a-table th { white-space: nowrap; }
.a-form label.a-check span { line-height: 1.35; }

/* Rückfrage-Fenster (statt Browser-Popup) */
.a-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(36, 8, 7, .55); backdrop-filter: blur(2px); }
.a-modal[hidden] { display: none; }
.a-modal-box { width: min(440px, 100%); background: #fff; border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 24px 60px rgba(36, 8, 7, .35); animation: a-modal-in .18s ease-out; }
.a-modal-box p { margin: 0 0 18px; font-size: 1rem; line-height: 1.45; color: var(--ink); }
.a-modal-btns { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.a-btn.a-btn-gefahr { background: var(--bordeaux); border-color: var(--bordeaux); color: #fff; }
@keyframes a-modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Schnapsen: Spieler-Aktionen ordentlich in einer Leiste */
.sn-aktionen { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.sn-aktionen form { display: flex !important; align-items: center; gap: 4px; margin: 0; }
.sn-aktionen input { width: 78px; height: 32px; padding: 4px 8px; border: 1.5px solid var(--line); border-radius: 8px; background: #fffaf2; font: inherit; font-size: .88rem; }
.sn-aktionen input.sn-pw { width: 130px; }
.sn-aktionen .a-btn-sm { height: 32px; padding: 0 12px; }
.a-td-actions:has(.sn-aktionen) { white-space: normal; min-width: 210px; }
.sn-statistik li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sn-statistik li span { min-width: 0; color: var(--ink); font-weight: 600; }
.sn-rang td:first-child { width: 2.5em; }
.sn-statistik li b { font-weight: inherit; }

/* Turniere */
.tu-baum { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; }
.tu-runde { min-width: 210px; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.tu-runde h3 { margin: 0 0 4px; font-size: .9rem; color: var(--bordeaux); }
.tu-spiel { border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.tu-spiel.fertig { border-color: #cfe3d4; }
.tu-spiel > small { display: block; padding: 4px 10px 6px; }
.tu-tn { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; min-height: 40px; }
.tu-tn + .tu-tn { border-top: 1px solid var(--line); }
.tu-tn.sieger { background: #eef7f0; font-weight: 700; }
.tu-tn form { margin: 0; }
.tu-liste { padding-left: 1.4em; margin: 0 0 14px; }
.tu-liste li { padding: 4px 0; }
.tu-liste li { display: list-item; }
.tu-liste li > span { margin-right: 8px; }
.tu-liste form { display: inline; }
.tu-neu { display: flex; gap: 8px; align-items: end; margin-bottom: 12px; }
.tu-neu label { flex: 1; margin: 0; }

.tu-geld { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tu-geld small { display: block; font-weight: 400; margin-top: 4px; }
@media (max-width: 560px) { .tu-geld { grid-template-columns: 1fr; } }

.tu-aus { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.tu-liste li form { margin-left: 6px; }
