/* Admin-Bereich – Jugendarbeit Radstadt */
@font-face { font-family: "Inter"; src: url("../fonts/inter-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/interdisplay-extrabold.woff") format("woff"); font-weight: 800; font-display: swap; }

:root { --navy: #03224C; --navy-2: #0A2F63; --red: #C10524; --red-2: #A0031D; --ink: #0E1A2B; --text: #2B3A4E; --muted: #6A788B; --line: #E2E7EF; --bg: #F3F6FA; --ok: #0B7A51; --radius: 14px; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 "Inter", system-ui, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--navy); }
h1, h2 { font-family: "Inter Display", "Inter", sans-serif; color: var(--navy); letter-spacing: -.01em; margin: 0; }
h2 { font-size: 1.15rem; margin-bottom: .8rem; }
code { background: var(--bg); padding: .1em .4em; border-radius: 5px; font-size: .88em; }
.ico { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.18em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: rgba(255,255,255,.8); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.side-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 4px 8px 16px; }
.side-brand img { width: 92px; }
.side-brand span { font: 800 .75rem/1 "Inter"; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--red); padding: .45em .6em; border-radius: 6px; }
.side-h { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: rgba(255,255,255,.45); margin: 18px 10px 6px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: rgba(255,255,255,.85); text-decoration: none; font-weight: 600; }
.side li a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side li a[aria-current] { background: #fff; color: var(--navy); }
.count { margin-left: auto; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; padding: .15em .55em; border-radius: 999px; }
.side-foot { margin-top: auto; padding: 16px 10px 4px; }
.side-foot a { color: rgba(255,255,255,.75); text-decoration: none; display: flex; gap: 8px; align-items: center; font-weight: 600; }

.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 16px; padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top h1 { font-size: 1.35rem; flex: 1; }
.top-user { display: flex; align-items: center; gap: 14px; }
.top-user form { margin: 0; }
.me { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.me-name { font-weight: 600; line-height: 1.2; }
.me-name small { display: block; color: var(--muted); font-weight: 400; font-size: .78rem; }
.side-toggle { display: none; background: none; border: 0; padding: 6px; color: var(--navy); cursor: pointer; }
.side-toggle .ico { width: 24px; height: 24px; }
.content { padding: 24px 28px 64px; max-width: 1200px; }

.btn { display: inline-flex; align-items: center; gap: .4em; padding: .6em 1.1em; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); font: 600 .93rem/1.2 "Inter", sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--navy); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-2); border-color: var(--red-2); color: #fff; }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); }
.btn-sm { padding: .45em .85em; font-size: .87rem; }
.btn-block { width: 100%; justify-content: center; padding: .85em; }
.btn-link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.btn-link:hover { color: var(--navy); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--navy); cursor: pointer; text-decoration: none; font-size: 15px; }
.icon-btn:hover { background: var(--bg); border-color: var(--line); }
.icon-btn.danger:hover { background: #FCE8EB; border-color: #F5C6CF; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }
.flash-success { background: #E3F7EF; color: var(--ok); }
.flash-error { background: #FCE8EB; color: var(--red-2); }
.flash-info { background: #FFF7DD; color: #6B5100; }

.card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 20px 22px; margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.card-head a { font-weight: 600; font-size: .9rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + * { margin-top: 20px; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.q { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; font-weight: 700; color: var(--navy); }
.q:hover { border-color: var(--navy); }
.q .ico { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--red); color: #fff; }
.q:nth-child(2) .ico { background: var(--navy); }
.q:nth-child(3) .ico { background: #E9A400; }
.q:nth-child(4) .ico { background: #19B37A; }
.status-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.status-list li { display: flex; gap: 10px; align-items: center; }
.pill { width: 10px; height: 10px; border-radius: 50%; }
.pill.ok { background: #19B37A; }
.pill.off { background: var(--red); }
.mini { margin: 0 0 14px; padding-left: 18px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-grid a { background: var(--bg); border-radius: 10px; padding: 12px 14px; text-decoration: none; }
.stat-grid b { display: block; font: 800 1.6rem/1.1 "Inter Display", sans-serif; color: var(--navy); }
.stat-grid span { color: var(--muted); font-size: .85rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 8px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list a { text-decoration: none; font-weight: 600; }
.list .d { display: inline-block; min-width: 3.4em; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.list li.unread a { color: var(--red); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar p { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.filters input, .filters select { padding: .5em .7em; border: 1.5px solid var(--line); border-radius: 9px; font: inherit; background: #fff; }
.table-card { padding: 0; overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; background: #FAFBFD; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: #FAFBFD; }
.tbl .actions { text-align: right; white-space: nowrap; width: 1%; }
.tbl .actions form { display: inline; margin: 0; }
.tbl tr.unread td { font-weight: 700; }
.row-link { font-weight: 600; text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.col-photo { width: 52px; }
.thumb { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.thumb.ph { background: var(--bg); color: var(--navy); font-weight: 700; font-size: .75rem; }
.badge { display: inline-block; font-size: .73rem; font-weight: 700; padding: .25em .6em; border-radius: 6px; background: #EEF1F5; color: var(--muted); white-space: nowrap; }
.badge.ok { background: #E3F7EF; color: var(--ok); }
.badge.cat-juz { background: var(--navy); color: #fff; }
.badge.cat-jep { background: var(--red); color: #fff; }
.badge.cat-verein { background: #E7EDF7; color: var(--navy); }
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--muted); }
.empty-state { padding: 28px; text-align: center; color: var(--muted); margin: 0; }
.pager { display: flex; gap: 6px; }
.pager a { padding: .4em .8em; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; }
.pager a[aria-current] { background: var(--navy); color: #fff; }

.crumb { margin: 0 0 14px; font-weight: 600; }
.crumb a { text-decoration: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid .full, .form-grid .f:not(.half) { grid-column: 1 / -1; }
.form-grid h2.full { margin: 8px 0 -4px; }
.form-grid h2.full:first-child { margin-top: 0; }
.f { display: grid; gap: 6px; align-content: start; }
.f > label { font-weight: 600; color: var(--navy); font-size: .9rem; }
.f input:not([type=checkbox]):not([type=file]), .f select, .f textarea, .login-box input { width: 100%; padding: .65em .8em; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
.f input:focus, .f select:focus, .f textarea:focus, .login-box input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(3,34,76,.1); }
.f input:disabled { background: var(--bg); color: var(--muted); }
.f textarea { resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--navy); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }
.check.small { font-size: .85rem; font-weight: 500; margin-top: 8px; }
.help { font-size: .82rem; color: var(--muted); }
.err { font-size: .85rem; color: var(--red); font-weight: 600; }
.has-error input, .has-error select, .has-error textarea, .has-error .rte-box { border-color: var(--red) !important; }
.img-field { display: flex; gap: 16px; align-items: center; }
.img-preview { width: 140px; height: 90px; object-fit: cover; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.current-file { margin: 0; font-size: .9rem; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.form-actions form { margin: 0; }
.form-actions.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 14px; z-index: 5; }
.dup-form { margin-top: 6px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: .45em .9em; background: #fff; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .88rem; }
.card[id] { scroll-margin-top: 80px; }

.hours-tbl { width: 100%; border-collapse: collapse; }
.hours-tbl th { text-align: left; width: 110px; padding: 8px 0; vertical-align: top; color: var(--navy); }
.hours-tbl td { padding: 6px 0; border-top: 1px solid var(--line); }
.hours-tbl tr:first-child td { border-top: 0; }
.slot { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.slot input { padding: .4em .5em; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; }
.msg-meta { display: grid; grid-template-columns: 120px 1fr; gap: 6px 16px; margin: 0 0 18px; }
.msg-meta dt { font-weight: 700; color: var(--navy); }
.msg-meta dd { margin: 0; }
.msg-body { background: var(--bg); border-radius: 10px; padding: 16px 18px; margin-bottom: 18px; white-space: normal; }

/* Editor */
.rte-box { border: 1.5px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.rte-box:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(3,34,76,.1); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: #FAFBFD; position: sticky; top: 63px; z-index: 3; }
.rte-bar button { min-width: 34px; height: 32px; border: 0; background: none; border-radius: 7px; cursor: pointer; font: 600 .88rem "Inter", sans-serif; color: var(--navy); padding: 0 8px; }
.rte-bar button:hover { background: #EEF1F5; }
.rte-bar button.on { background: var(--navy); color: #fff; }
.rte-bar .sep { width: 1px; background: var(--line); margin: 4px 4px; }
.rte-area { min-height: 260px; max-height: 70vh; overflow-y: auto; padding: 14px 18px; outline: none; font-size: 1rem; line-height: 1.65; }
.rte-area:empty::before { content: "Text eingeben …"; color: var(--muted); }
.rte-area h2 { font-size: 1.35rem; margin: 1em 0 .4em; }
.rte-area h3 { font-size: 1.1rem; margin: 1em 0 .4em; color: var(--navy); }
.rte-area p { margin: 0 0 .9em; }
.rte-area img { max-width: 100%; border-radius: 8px; }
.rte-area blockquote { border-left: 4px solid var(--red); margin: 1em 0; padding: .4em 1em; background: var(--bg); }
.rte-source { width: 100%; min-height: 260px; border: 0; padding: 14px 18px; font: 13px/1.5 ui-monospace, Menlo, monospace; resize: vertical; }
.rte-box .rte-source { display: none; }
.rte-box.src .rte-source { display: block; }
.rte-box.src .rte-area { display: none; }
.rte-status { font-size: .8rem; color: var(--muted); padding: 4px 10px; }

/* Login */
.login-body { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(160deg, var(--navy), var(--navy-2)); padding: 16px; }
.login-box { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 32px; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.login-box img { margin: 0 auto 8px; display: block; }
.login-box h1 { text-align: center; font-size: 1.3rem; margin-bottom: 18px; }
.login-box .f { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 600; color: var(--navy); }
.login-back { text-align: center; margin: 16px 0 0; font-size: .9rem; }
.login-back a { color: var(--muted); }

@media (max-width: 1000px) {
  .quick { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .side-toggle { display: block; }
  .top { padding: 12px 16px; }
  .me-name { display: none; }
  .content { padding: 18px 16px 64px; }
  .form-grid { grid-template-columns: 1fr; }
  .rte-bar { top: 59px; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 10px 14px; border-top: 1px solid var(--line); }
  .tbl td { border: 0; padding: 2px 0; }
  .tbl td[data-label]:not(.col-title):not(.col-name)::before { content: attr(data-label) ": "; color: var(--muted); font-size: .82rem; }
  .tbl .actions { text-align: left; width: auto; padding-top: 6px; }
  .col-photo { display: none !important; }
}
