/* ==========================================================================
   CLIMBR — ADMIN CORE CSS  v2.0
   Zentrale Stildatei für alle Admin-Ansichten.
   Lädt nach Bootstrap 5 – überschreibt nur was nötig ist.
   Inline-Styles und Legacy-Klassen (bg-dblau, btn-dblau etc.) werden hier
   durch Bootstrap-Standard-Klassen ersetzt.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   Alle Farben, Radien und Rahmen NUR HIER ändern.
   -------------------------------------------------------------------------- */
:root {
    --color-primary:      #254461;   /* Dunkelblau  */
    --color-primary-dark: #1e3548;
    --color-secondary:    #e0df00;   /* Gelb        */
    --color-success:      #28a745;
    --color-error:        #dc3545;
    --color-warning:      #f6b900;
    --color-bg:           #f8fafc;
    --color-surface:      #ffffff;
    --color-border:       #dee2e6;
    --color-text:         #212529;
    --color-muted:        #6c757d;

    --radius-sm:  4px;   /* Buttons, Inputs, Badges */
    --radius-md:  8px;   /* Modals, Alerts, Toasts  */
    --radius-lg:  14px;  /* Cards                   */

    --border-1:   1px;
    --border-2:   2px;

    --shadow-sm:    0 2px 4px rgba(0,0,0,.05);
    --shadow-md:    0 6px 18px rgba(0,0,0,.08);
    --shadow-focus: 0 0 0 3px rgba(37,68,97,.25);

    /* Bootstrap 5 Overrides */
    --bs-primary:       var(--color-primary);
    --bs-secondary:     var(--color-secondary);
    --bs-border-radius: var(--radius-sm);
    --bs-body-bg:       var(--color-bg);
    --bs-body-color:    var(--color-text);
}

/* --------------------------------------------------------------------------
   2. GLOBAL BASE
   -------------------------------------------------------------------------- */
body { background: var(--color-bg); color: var(--color-text); font-family: 'Oswald','Segoe UI',sans-serif; font-weight: 300; }
h1,h2,h3,h4,h5,h6 { color: var(--color-primary); font-weight: 600; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-secondary); text-decoration: underline; }

/* --------------------------------------------------------------------------
   3. BUTTONS  (radius-sm | border-2 | Kontrast 8.5:1 WCAG AAA)
   Primär  = Dunkelblau / Weiß
   Sekundär = Gelb / Dunkelblau
   -------------------------------------------------------------------------- */
.btn {
    border-radius: var(--radius-sm) !important;
    border-width:  var(--border-2)  !important;
    border-style:  solid            !important;
    font-weight:   600;
    transition:    background .2s, color .2s, border-color .2s;
}
.btn:focus { box-shadow: var(--shadow-focus) !important; outline: none; }

