/* Vereinsheim – Verwaltung */
@font-face { font-family: 'Inter'; font-weight: 400; src: url(../fonts/inter-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; src: url(../fonts/inter-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; src: url(../fonts/inter-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; src: url(../fonts/barlow-condensed-latin-800-normal.woff2) format('woff2'); }
:root { --y: #FCDC00; --on-y: #111; --y-dark: #FCDC00; --k: #111; --line: #e5e5e0; --bg: #f4f4f1; --muted: #6b6b73; --r: 12px; --red: #c62828; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 Inter, system-ui, sans-serif; color: #1b1b1f; background: var(--bg); }
a { color: inherit; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.15; }
.ai { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.has-side { padding-left: 250px; }
.side { position: fixed; inset: 0 auto 0 0; width: 250px; background: var(--k); color: #cfcfcf; display: flex; flex-direction: column; z-index: 20; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.2rem; text-decoration: none; color: #fff; border-bottom: 1px solid #262626; }
.side-brand img { width: 40px; height: 44px; }
.side-brand strong { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .02em; }
.side-brand small { color: var(--y-dark); font-weight: 600; text-transform: uppercase; font-size: .7rem; letter-spacing: .14em; }
.side nav { padding: .8rem .6rem; flex: 1; }
.side nav a, .side-foot a { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; border-radius: 9px; text-decoration: none; font-weight: 500; margin-bottom: 2px; }
.side nav a:hover, .side-foot a:hover { background: #1f1f1f; color: #fff; }
.side nav a.active { background: var(--y); color: var(--on-y); font-weight: 700; }
.side-sep { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: #777; padding: 1.1rem .8rem .4rem; }
.side-foot { padding: .6rem; border-top: 1px solid #262626; font-size: .9rem; }
.count { background: var(--red); color: #fff; border-radius: 999px; padding: 0 .45rem; font-size: .72rem; margin-left: .3rem; }
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(244,244,241,.92); backdrop-filter: blur(8px); display: flex; align-items: center; gap: 1rem; padding: 1rem 2rem; border-bottom: 1px solid var(--line); }
.topbar h1 { font-family: 'Barlow Condensed', sans-serif; font-size: 1.9rem; text-transform: uppercase; margin: 0; letter-spacing: .01em; }
.topbar-actions { margin-left: auto; display: flex; gap: .5rem; }
.side-toggle { display: none; background: var(--k); color: var(--y-dark); border: 0; border-radius: 8px; width: 40px; height: 40px; align-items: center; justify-content: center; }
.content { padding: 1.6rem 2rem 4rem; max-width: 1400px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .6rem 1rem; border-radius: 9px; border: 1px solid #d3d3cc; background: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; color: #1b1b1f; white-space: nowrap; }
.btn:hover { border-color: #999; }
.btn-primary { background: var(--k); color: var(--y-dark); border-color: var(--k); }
.btn-primary:hover { background: #2a2a2a; border-color: #2a2a2a; }
.btn-danger { background: #fff; color: var(--red); border-color: #f0b8b8; }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-block { width: 100%; margin-bottom: .5rem; }
.btn-sm { padding: .38rem .7rem; font-size: .85rem; }
.icon-btn { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid transparent; background: none; cursor: pointer; color: #444; text-decoration: none; }
.icon-btn:hover { background: #fff; border-color: var(--line); color: #000; }
.icon-btn.danger:hover { color: var(--red); border-color: #f0b8b8; }
.alert { padding: .85rem 1rem; border-radius: 10px; margin-bottom: 1rem; }
.alert-success { background: #e7f6ea; border: 1px solid #a5d8b0; }
.alert-error { background: #fdecec; border: 1px solid #f0b1b1; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem; margin-bottom: 1.2rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.panel-head h3 { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 1.05rem; }
.panel-head a { font-size: .85rem; }
.panel.empty { text-align: center; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.help { display: block; color: var(--muted); font-size: .82rem; margin-top: .3rem; font-weight: 400; }
p.help { margin: 0 0 .8rem; }
/* Dashboard */
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.welcome h2 { font-size: 1.6rem; }
.quick { display: flex; gap: .5rem; flex-wrap: wrap; }
.stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem; text-decoration: none; border-bottom: 4px solid var(--y); }
.stat strong { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 2.3rem; line-height: 1; }
.stat span { color: var(--muted); font-size: .85rem; }
.stat:hover { box-shadow: 0 6px 20px -10px rgba(0,0,0,.3); }
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list a { display: flex; gap: .7rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.dash-list img { width: 34px; height: 34px; object-fit: contain; }
.dash-list span { display: flex; flex-direction: column; }
.dash-list small { color: var(--muted); }
.howto { margin: 0; padding-left: 1.2rem; }
.howto li { margin-bottom: .6rem; }
/* Liste */
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.toolbar input, .toolbar select { padding: .55rem .8rem; border: 1px solid #d3d3cc; border-radius: 9px; font: inherit; background: #fff; }
.toolbar input[type=search] { min-width: 240px; }
.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: auto; }
table.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .75rem .9rem; border-bottom: 1px solid var(--line); background: #fafaf8; white-space: nowrap; }
.list td { padding: .6rem .9rem; border-bottom: 1px solid #f0f0ec; vertical-align: middle; }
.list tr:hover td { background: #fcfcf6; }
.list tr.unread td { font-weight: 600; background: color-mix(in srgb, var(--y) 15%, #fff); }
.list .empty { text-align: center; color: var(--muted); padding: 2rem; }
.row-title { font-weight: 600; text-decoration: none; }
.row-title:hover { text-decoration: underline; text-decoration-color: var(--y); text-decoration-thickness: 3px; }
.col-actions { text-align: right; white-space: nowrap; width: 1%; }
.thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 6px; display: block; background: #eee; }
.thumb-empty { background: repeating-linear-gradient(-45deg, #f1f1ec 0 6px, #e7e7e0 6px 12px); }
.col-logo .thumb { object-fit: contain; background: #fff; }
.pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: .12rem .5rem; border-radius: 999px; background: #eee; color: #555; }
.pill-ok { background: #e3f5e6; color: #1e7b33; }
.dept-pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; padding: .15rem .55rem .15rem .2rem; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 40%, #fff); background: color-mix(in srgb, var(--c) 10%, #fff); white-space: nowrap; }
.dept-pill img { width: 20px; height: 20px; object-fit: contain; border-radius: 50%; background: #fff; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: middle; border: 1px solid #0002; }
.pager { display: flex; gap: .3rem; margin-top: 1rem; }
.pager a { padding: .4rem .75rem; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; }
.pager a.active { background: var(--k); color: var(--y-dark); }
/* Formular */
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.2rem; align-items: start; }
.edit-side .sticky { position: sticky; top: 90px; }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; }
.lbl { font-weight: 600; font-size: .88rem; }
.field input[type=text], .field input[type=email], .field input[type=url], .field input[type=number], .field input[type=date], .field input[type=datetime-local], .field input[type=time], .field input[type=password], .field select, .field textarea, .login input, .rows input, .rows select, .tt-form input, .tt-form select, .team-check input[type=text] {
  font: inherit; padding: .6rem .75rem; border: 1px solid #d0d0c8; border-radius: 9px; background: #fff; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus, .rows input:focus, .rows select:focus, .tt-form input:focus, .tt-form select:focus { outline: 0; border-color: var(--k); box-shadow: 0 0 0 3px color-mix(in srgb, var(--y) 50%, transparent); }
.field textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.field input[type=color] { width: 70px; height: 40px; padding: 2px; border: 1px solid #d0d0c8; border-radius: 8px; }
.field.check, label.check { flex-direction: row; align-items: center; gap: .55rem; cursor: pointer; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: #111; }
.edit-main .field:first-child input { font-size: 1.25rem; font-weight: 600; }
.image-preview { aspect-ratio: 16/10; background: repeating-linear-gradient(-45deg, #f6f6f2 0 10px, #eeeee8 10px 20px); border-radius: 10px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.image-field input[type=file] { font-size: .85rem; }
.dept-preview { margin: -.5rem 0 1rem; }
.dept-preview img { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: #fff; }
.panel.danger { border-color: #f5d0d0; }
.form-foot { display: flex; justify-content: flex-end; }
.form-actions { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; }
.narrow-form { max-width: 760px; }
.rows .row, .row-head { display: grid; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.row-head { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.time-grid { grid-template-columns: 130px 110px 110px minmax(160px, 1fr) 170px minmax(120px, .7fr) 36px; }
.coach-grid { grid-template-columns: minmax(200px, 1fr) minmax(160px, .8fr) 36px 36px; }
.team-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .5rem 1.2rem; }
.team-check-head { grid-column: 1 / -1; font-weight: 700; margin-top: .6rem; border-bottom: 1px solid var(--line); padding-bottom: .2rem; }
.team-check { display: grid; grid-template-columns: 1fr 130px; gap: .5rem; align-items: center; }
.team-check input[type=text] { padding: .35rem .5rem; font-size: .85rem; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.settings-grid .field:has(.html-editor), .settings-grid .field:has(textarea) { grid-column: 1 / -1; }
.tt-form { display: grid; grid-template-columns: minmax(170px, 1.2fr) 120px 105px 105px minmax(150px, 1fr) 150px minmax(110px, .7fr) auto auto; gap: .45rem; align-items: center; }
.tt-row { padding: .45rem .5rem .45rem .7rem; border-left: 4px solid var(--c); background: #fafaf8; border-radius: 8px; margin-bottom: .45rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: center; }
.msg-body { background: #fafaf8; border-radius: 10px; padding: 1rem; margin: 1rem 0; white-space: normal; }
/* Jodit */
.jodit-container:not(.jodit_inline) { border-radius: 10px !important; border-color: #d0d0c8 !important; }
.jodit-wysiwyg img { max-width: 100%; height: auto; }
/* Login */
.no-side .main { min-height: 100vh; display: grid; place-items: center; background: var(--k) radial-gradient(circle at 20% 10%, #2a2a2a, #0b0b0b); }
.login { width: 100%; padding: 1.5rem; display: grid; place-items: center; }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; padding: 2rem; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: .9rem; border-top: 6px solid var(--y); }
.login-card--wide { max-width: 620px; }
.login-card label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .88rem; }
.login-card h1 { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; font-size: 2rem; margin: 0; }
.login-card p { margin: 0; }
.login-logo { width: 64px; height: 70px; }
.checks { list-style: none; padding: 0; margin: 0; font-size: .88rem; display: grid; grid-template-columns: 1fr 1fr; gap: .2rem; }
.checks .ok { color: #1e7b33; } .checks .fail { color: var(--red); font-weight: 700; }
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .tt-form { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .tt-form > select[name=team_id], .tt-form > input[name=location] { grid-column: span 2; }
}
@media (max-width: 960px) {
  .has-side { padding-left: 0; }
  .side { transform: translateX(-100%); transition: transform .2s; }
  .side-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .side-toggle { display: inline-flex; }
  .topbar { padding: .8rem 1rem; }
  .topbar h1 { font-size: 1.4rem; }
  .content { padding: 1rem 1rem 3rem; }
  .edit-grid, .grid-2, .settings-grid { grid-template-columns: 1fr; }
  .time-grid { grid-template-columns: 1fr 1fr; }
  .time-grid > input[name^=tt_location], .time-grid > input[name^=tt_note] { grid-column: span 2; }
  .row-head { display: none; }
  .rows .row { background: #fafaf8; padding: .6rem; border-radius: 8px; }
  .coach-grid { grid-template-columns: 1fr 1fr; }
  .list thead { display: none; }
  .list tr { display: block; border-bottom: 1px solid var(--line); padding: .5rem; }
  .list td { display: flex; gap: .6rem; border: 0; padding: .2rem .4rem; }
  .list td::before { content: attr(data-label); font-size: .72rem; text-transform: uppercase; color: var(--muted); min-width: 90px; }
  .col-actions { width: auto; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-actions .btn { padding: .5rem .7rem; font-size: .85rem; }
}
.rows [hidden], [data-tpl] { display: none !important; }

.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 1rem; }
.setup-h { font-size: 1rem; margin: .6rem 0 0; border-bottom: 1px solid var(--line); padding-bottom: .3rem; }
.login-card input[type=color] { height: 42px; padding: 3px; }
@media (max-width: 700px) { .grid-3 { grid-template-columns: 1fr; } }
/* Logo & Farben */
.design-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.2rem; align-items: start; }
.logo-row { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; align-items: start; }
.logo-prev { width: 120px; height: 120px; border-radius: 14px; border: 1px solid var(--line); display: grid; place-items: center; background: repeating-conic-gradient(#f3f3ef 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.logo-prev img { max-width: 100px; max-height: 100px; object-fit: contain; }
.color-in { display: flex; gap: .5rem; }
.color-in input[type=color] { width: 60px; height: 42px; padding: 2px; border: 1px solid #d0d0c8; border-radius: 8px; }
.color-in input[type=text] { font-family: ui-monospace, monospace; text-transform: uppercase; }
.presets { display: flex; flex-wrap: wrap; gap: .5rem; }
.preset { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .25rem .7rem .25rem .3rem; cursor: pointer; font: inherit; font-size: .82rem; }
.preset span { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #0002; }
.preset span + span { margin-left: -6px; }
.preset em { font-style: normal; margin-left: .45rem; }
.preset:hover { border-color: #999; }
.pv { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); font-size: .85rem; }
.pv-top { height: 14px; background: var(--d); }
.pv-head { display: flex; align-items: center; gap: .6rem; padding: .7rem; background: #fff; }
.pv-head img { width: 40px; height: 40px; object-fit: contain; }
.pv-head div { display: flex; flex-direction: column; line-height: 1.1; }
.pv-head strong { font-family: 'Barlow Condensed', sans-serif; text-transform: uppercase; font-size: 1.1rem; }
.pv-head small { color: var(--muted); font-size: .7rem; }
.pv-cta { margin-left: auto; background: var(--p); color: var(--op); font-weight: 700; padding: .3rem .6rem; border-radius: 6px; font-size: .75rem; text-transform: uppercase; }
.pv-stripe { height: 5px; background: repeating-linear-gradient(-45deg, var(--p) 0 8px, var(--d) 8px 16px); }
.pv-hero { background: var(--d); color: #fff; padding: 1.2rem .9rem; display: flex; flex-direction: column; gap: .3rem; }
.pv-hero small { color: var(--pd); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; }
.pv-hero b { font-family: 'Barlow Condensed', sans-serif; font-size: 1.5rem; text-transform: uppercase; font-style: italic; line-height: 1; }
.pv-btn { align-self: flex-start; background: var(--p); color: var(--op); font-weight: 700; padding: .35rem .8rem; border-radius: 999px; font-size: .75rem; text-transform: uppercase; margin-top: .3rem; }
.pv-body { display: flex; gap: .6rem; align-items: center; padding: .9rem; background: #fff; }
.pv-date { width: 44px; height: 44px; border-radius: 9px; background: var(--p); color: var(--op); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; font-size: .65rem; text-transform: uppercase; }
.pv-date b { font-size: 1.1rem; }
.pv-body div { display: flex; flex-direction: column; }
.pv-body small { color: var(--muted); }
.pv-foot { background: var(--d); color: #bbb; padding: .6rem .9rem; font-size: .72rem; border-top: 4px solid var(--p); }
@media (max-width: 1100px) { .design-grid { grid-template-columns: 1fr; } }
.field input:not([type]) { font: inherit; padding: .6rem .75rem; border: 1px solid #d0d0c8; border-radius: 9px; background: #fff; width: 100%; }
.field input:not([type]):focus { outline: 0; border-color: var(--k); box-shadow: 0 0 0 3px color-mix(in srgb, var(--y) 50%, transparent); }
.btn-primary { background: var(--y); color: var(--on-y); border-color: var(--y); }
.btn-primary:hover { background: color-mix(in srgb, var(--y) 85%, #000); border-color: color-mix(in srgb, var(--y) 85%, #000); }

/* Vereinsheim-Produktbranding */
.side-product { display: inline-flex; align-items: center; gap: .3rem; }
.side-product img { width: 16px; height: 13px; }
.product-logo { height: 46px; width: auto; align-self: flex-start; }
.product-foot { display: flex; align-items: center; gap: .6rem; border-top: 1px solid var(--line); padding-top: .9rem; margin-top: .3rem; color: var(--muted); font-size: .78rem; }
.product-foot img { height: 20px; width: auto; }
