* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f4f4f4;
    color: #1f1f1f;
    line-height: 1.5;
}

.sprunglink {
    position: absolute;
    left: -999px;
    top: 10px;
    background-color: #ffffff;
    color: #111111;
    padding: 10px;
    border: 2px solid #111111;
    z-index: 10;
}

.sprunglink:focus {
    left: 10px;
}

header {
    background-color: #222222;
    color: white;
    padding: 25px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 32px;
}

header p {
    margin: 5px 0 0 0;
}

.benutzerLeiste {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.benutzerLeiste button {
    background-color: white;
    color: #222222;
}

nav {
    background-color: #e0e0e0;
    border-bottom: 1px solid #b5b5b5;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 15px 18px;
    color: #111111;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover,
nav a:focus {
    background-color: #222222;
    color: white;
}

main,
.loginBereich {
    max-width: 1150px;
    margin: 0 auto;
    padding: 20px;
}

section {
    background-color: white;
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    box-shadow: 0 2px 8px #cccccc;
}

.loginBereich {
    margin-top: 25px;
}

h2 {
    margin-top: 0;
    border-bottom: 2px solid #dddddd;
    padding-bottom: 8px;
}

h3 {
    margin-bottom: 8px;
}

.kennzahlen,
.kartenbereich {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.kennzahlen article,
.geraeteKarte,
.detailbox {
    flex: 1 1 250px;
    background-color: #f9f9f9;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    padding: 15px;
}

.kennzahlen h3,
.geraeteKarte h3,
.detailbox h3 {
    margin-top: 0;
}

.kennzahlen p {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 0;
}

.geraeteKarte ul,
.eigeneUebungenVerwaltung ul {
    padding-left: 20px;
}

.geraeteNummer {
    display: inline-block;
    background-color: #222222;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 14px;
}

.typMarke {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 4px;
    background-color: #dfe7ff;
    color: #10234d;
    font-size: 13px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

fieldset {
    border: 1px solid #bcbcbc;
    border-radius: 8px;
    padding: 15px;
}

legend {
    font-weight: bold;
    padding: 0 8px;
}

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 5px;
    font-weight: bold;
}

input,
select,
textarea,
button {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #777777;
    border-radius: 5px;
    background-color: white;
}

input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

textarea {
    resize: vertical;
}

.formularHinweis {
    margin: 0 0 10px 0;
    color: #4a4a4a;
}

.satzbereich {
    margin-top: 15px;
}

.satzFelder {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.satzFeld {
    flex: 1 1 120px;
}

.satzFeld label {
    margin-top: 0;
}

button {
    display: inline-block;
    padding: 10px 14px;
    border: none;
    border-radius: 5px;
    background-color: #222222;
    color: white;
    cursor: pointer;
    text-align: center;
    margin-top: 12px;
}

button:hover,
button:focus {
    background-color: #444444;
}

.hauptbutton {
    max-width: 260px;
    font-weight: bold;
}

.sekundaerButton {
    background-color: #555555;
}

.buttonZeile {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.zusatzbereich,
.detailbox {
    margin-top: 15px;
    padding: 15px;
    background-color: #f4f4f4;
    border-radius: 8px;
}

.eigeneUebungenVerwaltung li {
    margin-bottom: 8px;
}

.kleinerButton {
    padding: 5px 8px;
    margin: 0 0 0 8px;
    font-size: 14px;
}

.meldung {
    font-weight: bold;
    min-height: 24px;
}

.erfolg {
    color: #136b13;
}

.fehler {
    color: #a00000;
}

.werkzeuge {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.werkzeuge > div {
    flex: 1 1 160px;
}

.werkzeuge label,
.werkzeuge input,
.werkzeuge select,
.werkzeuge button {
    margin-top: 0;
}

.tabelleRahmen {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

caption {
    text-align: left;
    font-weight: bold;
    margin-bottom: 8px;
}

th,
td {
    border: 1px solid #bcbcbc;
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

th {
    background-color: #eeeeee;
}

tr:nth-child(even) {
    background-color: #f8f8f8;
}

.aktionButtons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bearbeitenButton {
    background-color: #1d4f7a;
}

.bearbeitenButton:hover,
.bearbeitenButton:focus {
    background-color: #286ca7;
}

.loeschenButton {
    background-color: #7a1f1f;
}

.loeschenButton:hover,
.loeschenButton:focus {
    background-color: #9b2929;
}

.hilfeText ol,
.hilfeText ul {
    padding-left: 25px;
}

.versteckt {
    display: none !important;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #222222;
    color: white;
}

@media screen and (max-width: 700px) {
    header h1 {
        font-size: 26px;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
    }

    main,
    .loginBereich {
        padding: 10px;
    }

    section {
        padding: 15px;
    }

    .hauptbutton,
    .buttonZeile button,
    .werkzeuge button {
        max-width: none;
        width: 100%;
    }

    table {
        min-width: 760px;
    }
}

@media print {
    nav,
    button,
    .werkzeuge,
    .zusatzbereich,
    #loginBereich,
    .benutzerLeiste,
    .sprunglink {
        display: none;
    }

    body {
        background-color: white;
        color: black;
    }

    section {
        box-shadow: none;
    }
}

/* Einklappbare Hauptbereiche */
.klappContainer {
    border: none;
}

.klappKopf {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    list-style: none;
    border-bottom: 2px solid #dddddd;
    padding-bottom: 8px;
}

.klappKopf::-webkit-details-marker {
    display: none;
}

.klappKopf::marker {
    content: "";
}

.klappTitel {
    flex: 1;
    font-size: 24px;
    font-weight: bold;
}

.klappHinweis {
    font-size: 14px;
    color: #555555;
    white-space: nowrap;
}

.klappKopf::before {
    content: "+";
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #222222;
    color: white;
    font-weight: bold;
}

.klappContainer[open] > .klappKopf::before {
    content: "−";
}

.klappInhalt {
    padding-top: 15px;
}

/* Muskelgruppen im Bereich Geräte und Übungen */
.muskelgruppenBereich {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.muskelgruppe {
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background-color: #f9f9f9;
    padding: 0;
}

.muskelgruppe summary {
    cursor: pointer;
    padding: 14px 16px;
    font-weight: bold;
    background-color: #eeeeee;
    border-radius: 8px;
}

.muskelgruppe[open] summary {
    border-bottom: 1px solid #d0d0d0;
    border-radius: 8px 8px 0 0;
}

.geraeteRaster {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
}

/* Auswertung mit Liniendiagramm */
.auswertungWerkzeuge {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
}

.auswertungWerkzeuge > div {
    flex: 1 1 260px;
}

.auswertungStats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
}

.auswertungStat {
    flex: 1 1 160px;
    background-color: #f9f9f9;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    padding: 12px;
}

.auswertungStat h3 {
    margin: 0 0 6px 0;
    font-size: 15px;
}

.auswertungStat p {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.diagrammRahmen {
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background-color: #ffffff;
    padding: 12px;
    overflow-x: auto;
}

#auswertungDiagramm {
    width: 100%;
    height: 360px;
    display: block;
}

@media screen and (max-width: 700px) {
    .klappKopf {
        align-items: flex-start;
    }

    .klappTitel {
        font-size: 21px;
    }

    .klappHinweis {
        display: none;
    }

    #auswertungDiagramm {
        min-width: 620px;
    }
}