/* Primär & Aliase */
.btn-primary, .btn-dblau {
    background: var(--color-primary)  !important;
    border-color: var(--color-primary) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-dblau:hover {
    background: var(--color-primary-dark) !important;
    border-color: var(--color-primary-dark) !important;
}
.btn-primary:active, .btn-primary.active,
.btn-dblau:active,   .btn-dblau.active {
    background: var(--color-secondary) !important;
    color: var(--color-primary) !important;
}

/* Sekundär & Aliase */
.btn-secondary, .btn-gelb {
    background: var(--color-secondary) !important;
    border-color: var(--color-primary)  !important;
    color: var(--color-primary) !important;
}
.btn-secondary:hover, .btn-gelb:hover {
    background: var(--color-primary)   !important;
    color: var(--color-secondary) !important;
}
.btn-secondary:active, .btn-secondary.active,
.btn-gelb:active,      .btn-gelb.active {
    background: var(--color-primary)   !important;
    color: var(--color-secondary) !important;
}

/* Danger */
.btn-danger { background: var(--color-error) !important; border-color: var(--color-error) !important; color: #fff !important; }
.btn-danger:hover { background: var(--color-primary-dark) !important; border-color: var(--color-error) !important; }

/* Outline */
.btn-outline-primary { background: transparent !important; border-color: var(--color-primary) !important; color: var(--color-primary) !important; }
.btn-outline-primary:hover { background: var(--color-primary) !important; color: var(--color-secondary) !important; }

/* Disabled */
.btn:disabled, .btn.disabled { background: #808080 !important; border-color: #808080 !important; color: #fff !important; opacity: .7; cursor: not-allowed; }

/* Ausgewählt / Aktiv-Zustand (z.B. Druckliste) */
.btn-selected {
    background: var(--color-secondary) !important;
    border-color: var(--color-primary)  !important;
    color: var(--color-primary) !important;
    font-weight: 700;
}
.btn-selected:hover {
    background: var(--color-primary)   !important;
    color: var(--color-secondary) !important;
}

/* --------------------------------------------------------------------------
   4. FORMS  (radius-sm | border-1)
   -------------------------------------------------------------------------- */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: var(--border-1) solid var(--color-border);
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus { border-color: var(--color-primary); box-shadow: var(--shadow-focus); outline: none; }
.form-label { color: var(--color-primary); font-weight: 600; }

/* --------------------------------------------------------------------------
   5. CARDS  (radius-lg | border-2)
   -------------------------------------------------------------------------- */
.card {
    border: var(--border-2) solid var(--color-primary) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header { color: var(--color-primary); font-weight: 700; border-bottom: var(--border-1) solid var(--color-border); }
.card-header.bg-primary, .card-header.bg-dblau {
    background: var(--color-primary) !important;
    color: var(--color-secondary)    !important;
    border-bottom: none;
}

/* --------------------------------------------------------------------------
   6. MODALS  (radius-md | border-2)
   -------------------------------------------------------------------------- */
.modal-content { border-radius: var(--radius-md) !important; border: var(--border-2) solid var(--color-primary) !important; box-shadow: var(--shadow-md); overflow: hidden; }
.modal-header  { background: var(--color-primary); color: var(--color-secondary); border-bottom: none; }
.modal-title   { color: var(--color-secondary); font-weight: 700; }
.modal-header .btn-close { filter: invert(1) sepia(1) saturate(5) hue-rotate(10deg); }
.modal-footer  { border-top: var(--border-1) solid var(--color-border); }

/* --------------------------------------------------------------------------
   7. TOASTS & ALERTS  (radius-md)
   -------------------------------------------------------------------------- */
.toast { border-radius: var(--radius-md) !important; box-shadow: var(--shadow-md); }
.toast-header { background: var(--color-primary); color: var(--color-secondary); font-weight: 600; border-bottom: var(--border-1) solid var(--color-secondary); }
.toast-header .btn-close { filter: invert(1) sepia(1) saturate(5) hue-rotate(10deg); }

.alert { border-radius: var(--radius-md) !important; border-width: var(--border-2) !important; border-style: solid !important; }
.alert-success { background: #d4edda !important; border-color: var(--color-success) !important; color: #155724 !important; }
.alert-danger  { background: #f8d7da !important; border-color: var(--color-error)   !important; color: #721c24 !important; }
.alert-warning { background: #fff3cd !important; border-color: var(--color-warning) !important; color: #856404 !important; }
.alert-info    { background: #cff4fc !important; border-color: #0dcaf0             !important; color: #055160 !important; }

/* --------------------------------------------------------------------------
   8. TABELLEN
   -------------------------------------------------------------------------- */
.table thead th {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    font-weight: 600;
}
.table tbody tr:hover { background: #f1f5f9; }

/* --------------------------------------------------------------------------
   9. BADGES
   -------------------------------------------------------------------------- */
.badge { border-radius: var(--radius-sm) !important; font-weight: 600; }
.badge.bg-primary   { background: var(--color-primary)   !important; color: #fff !important; }
.badge.bg-secondary { background: var(--color-secondary) !important; color: var(--color-primary) !important; }
.badge.bg-success   { background: var(--color-success)   !important; color: #fff !important; }
.badge.bg-danger    { background: var(--color-error)     !important; color: #fff !important; }
.badge.bg-warning   { background: var(--color-warning)   !important; color: var(--color-primary) !important; }

/* Rang-Badges (Gold/Silber/Bronze) */
.bg-gold   { background: linear-gradient(135deg,#FFD700,#B8860B) !important; color: #fff !important; }
.bg-silber { background: linear-gradient(135deg,#C0C0C0,#808080) !important; color: #fff !important; }
.bg-bronze { background: linear-gradient(135deg,#CD7F32,#8B4513) !important; color: #fff !important; }

/* --------------------------------------------------------------------------
   10. NAVBAR (Top)
   -------------------------------------------------------------------------- */
.navbar {
    background: linear-gradient(180deg, var(--color-primary-dark), var(--color-primary)) !important;
}
.navbar .nav-link, .navbar .navbar-brand { color: #fff !important; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--color-secondary) !important; }
.navbar-toggler { border-color: var(--color-secondary) !important; color: var(--color-secondary) !important; }

/* Gelber Akzentstreifen unter der Top-Navbar */
.fixed-top-gelb  { position: fixed; top: 0; left: 0; right: 0; z-index: 1029; pointer-events: none; }
.border-gelb-top { background: var(--color-secondary); height: 4px; width: 100%; }

/* --------------------------------------------------------------------------
   11. FOOTER NAVBAR (Bottom)
   Buttons: Gelb / Dunkelblau | Dropdown öffnet nach oben
   -------------------------------------------------------------------------- */
.navbar.fixed-bottom {
    flex-wrap: nowrap !important;
    overflow: visible !important;
    padding: 0.3rem 0.5rem !important;
}
/* Alle Buttons in der Footer-Leiste */
.navbar.fixed-bottom .nav-link,
.navbar.fixed-bottom .dropdown-toggle {
    background: var(--color-secondary)  !important;
    color:       var(--color-primary)   !important;
    border:      var(--border-2) solid var(--color-primary) !important;
    border-radius: var(--radius-sm)     !important;
    font-weight: 600;
    padding:     0.2rem 0.65rem !important;
    margin:      0 0.2rem !important;
    line-height: 1.4 !important;
    transition:  background .2s, color .2s;
}
.navbar.fixed-bottom .nav-link:hover,
.navbar.fixed-bottom .dropdown-toggle:hover {
    background: var(--color-primary)   !important;
    color:      var(--color-secondary) !important;
}
/* Usertype-Label: kein Button-Stil */
.navbar.fixed-bottom .navbar-text { color: rgba(255,255,255,.7) !important; background: none !important; border: none !important; padding: 0 !important; font-size: .8rem; }
/* Dropdown öffnet nach oben */
.navbar.fixed-bottom .dropdown-menu {
    background: var(--color-secondary) !important;
    border: var(--border-2) solid var(--color-primary) !important;
    border-radius: var(--radius-sm) !important;
    position: absolute !important;
    bottom: 100% !important;
    top: auto !important;
    margin-bottom: 0.25rem !important;
}
.navbar.fixed-bottom .dropdown-item { color: var(--color-primary) !important; font-weight: 600; padding: 0.4rem 1rem !important; }
.navbar.fixed-bottom .dropdown-item:hover { background: var(--color-primary) !important; color: var(--color-secondary) !important; }
.navbar.fixed-bottom .nav-item.dropup.btn-dblau-nav { background: none !important; border: none !important; padding: 0 !important; }

/* --------------------------------------------------------------------------
   12. ACCORDION
   -------------------------------------------------------------------------- */
.accordion-button.gelb { background: var(--color-primary); color: var(--color-secondary); border: var(--border-1) solid var(--color-secondary); box-shadow: none; }
.accordion-button.gelb:not(.collapsed) { background: var(--color-secondary); color: var(--color-primary); }
.accordion-button::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23e0df00' viewBox='0 0 16 16'%3E%3Cpath d='M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z'/%3E%3C/svg%3E"); transition: all .3s; }
.accordion-button:not(.collapsed)::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23254461' viewBox='0 0 16 16'%3E%3Cpath d='M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z'/%3E%3C/svg%3E"); }

/* --------------------------------------------------------------------------
   === rangliste_kurz.php ===
   -------------------------------------------------------------------------- */
@keyframes rl-pulse { 0%,100% { transform:scale(1); opacity:.9; } 50% { transform:scale(1.3); opacity:1; } }
.star { color: var(--color-secondary); display: inline-block; animation: rl-pulse 1.5s infinite ease-in-out; }

/* Mobile Kompakt-Zeile */
.rl-card-row { display:flex; align-items:center; padding:10px 12px; border-bottom: var(--border-1) solid var(--color-border); cursor:pointer; transition:background .2s; }
.rl-card-row:hover { background:#f0f6f0; }
.rl-card-row:last-child { border-bottom:none; }

/* Rang-Kreis */
.rl-rang { min-width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.95rem; color:#fff; flex-shrink:0; }
.rl-rang-1 { background:linear-gradient(135deg,#FFD700,#B8860B); box-shadow:0 0 8px rgba(255,215,0,.5); }
.rl-rang-2 { background:linear-gradient(135deg,#C0C0C0,#808080); box-shadow:0 0 8px rgba(192,192,192,.5); }
.rl-rang-3 { background:linear-gradient(135deg,#CD7F32,#8B4513); box-shadow:0 0 8px rgba(205,127,50,.5); }
.rl-rang-default { background: var(--color-muted); }

/* Trend */
.rl-trend { display:flex; align-items:center; margin:0 8px; font-size:1rem; flex-shrink:0; }
.rl-trend-up   { color: var(--color-success); }
.rl-trend-down { color: var(--color-error); }
.rl-trend-eq   { color: var(--color-muted); }

/* Avatar */
.rl-avatar, .rl-avatar-placeholder { width:40px; height:40px; border-radius:50%; flex-shrink:0; }
.rl-avatar { object-fit:cover; }
.rl-avatar-placeholder { background:#8eb0d1; display:flex; align-items:center; justify-content:center; color:#fff; font-size:1.1rem; }

/* Name / Punkte / Chevron */
.rl-info   { flex:1; min-width:0; margin-left:10px; }
.rl-name   { font-weight:600; font-size:.95rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rl-punkte { font-weight:700; font-size:.95rem; color:var(--color-primary); white-space:nowrap; flex-shrink:0; margin-left:8px; }
.rl-chevron { margin-left:8px; color:var(--color-muted); transition:transform .3s; flex-shrink:0; }
.rl-card-row.open .rl-chevron { transform:rotate(180deg); }

/* Steckbrief (aufklappbar) */
.rl-details { max-height:0; overflow:hidden; transition:max-height .4s ease, padding .3s ease; background:#f8f9fa; border-bottom: var(--border-1) solid var(--color-border); }
.rl-details.open { max-height:400px; padding:12px 16px; }
.rl-steckbrief-item { display:flex; justify-content:space-between; align-items:center; padding:7px 0; border-bottom: var(--border-1) solid var(--color-border); }
.rl-steckbrief-item:last-child { border-bottom:none; }
.rl-steckbrief-label { font-size:.8rem; font-weight:600; color:var(--color-muted); margin-right:12px; }
.rl-steckbrief-value { font-size:.9rem; font-weight:500; text-align:right; }

/* Altersklassen-Badge */
.rl-age-badge { display:inline-block; font-size:.7rem; font-weight:700; padding:2px 6px; border-radius:var(--radius-sm); background:var(--color-primary); color:#fff; white-space:nowrap; margin-left:6px; vertical-align:middle; }

/* Abschnitts-Header (Jugend / Damen / Herren) */
.rl-section-header { display:flex; align-items:center; justify-content:space-between; background:linear-gradient(90deg,var(--color-primary),var(--color-secondary)); border-radius:var(--radius-sm) var(--radius-sm) 0 0; padding:.4rem .75rem; margin-top:.6rem; }
.rl-section-header:first-child { margin-top:0; }
.rl-section-title { color:#fff !important; font-weight:700; font-size:.95rem; flex:1; }
.rl-section-title .badge { color:#fff !important; }
.rl-section-link { color:var(--color-primary); font-size:1.1rem; margin-left:.5rem; background:var(--color-secondary); border-radius:50%; width:28px; height:28px; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:background .2s,color .2s; text-decoration:none; }
.rl-section-link:hover { background:var(--color-primary); color:var(--color-secondary); }

/* Tabellen-Kopf */
.rl-table .rl-thead { overflow:hidden; }
.rl-table .rl-thead tr th { background:var(--color-primary) !important; color:#fff !important; border-color:var(--color-primary) !important; font-weight:700; }
.rl-table .rl-thead tr th:first-child { border-radius:var(--radius-sm) 0 0 0 !important; }
.rl-table .rl-thead tr th:last-child  { border-radius:0 var(--radius-sm) 0 0 !important; }
.rl-desktop-table table td:nth-child(2) { font-weight:600; }

/* Desktop / Mobile */
@media (min-width:512px) { .rl-mobile-list { display:none !important; } .rl-desktop-table { display:block !important; } }
@media (max-width:511px) {
    .rl-mobile-list { display:block !important; }
    .rl-desktop-table { display:none !important; }
    .rl-rang { min-width:30px; height:30px; font-size:.8rem; }
    .rl-avatar, .rl-avatar-placeholder { width:34px; height:34px; }
    .rl-name, .rl-punkte { font-size:.85rem; }
}

/* --------------------------------------------------------------------------
   === Hilfsklassen (ausgelagerte Inline-Styles)
   -------------------------------------------------------------------------- */

/* inc_nav_top.php */
.rl-avatar       { width: 40px; height: 40px; object-fit: cover; }
.fs-avatar       { font-size: 40px; }
.navbar-spacer   { padding-top: 70px; }

/* inc_footer_boostrap.php / inc_toasts.php */
.toast-zindex    { z-index: 1055; }

/* cards_register_klein_gratis.php */
.mt-navbar       { margin-top: 100px; }
/* card-title-secondary / card-title-primary entfernt – ersetzt durch .rl-section-header + .rl-section-title */
.card-price-tag  { background: var(--color-primary); color: var(--color-secondary); font-weight: 700; border-radius: var(--radius-sm); }
.card-footer     { background: var(--color-bg) !important; border-top: var(--border-1) solid var(--color-border); }

/* climbr_info.php */
.climbr-info-banner {
    background-image: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    color: #ffffff;
}

/* parallax_kletterhallen.php */
.hallen-container    { width: 100%; max-width: 1200px; margin: 0 auto; }
.search-container    { position: relative; margin-bottom: 30px; padding: 20px; background: white; }
#hallenSuche         { width: 100%; padding: 12px 20px; font-size: 16px; border: var(--border-2) solid var(--color-primary); border-radius: var(--radius-sm); transition: border-color .3s; }
#hallenSuche:focus   { outline: none; border-color: var(--color-secondary); }
.dropdown-liste      { position: absolute; top: 100%; left: 20px; right: 20px; background: white; border: var(--border-2) solid var(--color-primary); border-top: none; max-height: 300px; overflow-y: auto; z-index: 1000; display: none; }
.dropdown-liste.active { display: block; }
.hallen-uebersicht   { display: block; }
.hallen-uebersicht.hidden { display: none; }
.halle-item          { display: flex; align-items: center; padding: 15px; margin-bottom: 15px; background: white; border: var(--border-2) solid var(--color-primary); border-radius: var(--radius-sm); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.halle-item:hover    { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hallenbild          { height: 80px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-sm); margin-right: 20px; flex-shrink: 0; }
.hallenname          { font-size: 20px; font-weight: 600; text-transform: uppercase; color: var(--color-text); letter-spacing: 2px; }
.hallen-detail       { display: none; }
.hallen-detail.active { display: block; }
.zurueck-button      { display: inline-block; padding: 10px 24px; margin-bottom: 20px; background: var(--color-primary); color: var(--color-secondary); border: none; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem; text-transform: uppercase; letter-spacing: 2px; cursor: pointer; transition: background .3s, color .3s; }
.zurueck-button:hover { background: var(--color-secondary); color: var(--color-primary); }
.col-rang            { width: 60px; }

/* Responsive: Hallen-Übersicht mobil */
@media (max-width: 512px) {
    .halle-item { flex-direction: row; align-items: flex-start; }
    .hallenbild { margin-right: 15px !important; margin-bottom: 0; height: 80px; max-width: 140px; flex-shrink: 0; }
    .halle-item .d-flex.justify-content-end { display: none !important; }
}
@media (max-width: 510px) {
    .halle-item .d-flex.justify-content-between.align-items-center.mb-2 { flex-direction: column; align-items: flex-start !important; }
    .halle-item .d-flex.justify-content-between.align-items-center.mb-2 .card-title { margin-bottom: 8px; }
}

/* === kletterhallen.php ===
   Leaflet-Karte und Popup-Styles
   -------------------------------------------------------------------------- */
.climbing-map {
    height: 600px;
    width: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    border: var(--border-2) solid var(--color-primary);
    margin-bottom: 30px;
}

.map-container {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    padding: 25px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.map-header { color: #ffffff; }

.map-header h2 > .emoji {
    font-size: 3rem;
    line-height: 1;
    vertical-align: middle;
    margin-right: 0.3em;
    display: inline-block;
}

.custom-popup { font-family: Arial, sans-serif; }

.popup-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.popup-address {
    color: #2f2f30;
    margin-bottom: 10px;
    line-height: 1.4;
}

.popup-buttons { display: flex; gap: 6px; flex-wrap: wrap; }

.popup-btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all .3s ease;
    background: var(--color-primary);
    color: var(--color-secondary);
    font-weight: 600;
}

.popup-btn:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.leaflet-container a { color: #000000; }

.climbing-marker {
    background-color: var(--color-primary);
    border: 3px solid var(--color-secondary);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,.3);
}

.map-controls {
    top: 30px;
    right: 30px;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.control-btn {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background .2s, color .2s;
}

.control-btn:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
    color: #ffffff;
}

/* === routen.php / alle_routen.php / alle_routen_halle.php ===
   Routen-Tabelle und Mobile-Karten
   -------------------------------------------------------------------------- */

/* Tabellen-Zeile */
.routen-row                { background: var(--color-secondary) !important; }
.routen-row:hover          { background: #f0ef00 !important; }

/* Farb-Zelle (Routenfarbe bleibt inline, Border wird per CSS gesetzt) */
.routen-farbe-cell         { border: 3px solid #fff !important; min-width: 28px; width: 28px; }

/* Nutzergruppen-Icon */
.nutzergruppe-icon         { width: 24px; height: 24px; object-fit: contain; }

/* Legende */
.legende-container         { border: var(--border-2) solid var(--color-primary); border-radius: var(--radius-sm); padding: 1rem; }
.legende-item              { display: flex; align-items: center; margin-bottom: .5rem; }
.legende-color-box         { width: 20px; height: 20px; border-radius: var(--radius-sm); margin-right: .5rem; flex-shrink: 0; border: 1px solid rgba(0,0,0,.15); }

/* Mobile Routen-Karten */
.mobile-route-card         { border: var(--border-1) solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: .5rem; overflow: hidden; }
.mobile-route-header       { display: flex; justify-content: space-between; align-items: center; padding: .6rem .75rem; cursor: pointer; font-weight: 600; }
.mobile-route-name         { flex: 1; min-width: 0; }
.mobile-route-title        { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-route-difficulty   { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; margin-left: .5rem; font-size: .85rem; }
.mobile-route-details      { max-height: 0; overflow: hidden; transition: max-height .35s ease; background: #f8f9fa; }
.mobile-route-details.show { max-height: 600px; }
.mobile-detail-row         { display: flex; justify-content: space-between; padding: .35rem .75rem; border-bottom: 1px solid var(--color-border); font-size: .85rem; }
.mobile-detail-row:last-child { border-bottom: none; }
.mobile-detail-label       { font-weight: 600; color: var(--color-muted); margin-right: .5rem; }
.mobile-search-container   { display: none; }

/* Desktop: Tabelle sichtbar, Mobile-Karten versteckt */
@media (min-width: 513px) {
    .mobile-route-card     { display: none !important; }
    .mobile-search-container { display: none !important; }
}
/* Mobil: Tabelle versteckt, Mobile-Karten sichtbar */
@media (max-width: 512px) {
    #routenTable            { display: none !important; }
    .mobile-route-card      { display: block !important; }
    .mobile-search-container { display: block !important; }
    .zurueck-button         { width: 100%; text-align: center; }
    /* DataTables Suchfeld ausblenden – eigene mobile Suche vorhanden */
    #routenTable_filter     { display: none !important; }
    #routenTable_info       { display: none !important; }
}

/* --------------------------------------------------------------------------
   STATUS-FARBEN (Bewertungen / Begehungen)
   Klassen werden per PHP via getStatusColorClass() zugewiesen
   -------------------------------------------------------------------------- */
.status-gelb      { background: #e0df00 !important; color: #254461 !important; border: 1px solid rgba(0,0,0,.15); }
.status-hellgruen { background: #90ee90 !important; color: #1a5c1a !important; border: 1px solid rgba(0,0,0,.15); }
.status-bronze    { background: #CD7F32 !important; color: #fff     !important; border: 1px solid rgba(0,0,0,.15); }
.status-silber    { background: #C0C0C0 !important; color: #333     !important; border: 1px solid rgba(0,0,0,.15); }
.status-gold      { background: #FFD700 !important; color: #333     !important; border: 1px solid rgba(0,0,0,.15); }
.status-default   { background: #f0f0f0 !important; color: #555     !important; border: 1px solid rgba(0,0,0,.15); }

/* Legende-Farbboxen nutzen dieselben Status-Klassen */
.legende-color-box.status-gelb      { background: #e0df00 !important; }
.legende-color-box.status-hellgruen { background: #90ee90 !important; }
.legende-color-box.status-bronze    { background: #CD7F32 !important; }
.legende-color-box.status-silber    { background: #C0C0C0 !important; }
.legende-color-box.status-gold      { background: #FFD700 !important; }

/* Bewertungs-Badge in Tabelle */
.begehungen-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: .85rem;
    padding: 0 6px;
}

/* === rangliste.php / rangliste_lang.php ===
   Filter-Toggle, Mobile-Karten, Legende, Desktop-Tabelle
   -------------------------------------------------------------------------- */

/* Desktop-Tabellen-Wrapper */
.rl-desktop-table-wrap        { display: block; }
.rl-desktop-name-cell         { display: flex; align-items: center; gap: .5rem; }
.rl-text-capitalize           { text-transform: capitalize; }

/* Filter-Toggle (nur Mobile < 512px sichtbar) */
.rl-filter-toggle             { display: none; }
@media (max-width: 512px) {
    .rl-filter-toggle         { display: flex; justify-content: space-between; align-items: center; padding: .6rem .75rem; background: var(--color-primary); color: #fff; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; margin-bottom: .5rem; }
    .rl-filter-toggle.open .rl-filter-toggle-chevron { transform: rotate(180deg); }
    .rl-filter-toggle-chevron { transition: transform .3s; }
    .rl-filter-content        { display: none; }
    .rl-filter-content.open   { display: block; }
    .rl-desktop-table-wrap    { display: none !important; }
}

/* Mobile-Karten (< 512px) */
.rl-mobile-card               { display: none; }
@media (max-width: 512px) {
    .rl-mobile-card           { display: block; }
}

.rl-m-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .75rem;
    border-bottom: var(--border-1) solid var(--color-border);
    cursor: pointer;
    transition: background .2s;
}
.rl-m-row:hover               { background: rgba(37,68,97,.06); }
.rl-m-row.open                { background: rgba(37,68,97,.1); }
.rl-m-avatar                  { flex-shrink: 0; }
.rl-m-name                    { flex: 1; font-weight: 600; font-size: .9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-m-punkte                  { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.rl-m-chevron                 { flex-shrink: 0; font-size: .75rem; color: var(--color-muted); transition: transform .3s; }
.rl-m-row.open .rl-m-chevron  { transform: rotate(180deg); }

.rl-m-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
    background: #f8f9fa;
}
.rl-m-details.open            { max-height: 600px; }

/* Legende Altersklassen */
.rl-legende-toggle            { cursor: pointer; display: flex; align-items: center; gap: .3rem; }
.rl-legende-icon              { color: var(--color-primary); }
.rl-legende-chevron           { margin-left: auto; transition: transform .3s; color: var(--color-muted); font-size: .85rem; }
.rl-legende-content           { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.rl-legende-content.open      { max-height: 1200px; }
.rl-legende-note              { font-size: .85rem; }
.rl-legende-thead th          { background: var(--color-primary) !important; color: #fff !important; }
.rl-legende-table             { font-size: .85rem; }

/* === route_edit.php / route_neu.php ===
   Formular-Karte und Hilfsklassen
   -------------------------------------------------------------------------- */

/* Formular-Karte (ersetzt border border-dblau p-3) */
.form-card {
    border: var(--border-2) solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    background: #fff;
}

/* Vorschlag-Hinweis (ersetzt style="display:none;") */
.form-hint {
    display: none;
}
.form-hint.visible {
    display: block;
}

/* === hallenstats.php ===
   Statistik-Charts, Hallenbild, Sektor-Filter
   -------------------------------------------------------------------------- */
.stats-hallenbild {
    max-width: 320px;
    border-radius: var(--radius-lg);
    margin: 10px 0;
}
.stats-chart-wrap {
    position: relative;
    height: 200px;
    max-width: 1100px;
}
.stats-chart-wrap canvas,
.stats-chart-wrap-sm canvas {
    width: 100% !important;
    height: 100% !important;
}
.stats-chart-wrap-sm {
    position: relative;
    height: 240px;
    max-width: 1100px;
}
.stats-select-label {
    min-width: 320px;
}
.stats-zurueck-btn {
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .stats-button-container {
        flex-direction: column !important;
    }
    .stats-zurueck-btn {
        width: 60%;
        margin-bottom: 1rem;
    }
    .stats-select-label {
        min-width: unset;
        width: 100%;
    }
}

/* === meine_routen.php / meine_routen_halle.php / meine_routen_setzer.php ===
   Filter-Container, Druckliste, Gradient-Header
   -------------------------------------------------------------------------- */

/* Gradient-Header (Karten-Titelzeile mit Blau→Gelb Verlauf) */
.gradient-header {
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #fff;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.gradient-header .card-title { color: #fff; margin-bottom: 0; }

/* Filter-Container (ein-/ausblendbar via .show Klasse) */
.filter-container {
    display: none;
    background: #f8fafc;
    border: var(--border-1) solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}
.filter-container.show { display: block; }
.filter-label { font-weight: 600; color: var(--color-primary); font-size: .875rem; margin-bottom: .25rem; display: block; }
.filter-group { margin-bottom: .5rem; }

/* Druckliste-Box (nur sichtbar wenn .show) */
.print-list-box {
    display: none;
    border: var(--border-2) solid var(--color-secondary) !important;
}
.print-list-box.show { display: block; }
.print-buttons-group { display: flex; gap: .3rem; flex-wrap: wrap; }

/* Nutzergruppen-Icon in Tabellenzelle */
.icon-container { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.nutzergruppe-text { font-size: .7rem; color: var(--color-muted); white-space: nowrap; }
.icon-placeholder { display: inline-block; width: 24px; height: 24px; }
.nutzergruppe-cell { min-width: 60px; }
