/* ---------------------------------------------------------
   Grundlayout
--------------------------------------------------------- */

body {
    font-family: Inter, system-ui, sans-serif;
    margin: 0;
    padding: 0 20px; /* kein padding-top -> verhindert Scroll-Lücke */
    background: #f7fbf8;
    color: #222;
    font-size: 14px;
}

.rt-container {
    max-width: 1000px;
    margin: auto;
}

.rt-small {
    font-size: 12px;
    opacity: 0.8;
}

.rt-h2 {
    margin-top: 0;
    font-size: 20px;
    font-weight: 700;
}

/* ---------------------------------------------------------
   Branding
--------------------------------------------------------- */

.rt-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rt-logo {
    background-image: url("/images/roadto.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 64px;
    height: 64px;
    color: transparent;
}

.rt-brand-title {
    font-size: 18px;
    font-weight: 700;
}

/* ---------------------------------------------------------
   Header-Leiste (links ausgerichtet, nur untere Linie)
--------------------------------------------------------- */

.rt-headerbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f7fbf8; /* gleiche Farbe wie body -> kein Durchscheinen */
    padding: 0;
}

.rt-headerbar .rt-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 40px;

    padding: 10px 0;
    border-bottom: 2px solid #e0eee7; /* Linie in Container-Breite */
}

/* ---------------------------------------------------------
   Tabs (modern, klar erkennbar)
--------------------------------------------------------- */

.rt-tabs {
    display: flex;
    gap: 10px;
}

.rt-tab {
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;

    background: #e8f5e9;
    color: #0b6e4f;
    border: 1px solid #c8e6c9;

    transition: all 0.2s ease;
}

.rt-tab:hover {
    background: #d0ebd2;
    border-color: #a5d6a7;
}

.rt-tab--active {
    background: #0b6e4f !important;
    color: #fff !important;
    border-color: #0b6e4f !important;
    box-shadow: 0 2px 6px rgba(11, 110, 79, 0.35);
}

/* ---------------------------------------------------------
   Filter
--------------------------------------------------------- */

.rt-filter-row {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.rt-select {
    padding: 4px 6px;
    font-size: 14px;
}

/* ---------------------------------------------------------
   Meta-Informationen
--------------------------------------------------------- */

.rt-meta-line {
    margin: 10px 0 20px 0;
    font-size: 13px;
    opacity: 0.8;
}

/* ---------------------------------------------------------
   Disziplin-Header
--------------------------------------------------------- */

.rt-discipline-header {
    font-size: 16px;
    font-weight: 700;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 3px solid #4caf50;
    color: #2e7d32;
}

/* ---------------------------------------------------------
   Tabellen (Normerfüllungen)
--------------------------------------------------------- */

.rt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-size: 14px;
}

.rt-table th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid #ccc;
}

.rt-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
}

/* QP-Farben */
.rt-qp-green {
    color: #0b6e4f;
    font-weight: 700;
}

.rt-qp-yellow {
    color: #c7a600;
    font-weight: 700;
}

.rt-qp-red {
    color: #d00;
    font-weight: 700;
}

/* B‑Norm */
.rt-bnorm {
    font-size: 18px;
    text-align: center;
    color: #0b6e4f;
}

/* Nominiert */
.rt-selected {
    font-size: 18px;
    color: #0b6e4f;
    font-weight: 700;
}

/* ---------------------------------------------------------
   Rankings
--------------------------------------------------------- */

.rt-ranking-row {
    display: grid;
    grid-template-columns: 60px 1fr 80px 80px 80px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.rt-ranking-cell {
    padding: 8px 10px;
    font-size: 14px;
}

.rt-ranking-cell strong {
    color: #0b6e4f;
    font-weight: 700;
}

#view-rankings .rt-discipline-header {
    margin-top: 10px;
    padding-top: 6px;
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */

.rt-footer {
    margin-top: 40px;
    text-align: center;
    opacity: 0.7;
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */

@media (max-width: 700px) {
    body {
        padding: 0 10px;
        font-size: 13px;
    }

    .rt-ranking-row {
        grid-template-columns: 50px 1fr 70px 70px 70px;
        font-size: 13px;
    }
}

/* ---------------------------------------------------------
   MOBILE OPTIMIERUNG FÜR NORMERFÜLLER
--------------------------------------------------------- */

@media (max-width: 768px) {

    #view-norms {
        padding: 10px 0;
    }

    .rt-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 14px;
    }

    .rt-table thead {
        display: none;
    }

    .rt-table tr {
        display: block;
        margin-bottom: 12px;
        padding: 10px;
        border: 1px solid rgba(2,6,23,0.08);
        border-radius: 6px;
        background: #fff;
    }

    .rt-table td {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        font-size: 13px;
    }

    .rt-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #0b6e4f;
        margin-right: 10px;
    }

    .rt-qp-green,
    .rt-qp-yellow,
    .rt-qp-red {
        padding: 2px 6px;
        border-radius: 4px;
        font-weight: 700;
    }

    .rt-discipline-header {
        font-size: 15px;
        margin-top: 20px;
        padding-top: 10px;
    }
}
