:root {
  --bg: #0b1220;
  --panel: #121a2a;
  --panel-2: #172133;
  --line: #243146;
  --text: #e7edf7;
  --muted: #93a1b7;
  --green: #22c55e;
  --green-2: #16a34a;
  --red: #ef4444;
  --yellow: #eab308;
  --amber: #f59e0b;
  --orange: #f97316;
  --purple: #8b5cf6;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: linear-gradient(180deg,#08101d,#0f172a); color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: rgba(5,10,18,.65); border-right: 1px solid var(--line); padding: 24px 18px; display:flex; flex-direction:column; gap:18px; position:sticky; top:0; height:100vh; overflow:hidden; min-height:0; }
.brand, .login-brand { display:flex; gap:12px; align-items:center; }
.brand-logo { width: 54px; height: 54px; object-fit: contain; border-radius: 14px; background:#0a0f18; padding:4px; box-shadow: 0 0 0 1px rgba(34,197,94,.16); }
.brand-title { font-size: 1.1rem; font-weight: 700; }
.brand-sub { color: var(--muted); font-size: .85rem; }
.nav { display:flex; flex-direction:column; gap:6px; overflow-y:auto; min-height:0; padding-right:4px; scrollbar-width: thin; scrollbar-color: rgba(34,197,94,.45) rgba(15,23,42,.45); }
.nav::-webkit-scrollbar { width: 8px; }
.nav::-webkit-scrollbar-track { background: rgba(15,23,42,.45); border-radius: 999px; }
.nav::-webkit-scrollbar-thumb { background: rgba(34,197,94,.45); border-radius: 999px; }
.nav a { padding: 9px 11px; border-radius: 10px; color: var(--text); background: transparent; border:1px solid transparent; transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease; }
.nav a:hover, .nav a:focus { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.2); color:#d9f99d; outline:none; transform: translateX(2px); }
.nav a.is-active { background: rgba(34,197,94,.16); border-color: rgba(34,197,94,.38); color:#bbf7d0; box-shadow: inset 3px 0 0 rgba(34,197,94,.85); }
.menu-alert {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  margin-left:6px;
  border-radius:999px;
  background: rgba(239,68,68,.22);
  border:1px solid rgba(239,68,68,.4);
  color:#fecaca;
  font-size:.78rem;
  font-weight:800;
}
.sidebar-footer { margin-top:auto; display:grid; gap:12px; flex-shrink:0; }
.user-chip { padding:10px 12px; background:var(--panel); border:1px solid var(--line); border-radius:12px; }
.user-chip-link { display:block; font-weight:700; }
.user-chip-link:hover, .user-chip-link:focus { background: rgba(34,197,94,.1); outline:none; }
.main-content {
    display: block;
    padding: 32px 24px;
    align-self: start;
}
.card, .stat-card { background: rgba(18,26,42,.92); border:1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 14px 40px rgba(0,0,0,.18); }
.page-head { margin-bottom: 20px; }
.page-head.split { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; }
h1,h2 { margin:0 0px 8px; }
h2 { font-size:1.1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.btn, .btn-primary, .btn-outline, .btn-danger { border:none; border-radius:10px; padding:0 18px; height:42px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; font-weight:600; font-size:14px; line-height:1; box-sizing:border-box; }
.btn-full { width:100%; }
.btn-small { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-primary { background: linear-gradient(180deg,var(--green),var(--green-2)); color:white; }
.btn-outline { background: transparent; color: var(--text); border:1px solid var(--line); }
.btn-danger { background: rgba(239,68,68,.14); color: #fecaca; border:1px solid rgba(239,68,68,.28); }
.flash { padding: 12px 14px; border-radius: 14px; margin-bottom: 16px; }
.flash-success { background: rgba(34,197,94,.12); border:1px solid rgba(34,197,94,.24); color:#bbf7d0; }
.flash-error { background: rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.24); color:#fecaca; }
.flash-link { color: #fff; text-decoration: underline; font-weight: 800; }
.stats-grid { display:grid; gap:16px; margin-bottom:20px; }
.stats-grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stats-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.stat-card span { display:block; color: var(--muted); margin-bottom: 8px; }
.stat-card strong { font-size: 2rem; }
.stat-card.compact strong { font-size: 1.5rem; }
.stat-card-link { display: block; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.stat-card-link:hover, .stat-card-link:focus { border-color: rgba(34,197,94,.42); background: rgba(34,197,94,.08); transform: translateY(-2px); outline: none; }
.two-col { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:20px; }
    .two-col.wide-left {
        display: grid;
        grid-template-columns: 1.7fr .9fr;
        gap: 20px;
        align-items: start; /* DAS ist der Fix */
    }
.section-head, .space-between { display:flex; justify-content:space-between; gap:16px; }
.space-between.start { align-items:flex-start; }
.space-between.center { align-items:center; }
.section-head.center { align-items:flex-start; margin-bottom:18px; }
.list-stack { display:grid; gap:12px; }
.list-item { display:flex; justify-content:space-between; align-items:center; gap:12px; background: var(--panel-2); border:1px solid var(--line); padding: 14px; border-radius: 14px; }
.block-item { align-items:flex-start; }
.badge, .tag { display:inline-flex; align-items:center; border-radius:999px; padding:7px 12px; font-size:.85rem; font-weight:600; border:1px solid transparent; gap:8px; line-height:1; width:auto; }
.tag { background: rgba(255,255,255,.04); border-color: var(--line); color: var(--text); }
.tag-warn { background: rgba(234,179,8,.12); color:#fde68a; border-color: rgba(234,179,8,.25); }
.badge-gray { background: rgba(148,163,184,.14); border-color: rgba(148,163,184,.28); color:#cbd5e1; }
.badge-yellow { background: rgba(234,179,8,.16); border-color: rgba(234,179,8,.28); color:#fde68a; }
.badge-amber { background: rgba(245,158,11,.16); border-color: rgba(245,158,11,.28); color:#fcd34d; }
.badge-orange { background: rgba(249,115,22,.16); border-color: rgba(249,115,22,.28); color:#fdba74; }
.badge-red { background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.28); color:#fca5a5; }
.badge-red-strong { background: rgba(127,29,29,.55); border-color: rgba(239,68,68,.45); color:#fee2e2; }
.badge-purple { background: rgba(139,92,246,.16); border-color: rgba(139,92,246,.28); color:#ddd6fe; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse: collapse; }
th,td { padding: 12px 10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.toolbar, .inline-form { display:flex; gap:12px; flex-wrap:wrap; align-items:end; }
.stack-form { display:grid; gap:12px; }
.note-compose { display: grid; gap: 12px; }
.note-compose > summary { width: fit-content; list-style: none; cursor: pointer; }
.note-compose > summary::-webkit-details-marker { display: none; }
label { display:grid; gap:6px; color: var(--muted); }
.field-group { display: grid; gap: 8px; color: var(--muted); }
.share-user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.check-card { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,0.03); color: var(--text); cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.check-card:hover { border-color: rgba(61, 220, 151, .45); background: rgba(61, 220, 151, .08); transform: translateY(-1px); }
.check-card input { width: 16px; height: 16px; accent-color: var(--accent); }
.check-card span { min-width: 0; overflow-wrap: anywhere; }
input[type=text], input[type=password], input[type=date], input[type=file], select, textarea { width:100%; border-radius:12px; border:1px solid var(--line); background:#0e1625; color:var(--text); padding:12px 13px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(34,197,94,.28); border-color: rgba(34,197,94,.4); }
.detail-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:14px; }
.detail-grid > div { background: var(--panel-2); border:1px solid var(--line); border-radius:14px; padding:14px; }
.detail-grid > div > span { display:block; color: var(--muted); margin-bottom:6px; font-size:.85rem; }
.detail-grid strong { font-size:1rem; }
.stack-gap { display:grid; gap:20px; }
.two-up { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }
.top-gap { margin-top:16px; }
.top-gap-half { margin-top:8px; }
.inline-gap { display:flex; gap:8px; align-items:center; }
.wrap { flex-wrap:wrap; }
.anchor-target { display:block; scroll-margin-top: 18px; }
.image-grid { display:grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
.image-card { padding:10px; border-radius:14px; border:1px solid var(--line); background: var(--panel-2); }
.image-card img { width:100%; height:110px; object-fit:cover; border-radius:10px; }
.image-card a { display:block; cursor: zoom-in; }
.media-thumb { width:96px; height:64px; object-fit:cover; border-radius:8px; border:1px solid var(--line); }

.incident-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.incident-image-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    align-content: start;
}

.incident-image-card a {
    display: block;
    cursor: zoom-in;
}

.incident-image-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    background: #020617;
}

.incident-image-card input[type="text"] {
    min-height: 38px;
}

.incident-image-card .btn-small {
    width: fit-content;
}

.important-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.important-image-card {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    align-content: start;
}

.important-image-card a {
    display: block;
    cursor: zoom-in;
}

.important-image-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    background: #020617;
}

.important-image-meta {
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.important-image-used {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255,255,255,0.03);
    font-size: .92rem;
}

.important-image-used label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.important-image-used input {
    width: 16px;
    height: 16px;
    accent-color: #22c55e;
}

.important-image-used input:checked + span {
    color: #bbf7d0;
    font-weight: 700;
}

.important-image-used.is-readonly {
    cursor: default;
}

.important-image-card input[type="text"] {
    min-height: 42px;
}

.important-image-card .btn-small {
    width: fit-content;
}

.important-image-copy {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1rem;
    background: rgba(2,6,23,.78);
    backdrop-filter: blur(4px);
}

.important-image-copy.is-copied {
    border-color: rgba(34,197,94,.58);
    color: #bbf7d0;
}
.lightbox-open-body { overflow:hidden; }
.lightbox-overlay { position:fixed; inset:0; z-index:1000; background:rgba(3,7,18,.86); display:grid; place-items:center; padding:24px; }
.lightbox-overlay[hidden] { display:none; }
.lightbox-panel { width:min(1100px, 100%); max-height:calc(100vh - 48px); display:grid; gap:14px; }
.lightbox-head { display:flex; justify-content:space-between; align-items:center; gap:14px; color:var(--text); }
.lightbox-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lightbox-image { width:100%; max-height:calc(100vh - 130px); object-fit:contain; border-radius:8px; background:#020617; border:1px solid var(--line); }
.login-body { min-height:100vh; display:grid; place-items:center; }
.login-shell { width:min(460px, calc(100% - 28px)); display:grid; gap:20px; }
.login-card h1 { margin-bottom:4px; }
@media (max-width: 1080px) {
    .app-shell {
        grid-template-columns: 1fr;
        display: flex;
        min-height: 100vh;
        align-items: stretch;
    }
  .sidebar { position:static; height:auto; overflow:visible; }
  .nav { overflow:visible; padding-right:0; }
  .stats-grid.four, .stats-grid.three, .two-col, .two-col.wide-left, .detail-grid, .two-up { grid-template-columns: 1fr; }
  .main-content { padding: 18px; }
}

/* Strike icons and labels */
.strike-label { display:inline-flex; align-items:center; gap:8px; line-height:1; white-space:nowrap; }
.strike-label-sm { gap:6px; }
.strike-icon,
.strike-icon-sm,
.strike-icon-md,
.strike-icon-lg {
  display:inline-block;
  flex:0 0 auto;
  object-fit:contain;
  background:transparent !important;
  border:none !important;
  border-radius:0 !important;
  box-shadow:none !important;
  vertical-align:middle;
}
.strike-icon-sm { width:18px !important; height:18px !important; }
.strike-icon-md { width:28px !important; height:28px !important; }
.strike-icon-lg { width:84px !important; height:84px !important; }
.strike-emoji,
.strike-emoji-sm,
.strike-emoji-md,
.strike-emoji-lg {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  background:transparent !important;
  border:none !important;
  border-radius:0 !important;
  box-shadow:none !important;
  vertical-align:middle;
}
.strike-emoji-sm { font-size:18px !important; }
.strike-emoji-md { font-size:26px !important; }
.strike-emoji-lg { font-size:84px !important; }
.strike-text { display:inline; line-height:1; white-space:nowrap; }

/* Keep player detail strike badges consistent with players.php */
.player-detail-strike {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 28px;
}
.player-detail-strike-stat {
  min-height: 0;
  margin-top: 4px;
}
.player-detail-strike .badge,
.player-detail-strike-stat .badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 7px 12px;
  min-height: 0;
  line-height: 1;
  width: auto;
}
.player-detail-strike .strike-label,
.player-detail-strike-stat .strike-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  line-height: 1;
  white-space: nowrap;
}
.player-detail-strike .strike-text,
.player-detail-strike-stat .strike-text {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
  white-space: nowrap;
}

/* Nav subsections */
.nav-section { display: grid; gap: 4px; margin-top: 4px; }
.nav-section-title { padding: 8px 11px 2px; font-weight: 700; color: var(--text); }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin-left: 8px; padding-left: 9px; border-left: 1px solid var(--line); }
.nav-sub a { padding: 6px 10px; border-radius: 9px; color: var(--muted); font-size: 0.93rem; }
.nav-sub a:hover { background: rgba(34,197,94,.08); color: var(--text); }

/* Filters and toggles */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filter-bar input[type="text"], .filter-bar select { min-width: 220px; }
.filter-bar .btn { width: auto; min-width: 0; padding: 10px 16px; }
.toggle-group { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; width: auto; min-width: 0; flex: 0 0 auto; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); cursor: pointer; transition: all .2s ease; }
.toggle input { display: none; }
.toggle span { font-size: 0.95rem; color: var(--muted); white-space: nowrap; }
.toggle:hover { background: rgba(34,197,94,0.08); }
.toggle input:checked + span { color: #22c55e; font-weight: 600; }
.toggle input:checked + span::before { content: "✓ "; color: #22c55e; }

.empty-state { padding: 18px; text-align: center; color: var(--muted); background: rgba(255,255,255,0.03); border: 1px dashed var(--line); border-radius: 14px; }

.incident-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.incident-actions .btn,
.incident-actions .btn-danger {
    min-width: 130px;
}

/* etwas mehr Abstand für Bearbeiten/Löschen */
.incident-actions {
    margin-top: 14px;
}

.player-main-column {
    min-width: 0;
}

    .activity-log-scroll::-webkit-scrollbar {
        width: 8px;
    }

    .activity-log-scroll::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.14);
        border-radius: 999px;
    }

    .activity-log-scroll::-webkit-scrollbar-track {
        background: transparent;
    }


.player-main-column,
.activity-column {
    min-width: 0;
}


.activity-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.activity-log-scroll {
    max-height: 370px;
    overflow-y: auto;
}

/* =========================
   INCIDENTS / VERSTÖSSE
   ========================= */

.incidents-section {
    margin-top: 32px;
    padding-top: 8px;
}

.incident-card {
    padding: 20px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: none;
    position: relative;
}

    .incident-card::before {
        display: none !important;
        content: none !important;
    }

.incidents-section .list-stack > .incident-card + .incident-card {
    margin-top: 22px;
}

.incidents-section .list-stack > .incident-card:nth-child(odd) {
    background: rgba(255,255,255,0.025);
}

.incidents-section .list-stack > .incident-card:nth-child(even) {
    background: rgba(255,255,255,0.045);
}

.incident-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 14px;
}

.incident-left {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.incident-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-top: 0;
}

    .incident-actions .btn,
    .incident-actions .btn-danger {
        min-width: 130px;
    }

.incident-card p {
    margin: 14px 0 0;
}

.incident-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    margin-top: 18px;
}

    .incident-meta > div {
        min-width: 0;
        padding: 16px 18px;
        border-radius: 12px;
        background: rgba(255,255,255,0.015);
        border: 1px solid rgba(255,255,255,0.05);
        box-shadow: none;
    }

.incident-upload-toggle {
    margin-top: 14px;
}

    .incident-upload-toggle summary {
        list-style: none;
        cursor: pointer;
        width: fit-content;
    }

        .incident-upload-toggle summary::-webkit-details-marker {
            display: none;
        }

    .incident-upload-toggle[open] summary {
        margin-bottom: 10px;
    }

.incident-upload-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 12px;
    align-items: stretch;
}

    .incident-upload-form input[type="file"],
    .incident-upload-form input[type="text"] {
        width: 100%;
    }

    .incident-upload-form .btn {
        width: fit-content;
    }

.incident-detail-fields {
    display: grid;
    gap: 12px;
}

.incident-detail-fields[hidden] {
    display: none;
}

.image-grid {
    margin-top: 14px;
}

@media (max-width: 1080px) {
    .incident-header {
        flex-direction: column;
        align-items: stretch;
    }

    .incident-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .incident-meta {
        grid-template-columns: 1fr;
    }
}

.incident-card p {
    margin: 16px 0 0;
}

.incidents-section .list-stack {
    gap: 22px;
}

    .incidents-section .list-stack > .incident-card {
        width: 100%;
    }

.incident-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    margin-top: 18px;
}

    .incident-meta > div {
        min-width: 0;
        padding: 16px 18px;
        border-radius: 12px;
        background: rgba(255,255,255,0.02);
        border: 1px solid rgba(255,255,255,0.06);
        box-shadow: none;
    }

.incident-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}

.incident-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 14px;
}

.incident-left {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.card {
    padding: 24px;
}

.section-head {
    margin-bottom: 18px;
}

html {
    scroll-behavior: smooth;
}

/* Mehr Luft für Überschriften in Cards */
.card > .section-head:first-child,
.card > h2:first-child {
    padding-top: 10px;
}

.card > .section-head:first-child {
    margin-bottom: 18px;
}

td {
    vertical-align: middle;
    line-height: 1.4;
}

    td .badge {
        display: inline-flex;
        align-items: center;
    }

table td .inline-gap.wrap {
    margin-top: 0 !important;
    display: inline-flex;
    align-items: center;
}

.garage-check-form {
    display: inline-flex;
    margin: 0;
}

.garage-check-btn {
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.03);
    color: var(--text);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .garage-check-btn.is-checked {
        background: rgba(34,197,94,0.12);
        border-color: rgba(34,197,94,0.28);
    }

.garage-check-readonly {
    cursor: default;
    opacity: .8;
}

.garage-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(245,158,11,0.12), rgba(245,158,11,0.06));
    border: 1px solid rgba(245,158,11,0.28);
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

    .garage-alert:hover {
        transform: translateY(-1px);
        border-color: rgba(245,158,11,0.4);
        background: linear-gradient(180deg, rgba(245,158,11,0.16), rgba(245,158,11,0.08));
    }

.garage-alert-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fcd34d;
    background: rgba(245,158,11,0.14);
    border: 1px solid rgba(245,158,11,0.24);
}

.garage-alert-content {
    display: grid;
    gap: 8px;
}

.garage-alert-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fde68a;
}

.garage-alert-item {
    color: var(--text);
    line-height: 1.45;
}

.stat-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    background: rgba(255,255,255,0.02);
}

.stat-row-link,
.table-link {
    transition: border-color .16s ease, background .16s ease, transform .16s ease, color .16s ease;
}

.stat-row-link:hover,
.stat-row-link:focus {
    border-color: rgba(34,197,94,.38);
    background: rgba(34,197,94,.08);
    transform: translateY(-1px);
    outline: none;
}

.table-link {
    color: #bbf7d0;
    font-weight: 700;
}

.table-link:hover,
.table-link:focus {
    color: #fff;
    text-decoration: underline;
    outline: none;
}

.stat-list-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.stat-list-value {
    flex: 0 0 auto;
    font-weight: 700;
    color: var(--text);
}
.stats-bottom-block {
    margin-top: 28px;
}

.player-markings-cell {
    vertical-align: middle;
}

.player-markings-icons {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 0 !important;
}

.marking-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    font-size: 1.1rem;
    line-height: 1;
    cursor: default;
}

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}


/* Rollenfarben */
.tag-owner {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.tag-admin {
    background: rgba(0, 150, 255, 0.12);
    color: #4db3ff;
    border: 1px solid rgba(0, 150, 255, 0.25);
}

.tag-trial {
    background: rgba(180, 180, 180, 0.12);
    color: #aaa;
    border: 1px solid rgba(180, 180, 180, 0.25);
}

.link-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.admin-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text);
}

