/* SV Ennetach – 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; --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); 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(--k); 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); 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); 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: #fffbe0; }
.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); }
/* 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:not([type]), .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, .ms-row input, .ms-row select, .ms-dept-set-head input[type=text], .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 rgba(252,220,0,.5); }
.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; }

/* ===================== Mitgliedsanträge ===================== */
.pill-warn { background: #fff3cd; color: #7a5a00; }
.pill-info { background: #e3eefc; color: #1d4f91; }
.pill-bad { background: #fdecec; color: #a32020; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .8rem; }
.ms-inline { display: inline; margin-left: .3rem; }
.ms-dash-alert { display: flex; align-items: center; gap: 1rem; background: color-mix(in srgb, var(--y) 14%, #fff); border: 1.5px solid var(--y); border-radius: var(--r); padding: 1rem 1.2rem; margin-bottom: 1.4rem; text-decoration: none; color: inherit; }
.ms-dash-alert > .ai { width: 28px; height: 28px; }
.ms-dash-alert span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.ms-dash-alert small { color: var(--muted); }
.ms-pd-list { display: flex; flex-wrap: wrap; gap: .3rem; }
.ms-pd { opacity: .95; }
.ms-pd img { width: 16px; height: 16px; object-fit: contain; }
.ms-pd-offen { background: #fff3cd !important; }
.ms-pd-bestaetigt { background: #e3f5e6 !important; }
.ms-pd-abgelehnt { background: #fdecec !important; text-decoration: line-through; }
.ms-pd.is-mine { outline: 2px solid var(--k); }
.ms-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ms-head h2 .pill { vertical-align: middle; font-size: .8rem; }
.ms-view-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 1.2rem; align-items: start; }
.ms-decide { border: 2px solid var(--y); }
.ms-decide-list { display: grid; gap: .4rem; margin-bottom: 1rem; }
.ms-vperson { border-bottom: 1px solid var(--line); padding: .7rem 0; }
.ms-vperson-head { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: baseline; margin-bottom: .3rem; }
.ms-vrow { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; font-size: .92rem; }
.ms-vrow > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ms-vdept .dept-pill img { width: 16px; height: 16px; object-fit: contain; }
.ms-vdept .pill { margin-left: .3rem; }
.ms-vdept small { display: block; margin-top: .15rem; }
.ms-vflat { font-weight: 600; padding-top: .6rem; }
.ms-vtotal { font-weight: 700; font-size: 1.05rem; border-top: 2px solid var(--k); margin-top: .5rem; padding-top: .6rem; }
.ms-dl { display: grid; grid-template-columns: 120px 1fr; gap: .4rem .8rem; margin: 0; font-size: .92rem; }
.ms-dl dt { color: var(--muted); }
.ms-dl dd { margin: 0; }
.ms-consents { list-style: none; margin: 0; padding: 0; font-size: .88rem; display: grid; gap: .25rem; }
.ms-consents li::before { content: '✓'; display: inline-block; width: 1.3rem; font-weight: 700; color: #1e7b33; }
.ms-consents li.no { color: var(--muted); }
.ms-consents li.no::before { content: '–'; color: #aaa; }
.ms-log { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .88rem; max-height: 320px; overflow: auto; }
.ms-rows { display: grid; gap: .4rem; margin-bottom: .6rem; }
.ms-row { display: grid; grid-template-columns: minmax(180px, 1.6fr) minmax(150px, 1fr) 90px 90px 110px 36px; gap: .5rem; align-items: center; }
.ms-row-tier { grid-template-columns: minmax(180px, 1.6fr) 100px 100px 110px 36px; }
.ms-row-head { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.ms-row input, .ms-row select { width: 100%; }
.ms-row[data-template] { opacity: .75; }
.ms-dept-set { border-top: 1px solid var(--line); padding: .9rem 0 .4rem; }
.ms-dept-set-head { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.ms-dept-set-head .check { margin: 0; }
.ms-dept-set-head input[type=text] { min-width: 280px; flex: 0 1 380px; }
.ms-dept-set .dept-pill img { width: 18px; height: 18px; object-fit: contain; }
@media (max-width: 1000px) { .ms-view-grid { grid-template-columns: 1fr; } .ms-row, .ms-row-tier { grid-template-columns: 1fr 1fr; } .ms-row-head { display: none; } }

.dept-pill { --c: #b5b5ad; }
.ms-veff { border-top: 0; margin-top: 0; color: #1e7b33; }
.ms-vtotal small { font-weight: 400; }
