/* Athleten-Liste und Profil */

.athleten-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.athleten-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f1f1;
}

.athleten-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.athleten-list-item:hover .icon-btn {
    background: var(--color-primary, #333);
    color: #fff;
}

/* Icon-Spalte links */
.athlet-actions-left {
    flex: 0 0 36px;
    display: flex;
    justify-content: center;
}

/* Info-Spalte (Name, E-Mail) */
.athlet-info {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* Restlicher Platz für Meta-Infos */
.athlet-meta {
    flex: 1;
}

.athlet-actions {
    display: flex;
    gap: 0.5em;
    align-items: center;
}

.athlet-name {
    font-weight: 600;
}

.athlet-name-link {
    font-weight: 600;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.athlet-name-link:hover {
    text-decoration: underline;
}

.athlet-name-link:focus-visible {
    outline: 2px solid var(--color-primary, #333);
    outline-offset: 2px;
}

.athlet-email {
    font-size: 0.85rem;
    opacity: 0.7;
}

.athlet-plan-link {
    font-size: 0.85rem;
    color: var(--color-primary, #333);
    text-decoration: none;
}

.athlet-plan-link:hover {
    text-decoration: underline;
}

.athlet-no-plan {
    font-size: 0.8rem;
    opacity: 0.6;
    font-style: italic;
}

/* ================================================================= */
/* Trainer-Dashboard: Werkzeugleiste                                  */
/* ================================================================= */

.trainer-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25em 0.1em;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.6em 1em;
    margin-bottom: 1.25em;
}

.trainer-tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.35em 0.75em;
    border-radius: 5px;
    font-size: 0.875em;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.trainer-tool-link:hover {
    background: #e9ecef;
    color: #000;
    text-decoration: none;
}

.trainer-tool-sep {
    display: inline-block;
    width: 1px;
    height: 1.2em;
    background: #ccc;
    margin: 0 0.4em;
    align-self: center;
}

/* ================================================================= */
/* Trainer-Dashboard: Athleten-Kacheln                               */
/* ================================================================= */

.athleten-kacheln {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1em;
}

.athlet-kachel {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1em 1.1em;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    transition: box-shadow 0.15s;
}

.athlet-kachel:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.athlet-kachel.kachel-warn {
    border-left: 4px solid #ffc107;
}

.athlet-kachel.kachel-alert {
    border-left: 4px solid #dc3545;
}

.kachel-name {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

.kachel-plan {
    font-size: 0.85em;
    min-height: 1.4em;
}

.kachel-last-run {
    font-size: 0.85em;
}

.kachel-links {
    display: flex;
    gap: 0.4em;
    margin-top: 0.25em;
}

.badge-warn {
    font-size: 0.72em;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffd966;
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}

.btn-xs {
    padding: 2px 8px;
    font-size: 0.78em;
    border-radius: 4px;
}

/* Profil-Spalten (z.B. auf der Athleten-Profilseite) */
.profile-columns-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5em;
}

.profile-column {
    flex: 1;
    min-width: 250px;
}

.column-title {
    margin-top: 0;
    font-size: 1.1em;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.6em;
    margin-bottom: 0.6em;
}

.profile-list {
    list-style: none;
    padding: 0;
}

.profile-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.profile-list li:last-child {
    border-bottom: none;
}

.profile-list .label {
    font-weight: 600;
    color: #495057;
}

.profile-list .value {
    color: #007bff;
    font-weight: 500;
}

/* ================================================================= */
/* Athleten-Verwaltungsliste (laeufer/liste.html)                     */
/* ================================================================= */

.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f1f1;
    flex-wrap: wrap;
    gap: 1rem;
}
.admin-list-item:last-child { border-bottom: none; }

/* ================================================================= */
/* Leistungsprofil-Editor (laeufer/edit.html)                         */
/* ================================================================= */

.form-container { max-width: 900px; margin: 2em auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5em; }
.form-actions {
    margin-top: 2em;
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    align-items: flex-end;
    justify-content: space-between;
}
.action-buttons-right { display: flex; gap: 1em; margin-left: auto; }
.delete-form { display: inline; }
.form-divider { margin: 2em 0; border: none; border-top: 1px solid #eee; }

/* Pace-Eingabe-Gruppe */
.pace-group { display: flex; align-items: center; gap: 0.5em; }
.pace-group input { width: 65px; text-align: center; }
.pace-group span { font-weight: bold; color: #888; }
.pace-section { margin-top: 2em; border-top: 1px solid #eee; padding-top: 2em; }
.pace-section .form-group { margin-bottom: 1.5em; }
.pace-time-wrapper { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5em; margin-top: 0.5em; }
.pace-time-wrapper .separator { color: #888; }
.pace-inputs, .time-inputs { display: flex; align-items: center; gap: 0.5em; }
.pace-inputs input, .time-inputs input { width: 60px; text-align: center; }
.pace-inputs .unit, .time-inputs .unit { font-size: 0.9em; color: #666; }

/* Bestzeiten-Verlaufstabelle */
.history-table { border-collapse: collapse; width: 100%; margin-top: 1em; }
.history-table th,
.history-table td { border-bottom: 1px solid #eee; padding: 12px 15px; text-align: left; vertical-align: middle; }
.history-table th { background-color: #f9fafb; color: #333; font-weight: 600; }
.history-table tbody tr:hover { background-color: #f5f5f5; }
.history-table .text-right { text-align: right; }
.history-table .text-center { text-align: center; }
.history-table .no-data { color: #999; }
.actions-cell { text-align: center; white-space: nowrap; }

/* Sperr-Steuerung (Felder sperren/entsperren) */
.lock-control { display: flex; align-items: center; gap: 0.5em; color: #aaa; cursor: pointer; }
.lock-control input[type="checkbox"] { opacity: 0; width: 0; height: 0; position: absolute; }
.lock-control input[type="checkbox"]:checked + i.fa-lock { color: #28a745; }

/* Formular-Layout im Leistungsprofil-Editor */
.form-container .card { padding: 2em; }
.form-container .form-group { display: flex; flex-direction: column; }
.form-container .form-group > label {
    display: flex;
    align-items: center;
    gap: 0.75em;
    font-weight: 600;
    margin-bottom: 0.5em;
    color: #555;
}

/* Grüner Primär-Button im Leistungsprofil-Formular */
.form-container .btn-primary { background-color: #28a745; border-color: #28a745; }
.form-container .btn-primary:hover { background-color: #218838; border-color: #1e7e34; }

/* Kleinere Aktions-Buttons in der Bestzeiten-Tabelle */
.history-table .btn-action { padding: 4px 10px; font-size: 0.85em; border-radius: 4px; margin: 0 2px; }
.btn-load { background-color: #007bff; color: white; border-color: #007bff; }
.btn-load:hover { background-color: #0056b3; color: white; }
.history-table .btn-delete { background-color: #dc3545; color: white; border-color: #dc3545; }