.admin-user-toggle:hover {
    color: #bbf7d0;
}

.toggle-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--muted);
    transition: transform .18s ease, color .18s ease;
}

.admin-user-toggle[aria-expanded="true"] .toggle-caret {
    transform: rotate(90deg);
    color: var(--green);
}

.admin-user-details td {
    padding-top: 0;
}

.admin-user-detail-panel {
    margin: 0 0 8px 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
}

.admin-user-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px 18px;
    align-items: end;
}

.admin-user-detail-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: .85rem;
}

.admin-user-detail-grid strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.admin-history-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 8px;
}

.admin-history-list div {
    padding: 9px 10px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    background: rgba(255,255,255,0.025);
}

.admin-history-list span {
    margin-bottom: 4px;
    font-size: .78rem;
}

.admin-history-list strong {
    display: block;
    font-size: 1.05rem;
}

.profile-password-box {
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.profile-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-stat-grid div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-2);
}

.profile-stat-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: .85rem;
}

.profile-stat-grid strong {
    font-size: 1.45rem;
}

.profile-readonly-grid {
    grid-template-columns: 1fr;
}

.note-board-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-2);
}

.note-board-card-due {
    border-color: rgba(239,68,68,.32);
    background: rgba(239,68,68,.08);
}

.note-text {
    margin-bottom: 10px;
}

.note-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: .82rem;
}

.note-due {
    color: #bbf7d0;
}

.note-due-overdue {
    color: #fecaca;
    font-weight: 700;
}

.team-comments {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    scroll-behavior: smooth;
}

.team-comments-scroll {
    max-height: 620px;
    overflow-y: auto;
    padding-right: 6px;
}

.team-comments-scroll::-webkit-scrollbar {
    width: 8px;
}

.team-comments-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, .35);
    border-radius: 999px;
}

.team-comments-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
    border-radius: 999px;
}

.team-comment {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 12px 12px 22px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
}

.comment-edited {
    position: absolute;
    right: 12px;
    bottom: 8px;
    color: var(--muted);
    font-size: .72rem;
    opacity: .75;
}

.team-comment .btn-danger {
    height: 34px;
    padding: 0 12px;
}

.note-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.dashboard-notes-card {
    margin-bottom: 20px;
}

.dashboard-note-row {
    margin-bottom: 20px;
}

.dashboard-section {
    margin-top: 20px;
    margin-bottom: 20px;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
    padding: 42px 42px;
    border: 1px solid rgba(148,163,184,.2);
    border-radius: 18px;
    background:
        linear-gradient(90deg, rgba(5,10,18,.78) 0%, rgba(7,17,25,.62) 48%, rgba(8,18,20,.08) 76%, rgba(8,18,20,0) 100%),
        linear-gradient(180deg, rgba(5,10,18,.04) 0%, rgba(5,10,18,.34) 100%),
        url("dashboard-hero-raptor.webp") right center / auto 100% no-repeat,
        #061016;
    box-shadow: 0 18px 52px rgba(0,0,0,.28);
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(1,8,9,.38) 100%);
    opacity: .55;
    pointer-events: none;
}

.dashboard-hero-copy {
    position: relative;
    z-index: 2;
    width: min(70%, 980px);
    max-width: 980px;
    text-shadow: 0 2px 18px rgba(0,0,0,.68);
}

.dashboard-hero h1 {
    font-size: clamp(2.4rem, 4vw, 4.2rem);
    line-height: 1;
    margin-bottom: 14px;
}

.dino-greeting {
    margin: 0;
    max-width: 100%;
    color: #c8d8ea;
    font-size: 1.24rem;
    line-height: 1.72;
}

.dino-greeting strong {
    color: #f8fafc;
}

.dashboard-section > .section-head {
    margin-bottom: 12px;
}

.dashboard-section .period-grid {
    margin-bottom: 0;
}

.dashboard-note-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-note-item {
    display: grid;
    gap: 8px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(15,23,42,.72);
    min-width: 0;
    min-height: 74px;
    align-content: center;
    padding: 14px;
}

.dashboard-note-item:hover {
    border-color: rgba(34,197,94,.35);
    background: rgba(34,197,94,.06);
}

.dashboard-note-item span,
.dashboard-note-item small {
    color: var(--muted);
}

.dashboard-note-item strong {
    overflow-wrap: anywhere;
}

.dashboard-note-due {
    border-color: rgba(239,68,68,.32);
    background: rgba(239,68,68,.08);
}

.note-alert {
    border-color: rgba(239,68,68,.42);
    background: linear-gradient(135deg, rgba(127,29,29,.95), rgba(69,10,10,.92));
}

.note-alert:hover {
    border-color: rgba(248,113,113,.7);
}

.note-alert .garage-alert-icon {
    background: rgba(239,68,68,.22);
    color: #fecaca;
}

.note-alert .garage-alert-title {
    color: #fee2e2;
}

@media (max-width: 1080px) {
    .dashboard-hero {
        min-height: 380px;
        align-items: flex-end;
        background:
            linear-gradient(90deg, rgba(5,10,18,.82) 0%, rgba(7,17,25,.58) 58%, rgba(8,18,20,.12) 100%),
            linear-gradient(180deg, rgba(5,10,18,.06) 0%, rgba(5,10,18,.42) 100%),
            url("dashboard-hero-raptor.webp") right center / auto 100% no-repeat,
            #061016;
    }

    .dashboard-hero-copy {
        width: min(68%, 720px);
    }

    .dashboard-note-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dashboard-hero {
        padding: 28px 24px;
        min-height: 420px;
        background:
            linear-gradient(180deg, rgba(5,10,18,.72) 0%, rgba(5,10,18,.46) 42%, rgba(5,10,18,.72) 100%),
            url("dashboard-hero-raptor.webp") right center / auto 100% no-repeat,
            #061016;
    }

    .dashboard-hero-copy {
        width: 100%;
    }

    .dino-greeting {
        font-size: 1.08rem;
    }
}

.vacation-alert .garage-alert-icon {
    background: rgba(34,197,94,.16);
    border-color: rgba(34,197,94,.32);
    color: #bbf7d0;
}

.vacation-alert {
    background: linear-gradient(180deg, rgba(34,197,94,0.12), rgba(34,197,94,0.06));
    border-color: rgba(34,197,94,0.28);
}

.vacation-alert:hover {
    border-color: rgba(34,197,94,0.42);
    background: linear-gradient(180deg, rgba(34,197,94,0.16), rgba(34,197,94,0.08));
}

.vacation-alert .garage-alert-title {
    color: #bbf7d0;
}

.admin-history-block {
    grid-column: span 2;
}

@media (max-width: 980px) {
    .admin-user-detail-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}

@media (max-width: 640px) {
    .admin-user-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-history-block {
        grid-column: auto;
    }

.admin-history-list {
        grid-template-columns: 1fr;
    }
}

.mini-editor {
    display: grid;
    gap: 0;
}

.mini-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: rgba(15, 23, 42, .82);
}

.mini-editor-field {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
    background: #0e1625;
    color: var(--text);
    padding: 12px 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow-y: auto;
    resize: vertical;
}

.mini-editor-field:focus {
    outline: 2px solid rgba(34,197,94,.28);
    border-color: rgba(34,197,94,.4);
}

.mini-editor-field:empty::before {
    content: attr(data-placeholder);
    color: var(--muted);
    pointer-events: none;
}

.mini-editor-field ul {
    margin: 6px 0 6px 22px;
    padding: 0;
}

.mini-editor-source {
    display: none !important;
}

.mini-editor-btn {
    min-width: 34px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: rgba(15, 23, 42, .92);
    color: var(--text);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.mini-editor-btn:hover {
    border-color: rgba(34, 197, 94, .45);
    background: rgba(34, 197, 94, .12);
    transform: translateY(-1px);
}

.mini-editor-emoji-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 4px;
    padding-left: 10px;
    border-left: 1px solid rgba(148, 163, 184, .18);
}

.rich-text-list {
    margin: 8px 0 8px 22px;
    padding: 0;
}

.rich-text-list li + li {
    margin-top: 4px;
}

.text-emoji {
    display: inline-block;
    vertical-align: -0.08em;
    font-size: 1.08em;
}
