/*
 * Turnen-App 19.6 – gemeinsame View-Schicht
 * Stand: 07.08.2026
 *
 * Ziel: Alle Views folgen denselben kompakten, responsiven UI-Regeln.
 * Diese Datei wird bewusst nach app.css und typography.css geladen.
 */

:root {
    --ui-space-1: 0.3rem;
    --ui-space-2: 0.5rem;
    --ui-space-3: 0.7rem;
    --ui-space-4: 0.9rem;
    --ui-space-5: 1.15rem;
    --ui-card-radius: 0.9rem;
    --ui-control-height: 2.35rem;
    --ui-touch-height: 2.65rem;
    --ui-content-width: 95%;
    --ui-shadow: 0 6px 18px rgba(20, 37, 63, 0.055);
    --ui-shadow-hover: 0 9px 24px rgba(20, 37, 63, 0.085);
}

/* --------------------------------------------------------------------------
   Grundfläche – für jede einzelne View
   -------------------------------------------------------------------------- */
.view-stage {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

.view-content {
    width: var(--ui-content-width);
    max-width: 100%;
    min-width: 0;
    margin-inline: auto;
    padding-bottom: 0.35rem;
}

.view-content > * {
    min-width: 0;
    max-width: 100%;
}

.ui-view-root {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.view-content > :first-child {
    margin-top: 0;
}

.view-content > :last-child {
    margin-bottom: 0;
}

.view-content img,
.view-content video,
.view-content canvas,
.view-content svg:not(.mobile-tabbar__icon svg):not(.mobile-subnav__icon svg) {
    max-width: 100%;
}

.view-content p,
.view-content li,
.view-content dd,
.view-content td,
.view-content th,
.view-content label,
.view-content a,
.view-content code,
.view-content pre {
    overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Seitenkopf / Hero – kompakt wie die neuen Dashboards
   -------------------------------------------------------------------------- */
.ui-page-hero,
.page-hero,
.page-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center !important;
    gap: var(--ui-space-4) !important;
    width: 100%;
    min-width: 0;
    margin: 0 0 var(--ui-space-3) !important;
    padding: 0.8rem 0.95rem !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--ui-card-radius) !important;
    background: color-mix(in srgb, var(--color-surface) 94%, transparent) !important;
    box-shadow: var(--ui-shadow) !important;
}

.ui-page-hero > div,
.page-hero > div,
.page-header > div {
    min-width: 0;
}

.ui-page-hero .eyebrow,
.page-hero .eyebrow,
.page-header .eyebrow {
    margin: 0 0 0.12rem !important;
}

.ui-page-hero h1,
.page-hero h1,
.page-header h1 {
    margin: 0 !important;
}

.ui-page-hero p,
.page-hero p,
.page-header p {
    max-width: 72rem;
    margin: 0.18rem 0 0 !important;
    color: var(--color-muted);
}

.hero-actions,
.ui-page-hero .hero-actions,
.page-header .hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: var(--ui-space-2) !important;
    width: auto !important;
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Karten, Sektionen, Kennzahlen
   -------------------------------------------------------------------------- */
.card,
.filter-card,
.dashboard-panel-v2,
.admin-dashboard-section,
.profile-card,
.setup-card,
.setup-panel,
.task-group,
.task-summary,
.task-empty {
    min-width: 0;
    max-width: 100%;
    margin-top: var(--ui-space-3) !important;
    padding: 0.8rem 0.9rem !important;
    border-radius: var(--ui-card-radius) !important;
    box-shadow: var(--ui-shadow) !important;
}

.card:hover,
.quick-action-card:hover,
.parent-child-card:hover,
.parent-training-card:hover {
    box-shadow: var(--ui-shadow-hover);
}

.ui-section-header,
.section-header,
.task-group__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--ui-space-2) var(--ui-space-4) !important;
    min-width: 0;
    margin-bottom: var(--ui-space-3) !important;
}

.ui-section-header > div,
.section-header > div,
.task-group__header > div {
    min-width: 0;
}

.ui-section-header h2,
.section-header h2,
.task-group__header h2 {
    margin: 0 !important;
}

.ui-section-header p,
.section-header p,
.task-group__header p {
    margin: 0.12rem 0 0 !important;
}

.status-grid,
.info-grid,
.dashboard-mini-stats,
.parent-overview-grid,
.athlete-overview-grid,
.dashboard-stat-grid,
.metrics-grid,
.summary-grid {
    gap: var(--ui-space-2) !important;
}

.status-card,
.stat-card,
.metric-card,
.parent-stat-card,
.dashboard-stat-card,
.admin-dashboard-status {
    min-width: 0;
    padding: 0.65rem 0.75rem !important;
    border-radius: 0.78rem !important;
}

/* --------------------------------------------------------------------------
   Buttons und Aktionen
   -------------------------------------------------------------------------- */
.view-content .button,
.view-content button:not(.quick-response-button):not(.mobile-tabbar__item):not(.app-header-logout__button):not(.app-header-dashboard) {
    min-height: var(--ui-control-height);
    margin-top: 0 !important;
    padding: 0.48rem 0.72rem !important;
    border-radius: 0.68rem !important;
    white-space: normal;
    text-align: center;
}

.view-content .button-small,
.view-content .table-actions .button,
.view-content .compact-actions .button {
    min-height: 2rem;
    padding: 0.36rem 0.55rem !important;
}

.ui-form-actions,
.form-actions,
.filter-actions,
.compact-actions,
.table-actions,
.button-row,
.badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ui-space-2) !important;
    min-width: 0;
}

.ui-form-actions,
.form-actions {
    margin-top: var(--ui-space-3) !important;
}

/* --------------------------------------------------------------------------
   Formulare – gleiche Raster, Abstände und Touchgrößen
   -------------------------------------------------------------------------- */
.ui-form-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ui-space-3) !important;
    margin-top: var(--ui-space-3) !important;
    min-width: 0;
}

.field,
.form-section,
.checkbox-stack,
.check-card,
.check-line {
    min-width: 0;
}

.field {
    gap: 0.28rem !important;
}

.field > span,
.field > label,
.form-section > label {
    line-height: 1.25;
}

.view-content input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]),
.view-content select,
.view-content textarea {
    width: 100%;
    min-width: 0;
    min-height: var(--ui-control-height) !important;
    padding: 0.48rem 0.6rem !important;
    border-radius: 0.62rem !important;
}

.view-content textarea {
    min-height: 5.25rem !important;
    resize: vertical;
}

.view-content input[type="range"] {
    width: 100%;
    min-height: 1.65rem;
}

.view-content input[type="checkbox"],
.view-content input[type="radio"] {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
}

.check-card,
.check-line,
.checkbox-line,
.checkbox-line--compact {
    gap: var(--ui-space-2) !important;
    padding: 0.52rem 0.62rem !important;
    border-radius: 0.68rem !important;
}

/* Filter: auf Desktop kompakt, auf Mobil klar untereinander. */
.ui-filter-form,
.filter-form,
.filter-bar {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
    align-items: end;
    gap: var(--ui-space-2) !important;
    min-width: 0;
}

.ui-filter-form .button,
.filter-form .button,
.filter-bar .button {
    align-self: end;
}

/* --------------------------------------------------------------------------
   Tabellen – Desktop dicht, Mobile als Karten
   -------------------------------------------------------------------------- */
.table-wrap,
.admin-table-card,
.responsive-table-shell {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.ui-responsive-table,
.data-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.ui-responsive-table th,
.ui-responsive-table td,
.data-table th,
.data-table td {
    padding: 0.52rem 0.58rem !important;
    vertical-align: top;
}

.ui-responsive-table th,
.data-table th {
    white-space: nowrap;
}

.ui-responsive-table td > :first-child,
.data-table td > :first-child {
    margin-top: 0;
}

.ui-responsive-table td > :last-child,
.data-table td > :last-child {
    margin-bottom: 0;
}

.table-actions {
    justify-content: flex-start;
}

/* --------------------------------------------------------------------------
   Akkordeons – Fortschritt, Skills, Gruppen usw.
   -------------------------------------------------------------------------- */
.ui-accordion {
    min-width: 0;
    margin: 0.45rem 0;
    border: 1px solid var(--color-border);
    border-radius: 0.76rem;
    background: color-mix(in srgb, var(--color-surface) 97%, transparent);
    overflow: clip;
}

.ui-accordion > summary {
    min-height: 2.55rem;
    padding: 0.58rem 0.7rem;
    cursor: pointer;
    list-style-position: inside;
    touch-action: manipulation;
}

.ui-accordion > summary:hover,
.ui-accordion > summary:focus-visible {
    background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface));
}

.ui-accordion[open] > summary {
    border-bottom: 1px solid var(--color-border);
}

.ui-accordion > :not(summary) {
    max-width: 100%;
}

/* --------------------------------------------------------------------------
   Listen / Termin- und Personen-Karten
   -------------------------------------------------------------------------- */
.parent-training-list,
.parent-child-list,
.quick-action-grid,
.task-list,
.event-list,
.group-list,
.training-list {
    gap: var(--ui-space-2) !important;
}

.parent-training-card,
.parent-child-card,
.quick-action-card,
.task-item {
    min-width: 0;
    border-radius: 0.78rem !important;
}

.parent-training-card__link,
.parent-child-card__link,
.quick-action-card {
    min-width: 0;
}

.task-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--ui-space-3);
    align-items: center;
    padding: 0.68rem 0.72rem !important;
}

.task-item__content {
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Fortschritt / Slider / Skill-Bewertung
   -------------------------------------------------------------------------- */
.progress-track,
.athlete-progress-track,
.progress-summary__bar,
.progress-category__bar,
.progress-level__bar {
    overflow: hidden;
    border-radius: 999px;
}

.skill-row,
.progress-skill,
.progress-skill-row {
    min-width: 0;
    max-width: 100%;
}

.skill-row input[type="range"],
.progress-skill input[type="range"] {
    accent-color: hsl(var(--progress-hue, 45) 78% 44%);
}

/* --------------------------------------------------------------------------
   Auth, öffentliche Startseite, Setup, Fehlerseiten
   -------------------------------------------------------------------------- */
.view-group-auth .view-content,
.view-group-setup .view-content,
.view-group-errors .view-content {
    width: min(95%, 48rem);
}

.view-group-auth .auth-card,
.view-group-setup .setup-card,
.view-group-errors .card {
    width: 100%;
    margin-inline: auto;
}

.view-group-errors .view-content {
    min-height: min(62vh, 34rem);
    display: grid;
    place-items: center;
}

.view-group-errors .view-content > * {
    width: 100%;
}

.setup-steps {
    gap: var(--ui-space-2) !important;
    margin: var(--ui-space-4) 0 !important;
}

.setup-steps a {
    min-height: 2.5rem !important;
    padding: 0.5rem 0.62rem !important;
}

/* --------------------------------------------------------------------------
   System/Technikseiten – kompakt, aber lesbar
   -------------------------------------------------------------------------- */
.view-group-pages pre,
.view-group-admin pre,
.view-group-pages code,
.view-group-admin code {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.system-field--narrow {
    max-width: 14rem;
}

/* --------------------------------------------------------------------------
   Fokussichtbarkeit / Bedienbarkeit
   -------------------------------------------------------------------------- */
.view-content a:focus-visible,
.view-content button:focus-visible,
.view-content input:focus-visible,
.view-content select:focus-visible,
.view-content textarea:focus-visible,
.view-content summary:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--color-primary) 72%, white);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Tablet hochkant + Smartphone: mobile-first
   -------------------------------------------------------------------------- */
@media (max-width: 760px),
       (min-width: 761px) and (max-width: 1024px) and (orientation: portrait) {
    :root {
        --ui-content-width: 96%;
        --ui-control-height: 2.45rem;
        --ui-touch-height: 2.75rem;
        --ui-card-radius: 0.8rem;
    }

    .view-content {
        padding-bottom: 0.25rem;
    }

    .ui-page-hero,
    .page-hero,
    .page-header {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
        gap: var(--ui-space-2) !important;
        padding: 0.7rem 0.75rem !important;
    }

    .hero-actions,
    .ui-page-hero .hero-actions,
    .page-header .hero-actions {
        width: 100% !important;
        justify-content: flex-start;
    }

    .hero-actions .button,
    .ui-page-hero .hero-actions .button,
    .page-header .hero-actions .button {
        flex: 1 1 auto;
        min-width: min(9rem, 100%);
    }

    .card,
    .filter-card,
    .dashboard-panel-v2,
    .admin-dashboard-section,
    .profile-card,
    .setup-card,
    .setup-panel,
    .task-group,
    .task-summary,
    .task-empty {
        margin-top: var(--ui-space-2) !important;
        padding: 0.68rem 0.72rem !important;
    }

    .ui-form-grid,
    .form-grid,
    .form-grid--compact,
    .two-column-grid,
    .detail-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: var(--ui-space-2) !important;
    }

    .field--full {
        grid-column: 1 !important;
    }

    .ui-filter-form,
    .filter-form,
    .filter-bar {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .view-content .button,
    .view-content button:not(.quick-response-button):not(.mobile-tabbar__item):not(.app-header-logout__button):not(.app-header-dashboard) {
        min-height: var(--ui-touch-height);
    }

    .form-actions .button,
    .filter-actions .button {
        flex: 1 1 min(10rem, 100%);
    }

    /* Alle markierten Tabellen werden zu mobilen Karten. */
    .responsive-table-shell {
        overflow: visible;
    }

    .ui-responsive-table {
        min-width: 0 !important;
        border-collapse: separate !important;
        border-spacing: 0 0.55rem !important;
    }

    .ui-responsive-table thead {
        display: none !important;
    }

    .ui-responsive-table,
    .ui-responsive-table tbody,
    .ui-responsive-table tr,
    .ui-responsive-table td {
        display: block;
        width: 100%;
    }

    .ui-responsive-table tr {
        padding: 0.55rem 0.62rem;
        border: 1px solid var(--color-border);
        border-radius: 0.75rem;
        background: var(--color-surface);
        box-shadow: 0 4px 14px rgba(20, 37, 63, 0.045);
    }

    .ui-responsive-table td {
        display: grid;
        grid-template-columns: minmax(6.5rem, 0.38fr) minmax(0, 1fr);
        gap: 0.45rem;
        align-items: start;
        padding: 0.38rem 0 !important;
        border-bottom: 1px solid color-mix(in srgb, var(--color-border) 62%, transparent) !important;
        text-align: left !important;
    }

    .ui-responsive-table td:last-child {
        border-bottom: 0 !important;
    }

    .ui-responsive-table td::before {
        content: attr(data-label);
        color: var(--color-muted);
        font-size: var(--type-xs);
        font-weight: 800;
        line-height: 1.3;
    }

    .ui-responsive-table td[data-label=""]::before,
    .ui-responsive-table td[colspan]::before {
        display: none;
    }

    .ui-responsive-table td[colspan] {
        display: block;
    }

    .ui-responsive-table .table-actions,
    .ui-responsive-table td:last-child .button-row {
        justify-content: flex-start;
    }

    .ui-responsive-table .table-actions .button {
        flex: 1 1 auto;
    }

    .task-item {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
    }

    .task-item > .button {
        grid-column: 2;
        justify-self: start;
    }

    .setup-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .status-grid,
    .parent-overview-grid,
    .athlete-overview-grid,
    .dashboard-mini-stats,
    .dashboard-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Sehr schmale Geräte */
@media (max-width: 420px) {
    .view-content {
        width: 97%;
    }

    .ui-page-hero,
    .page-hero,
    .page-header,
    .card,
    .filter-card,
    .dashboard-panel-v2,
    .admin-dashboard-section {
        border-radius: 0.72rem !important;
    }

    .hero-actions .button,
    .form-actions .button,
    .filter-actions .button {
        flex: 1 1 100%;
    }

    .status-grid,
    .parent-overview-grid,
    .athlete-overview-grid,
    .dashboard-mini-stats,
    .dashboard-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .ui-responsive-table td {
        grid-template-columns: 1fr;
        gap: 0.16rem;
    }

    .ui-responsive-table td::before {
        margin-bottom: 0.04rem;
    }

    .setup-steps {
        grid-template-columns: 1fr !important;
    }
}

/* Desktop/Tablet quer: bewusst kompakt und dicht. */
@media (min-width: 1025px),
       (min-width: 761px) and (max-width: 1024px) and (orientation: landscape) {
    .view-content {
        width: 95%;
    }

    .ui-page-hero,
    .page-hero,
    .page-header {
        min-height: 0;
    }

    .data-table,
    .ui-responsive-table {
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .view-content *,
    .view-content *::before,
    .view-content *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}

.ui-section-spaced { margin-top: var(--ui-space-lg); }


/* Hotfix 19.6.1 – Fortschritts-/Skillbeschreibungen niemals abschneiden.
   Die fachlichen Beschreibungstexte sind auf Desktop, Tablet und Mobil vollständig sichtbar. */
.progress-skill-editor__heading small,
.skill-selection-item__body small,
.progress-category-description,
.progress-description-full,
.progress-catalog-card .data-table td small {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
    -webkit-box-orient: initial !important;
    -webkit-line-clamp: unset !important;
    overflow-wrap: anywhere;
    word-break: normal;
}

.progress-skill-editor__heading,
.skill-selection-item__body,
.progress-catalog-card .data-table td {
    min-width: 0;
}

/* Sprint 19.7.1 – kindgerechte Fortschrittsanzeige für Eltern und Turnende.
   Exakte Prozent-/Scorewerte bleiben ausschließlich in der Fachansicht für Admin/Trainer sichtbar. */
.progress-friendly-intro {
    max-width: 48rem;
    margin-bottom: .35rem;
}

.progress-category-summary__progress--friendly {
    width: auto;
    min-width: auto;
    flex: 0 0 auto;
}

.progress-level-summary-side--friendly {
    grid-template-columns: 1rem;
    width: auto;
    min-width: auto;
    justify-content: end;
}

.progress-friendly-status {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    max-width: 100%;
    padding: .32rem .55rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: normal;
}

.progress-friendly-status__symbol {
    display: inline-grid;
    place-items: center;
    flex: 0 0 1.15rem;
    width: 1.15rem;
    height: 1.15rem;
    font-size: .9rem;
    line-height: 1;
}

.progress-friendly-status--achieved,
.progress-friendly-detail--achieved {
    color: #166534;
    background: color-mix(in srgb, #dcfce7 82%, var(--color-surface));
    border-color: color-mix(in srgb, #16a34a 30%, var(--color-border));
}

.progress-friendly-status--practising,
.progress-friendly-detail--practising {
    color: #1d4ed8;
    background: color-mix(in srgb, #dbeafe 82%, var(--color-surface));
    border-color: color-mix(in srgb, #2563eb 26%, var(--color-border));
}

.progress-friendly-status--upcoming,
.progress-friendly-detail--upcoming {
    color: var(--color-text-muted);
    background: color-mix(in srgb, var(--color-surface) 78%, #e2e8f0);
    border-color: var(--color-border);
}

.progress-skill-readonly--friendly {
    display: grid;
    align-items: start;
    gap: .55rem;
}

.progress-friendly-detail {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: .45rem .65rem;
    border: 1px solid var(--color-border);
    border-radius: .7rem;
    font-size: .76rem;
}

.progress-friendly-detail > span {
    font-size: 1rem;
    line-height: 1;
}

.progress-history-item--friendly {
    align-items: flex-start;
}

@media (max-width: 700px) {
    .progress-skill-editor--friendly > summary {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: .48rem;
    }

    .progress-skill-editor--friendly .progress-skill-editor__status {
        width: 100%;
        justify-content: space-between;
    }

    .progress-skill-editor--friendly .progress-friendly-status {
        flex: 1 1 auto;
        width: fit-content;
    }

    .progress-history-item--friendly {
        display: grid;
        grid-template-columns: 1fr;
        gap: .55rem;
    }

    .progress-history-item--friendly .badge-row {
        margin-top: 0;
    }
}

/* Sprint 19.7.3 – Lizenzstatus für Trainer/innen und Übungshelfer/innen */
.staff-license-section {
    scroll-margin-top: 1.5rem;
}

.staff-license-list,
.profile-license-list {
    display: grid;
    gap: 1rem;
}

.staff-license-card,
.profile-license-item {
    border: 1px solid var(--border-color, rgba(100, 116, 139, 0.24));
    border-radius: 1rem;
    padding: 1rem;
    background: var(--surface-soft, rgba(148, 163, 184, 0.08));
}

.staff-license-card--new {
    margin-top: 1rem;
    border-style: dashed;
}

.staff-license-card__header,
.profile-license-card__header,
.profile-license-item__title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.staff-license-card__header h3,
.staff-license-card__header p,
.profile-license-item__title strong {
    margin-top: 0;
}

.staff-license-form {
    margin-top: 1rem;
}

.staff-license-primary {
    align-self: end;
    min-height: 2.75rem;
}

.staff-license-delete {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
}

.profile-license-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
    margin: 0.85rem 0 0;
}

.profile-license-meta div {
    min-width: 0;
}

.profile-license-meta dt {
    color: var(--text-muted, #64748b);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.profile-license-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .staff-license-card__header,
    .profile-license-card__header,
    .profile-license-item__title {
        flex-direction: column;
        align-items: stretch;
    }

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

    .staff-license-delete {
        justify-content: stretch;
    }

    .staff-license-delete .button {
        width: 100%;
    }
}

/* Sprint 19.7.4 – gruppenbezogene Schnellbewertung */
.quick-assessment-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: var(--ui-space-3);
}

.quick-assessment-group-card {
    display: flex;
    flex-direction: column;
    gap: var(--ui-space-3);
    min-width: 0;
}

.quick-assessment-group-card .button {
    margin-top: auto;
    width: fit-content;
}

.quick-assessment-skill-picker,
.quick-assessment-card {
    margin-top: var(--ui-space-3);
}

.quick-assessment-skill-info {
    display: grid;
    gap: .45rem;
    margin-top: var(--ui-space-3);
    padding: .75rem;
    border: 1px solid var(--color-border);
    border-radius: .8rem;
    background: color-mix(in srgb, var(--color-surface) 90%, var(--color-primary) 10%);
}

.quick-assessment-skill-info > div {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .7rem;
    align-items: baseline;
}

.quick-assessment-skill-info span,
.quick-assessment-skill-info p {
    color: var(--color-text-muted);
}

.quick-assessment-skill-info p {
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.quick-assessment-skill-nav {
    display: flex;
    justify-content: space-between;
    gap: var(--ui-space-2);
    margin-top: var(--ui-space-3);
}

.quick-assessment-list {
    display: grid;
    gap: .55rem;
}

.quick-assessment-row {
    display: grid;
    grid-template-columns: minmax(11rem, 1fr) minmax(22rem, 1.55fr);
    gap: var(--ui-space-3);
    align-items: center;
    padding: .65rem .7rem;
    border: 1px solid var(--color-border);
    border-radius: .78rem;
    background: var(--color-surface);
}

.quick-assessment-row--blocked {
    opacity: .72;
}

.quick-assessment-person {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.quick-assessment-person strong,
.quick-assessment-person small {
    overflow-wrap: anywhere;
}

.quick-assessment-person small {
    color: var(--color-text-muted);
}

.quick-assessment-statuses {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .38rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.quick-assessment-status {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .35rem;
    align-items: center;
    min-width: 0;
    min-height: 2.65rem;
    padding: .42rem .48rem;
    border: 1px solid var(--color-border);
    border-radius: .7rem;
    cursor: pointer;
    background: var(--color-surface);
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.quick-assessment-status:hover {
    border-color: var(--color-primary);
}

.quick-assessment-status input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.quick-assessment-status > span {
    display: grid;
    place-items: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    background: color-mix(in srgb, var(--color-surface) 80%, var(--color-border) 20%);
}

.quick-assessment-status small {
    min-width: 0;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.quick-assessment-status:has(input:checked) {
    border-color: var(--color-primary);
    background: color-mix(in srgb, var(--color-surface) 86%, var(--color-primary) 14%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 48%, transparent);
}

.quick-assessment-status:has(input:focus-visible) {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.quick-assessment-statuses:disabled .quick-assessment-status {
    cursor: not-allowed;
}

.quick-assessment-savebar {
    position: sticky;
    bottom: calc(var(--mobile-nav-height, 0px) + .5rem);
    z-index: 4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--ui-space-2);
    margin-top: var(--ui-space-3);
    padding: .65rem;
    border: 1px solid var(--color-border);
    border-radius: .8rem;
    background: color-mix(in srgb, var(--color-surface) 94%, transparent);
    backdrop-filter: blur(8px);
}

@media (max-width: 900px) {
    .quick-assessment-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .quick-assessment-statuses {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-assessment-status {
        min-height: 3rem;
    }

    .quick-assessment-savebar {
        align-items: stretch;
        flex-direction: column;
    }

    .quick-assessment-savebar .button {
        width: 100%;
    }
}

/* Sprint 19.8 – Web Push */
.push-profile-card,
#push.admin-dashboard-section {
    scroll-margin-top: 1.5rem;
}

.push-profile-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.push-profile-status {
    margin: 0.9rem 0 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border-color, rgba(100, 116, 139, 0.25));
    border-radius: 0.75rem;
    background: var(--surface-soft, rgba(148, 163, 184, 0.08));
    font-weight: 650;
}

.push-profile-status[data-state="success"] {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.09);
}

.push-profile-status[data-state="warning"] {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.09);
}

.push-profile-status[data-state="error"] {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.push-profile-actions {
    flex-wrap: wrap;
}

.push-profile-card__ios-hint {
    margin-top: 0.8rem;
}

@media (max-width: 720px) {
    .push-profile-card__header {
        flex-direction: column;
    }

    .push-profile-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   Elternbereich · Gruppen / Gruppenanträge
   -------------------------------------------------------------------------- */
.parent-group-child-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(20, 37, 63, 0.06);
}

.parent-group-child-card__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

.parent-group-child-card__head h2 {
    margin: 0.1rem 0 0.25rem;
}

.parent-groups-list,
.group-request-admin-list {
    display: grid;
    gap: 0.65rem;
}

.parent-groups-link,
.parent-groups-request-item,
.group-request-admin-item {
    min-width: 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--color-surface) 94%, var(--color-primary) 6%);
    color: inherit;
    text-decoration: none;
}

.parent-groups-link:hover,
.parent-groups-link:focus-visible {
    border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
    background: color-mix(in srgb, var(--color-surface) 90%, var(--color-primary) 10%);
}

.parent-groups-link span:first-child,
.parent-groups-request-item > div,
.group-request-admin-item > div:first-child {
    min-width: 0;
}

.parent-groups-link strong,
.parent-groups-request-item strong,
.group-request-admin-item strong {
    display: block;
}

.parent-groups-link small,
.parent-groups-request-item small,
.group-request-admin-item small {
    display: block;
    margin-top: 0.18rem;
    color: var(--color-muted);
}

.parent-groups-form-wide {
    grid-column: 1 / -1;
}

.group-request-admin-item .table-actions {
    justify-content: flex-end;
}

@media (max-width: 760px) {
    .parent-group-child-card__head,
    .parent-groups-link,
    .parent-groups-request-item,
    .group-request-admin-item {
        align-items: stretch;
        flex-direction: column;
    }

    .group-request-admin-item .table-actions {
        justify-content: flex-start;
    }
}

[data-theme="dark"] .parent-group-child-card,
[data-theme="dark"] .parent-groups-link,
[data-theme="dark"] .parent-groups-request-item,
[data-theme="dark"] .group-request-admin-item {
    background: color-mix(in srgb, var(--color-surface) 94%, black 6%);
}

.parent-group-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ui-space-3);
}

.parent-group-detail-list {
    display: grid;
    gap: 0;
    margin: 0 0 1rem;
}

.parent-group-detail-list > div {
    display: grid;
    grid-template-columns: minmax(7rem, 0.45fr) minmax(0, 1fr);
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--color-border);
}

.parent-group-detail-list dt {
    color: var(--color-muted);
    font-weight: 700;
}

.parent-group-detail-list dd {
    margin: 0;
}

.parent-group-staff {
    margin-top: 1rem;
}

.parent-group-staff > strong {
    display: block;
    margin-bottom: 0.5rem;
}

@media (max-width: 760px) {
    .parent-group-detail-grid {
        grid-template-columns: 1fr;
    }

    .parent-group-detail-list > div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}

/* Sprint 19.8.1.23 – Gruppenmitgliedschaften in der Praxis */
.membership-bulk-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: var(--ui-space-3);
    margin-bottom: var(--ui-space-3);
    padding: var(--ui-space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--color-surface) 96%, var(--color-primary) 4%);
}

.membership-bulk-form > label {
    min-width: min(100%, 13rem);
    margin: 0;
}

.table-select {
    width: 4.8rem;
    text-align: center;
}

.table-select input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
}

.table-select-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .membership-bulk-form {
        align-items: stretch;
        flex-direction: column;
    }

    .membership-bulk-form > label,
    .membership-bulk-form .button {
        width: 100%;
    }

    .table-select {
        width: auto;
        text-align: left;
    }
}

/* Sprint 19.8.4.7 – eigener, mobil-first Fortschrittsbereich für Turnende.
   Die Fachansicht für Admin/Trainer und die Elternansicht bleiben unverändert. */
.athlete-progress-v47-hero small {
    display: block;
    margin-top: .45rem;
    color: var(--color-text-muted);
}

.athlete-progress-v47-intro {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.athlete-progress-v47-status {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-width: 0;
    padding: .85rem .95rem;
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    background: var(--color-surface);
}

.athlete-progress-v47-status > span {
    display: grid;
    place-items: center;
    flex: 0 0 2.2rem;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    font-size: 1.2rem;
    font-weight: 800;
}

.athlete-progress-v47-status > div {
    display: grid;
    gap: .14rem;
    min-width: 0;
}

.athlete-progress-v47-status strong {
    font-size: .82rem;
}

.athlete-progress-v47-status small {
    color: var(--color-text-muted);
    font-size: .68rem;
    line-height: 1.35;
}

.athlete-progress-v47-status--achieved > span {
    color: #166534;
    background: color-mix(in srgb, #dcfce7 88%, var(--color-surface));
}

.athlete-progress-v47-status--practising > span {
    color: #1d4ed8;
    background: color-mix(in srgb, #dbeafe 88%, var(--color-surface));
}

.athlete-progress-v47-status--upcoming > span {
    color: var(--color-text-muted);
    background: color-mix(in srgb, var(--color-surface) 72%, #e2e8f0);
}

.athlete-progress-v47-overview {
    margin-bottom: 1rem;
}

.athlete-progress-v47-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: .7rem;
}

.athlete-progress-v47-category-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    padding: .72rem .78rem;
    border: 1px solid var(--color-border);
    border-radius: .9rem;
    color: inherit;
    background: color-mix(in srgb, var(--color-surface) 94%, var(--color-primary) 2%);
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.athlete-progress-v47-category-card:hover,
.athlete-progress-v47-category-card:focus-visible {
    border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
    background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
    transform: translateY(-1px);
}

.athlete-progress-v47-category-card > span:nth-child(2),
.athlete-progress-v47-category-summary > span:nth-child(2) {
    display: grid;
    gap: .08rem;
    min-width: 0;
}

.athlete-progress-v47-category-card strong,
.athlete-progress-v47-category-summary strong {
    overflow-wrap: anywhere;
    font-size: .78rem;
}

.athlete-progress-v47-category-card small,
.athlete-progress-v47-category-summary small {
    color: var(--color-text-muted);
    font-size: .66rem;
}

.athlete-progress-v47-category-card__mark {
    display: grid;
    place-items: center;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    border-radius: .72rem;
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
    font-size: .82rem;
    font-weight: 800;
}

.athlete-progress-v47-category-card__arrow {
    color: var(--color-text-muted);
    font-size: 1.25rem;
    line-height: 1;
}

.athlete-progress-v47-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem 1rem;
    margin-bottom: .8rem;
    padding: .7rem .8rem;
    border: 1px solid var(--color-border);
    border-radius: .9rem;
    background: var(--color-surface);
}

.athlete-progress-v47-filter > div:first-child {
    display: grid;
    gap: .08rem;
}

.athlete-progress-v47-filter strong {
    font-size: .78rem;
}

.athlete-progress-v47-filter small {
    color: var(--color-text-muted);
    font-size: .66rem;
}

.athlete-progress-v47-filter__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .38rem;
}

.athlete-progress-v47-empty-filter {
    margin-bottom: .8rem;
}

.athlete-progress-v47-categories {
    display: grid;
    gap: .8rem;
}

.athlete-progress-v47-category {
    scroll-margin-top: 1rem;
    padding: 0;
    overflow: hidden;
}

.athlete-progress-v47-category > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    min-height: 4rem;
    padding: .75rem .85rem;
    cursor: pointer;
    list-style: none;
}

.athlete-progress-v47-category > summary::-webkit-details-marker,
.athlete-progress-v47-history > summary::-webkit-details-marker {
    display: none;
}

.athlete-progress-v47-category[open] > summary {
    border-bottom: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--color-primary) 4%, var(--color-surface));
}

.athlete-progress-v47-category-summary {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
}

.athlete-progress-v47-category-summary__action {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    flex: 0 0 auto;
    color: var(--color-text-muted);
    font-size: .68rem;
    font-weight: 700;
}

.athlete-progress-v47-category-summary__action > span {
    display: inline-block;
    transition: transform .16s ease;
}

.athlete-progress-v47-category[open] .athlete-progress-v47-category-summary__action > span {
    transform: rotate(180deg);
}

.athlete-progress-v47-category__content {
    padding: .8rem;
}

.athlete-progress-v47-category__content > .progress-category-description {
    margin: 0 0 .8rem;
    padding: .65rem .75rem;
    border-radius: .75rem;
    color: var(--color-text-muted);
    background: var(--color-surface-soft, color-mix(in srgb, var(--color-surface) 92%, #94a3b8));
    line-height: 1.5;
}

.athlete-progress-v47-levels {
    display: grid;
    gap: .9rem;
}

.athlete-progress-v47-level {
    min-width: 0;
}

.athlete-progress-v47-level__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    margin-bottom: .45rem;
}

.athlete-progress-v47-level__head h3 {
    margin: 0;
    font-size: .78rem;
}

.athlete-progress-v47-skill-list {
    display: grid;
    gap: .45rem;
}

.athlete-progress-v47-skill {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: .75rem;
    min-width: 0;
    padding: .72rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: .78rem;
    background: var(--color-surface);
}

.athlete-progress-v47-skill__main {
    display: grid;
    gap: .22rem;
    min-width: 0;
}

.athlete-progress-v47-skill__main > strong {
    overflow-wrap: anywhere;
    font-size: .76rem;
}

.athlete-progress-v47-skill__main > p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: .68rem;
    line-height: 1.48;
}

.athlete-progress-v47-skill__status {
    flex: 0 0 auto;
}

.athlete-progress-v47-note {
    margin-top: .18rem;
    padding: .55rem .62rem;
    border-left: 3px solid color-mix(in srgb, var(--color-primary) 55%, var(--color-border));
    border-radius: .4rem .65rem .65rem .4rem;
    background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
}

.athlete-progress-v47-note small {
    display: block;
    margin-bottom: .12rem;
    color: var(--color-text-muted);
    font-size: .62rem;
    font-weight: 700;
}

.athlete-progress-v47-note p {
    margin: 0;
    color: inherit;
}

.athlete-progress-v47-date {
    color: var(--color-text-muted);
    font-size: .62rem;
}

.athlete-progress-v47-philosophy {
    margin-top: 1rem;
}

.athlete-progress-v47-philosophy p {
    margin: .2rem 0 0;
}

.athlete-progress-v47-history {
    margin-top: 1rem;
    padding: 0;
    overflow: hidden;
}

.athlete-progress-v47-history > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    padding: .8rem .85rem;
    cursor: pointer;
    list-style: none;
}

.athlete-progress-v47-history > summary > span:first-child {
    display: grid;
    gap: .12rem;
}

.athlete-progress-v47-history > summary strong {
    font-size: .8rem;
}

.athlete-progress-v47-history > summary small {
    color: var(--color-text-muted);
    font-size: .66rem;
}

.athlete-progress-v47-history[open] > summary {
    border-bottom: 1px solid var(--color-border);
}

.athlete-progress-v47-history__content {
    display: grid;
    gap: .9rem;
    padding: .8rem;
}

.athlete-progress-v47-history-category h3 {
    margin: 0 0 .45rem;
    font-size: .78rem;
}

.athlete-progress-v47-history-list {
    display: grid;
    gap: .4rem;
}

.athlete-progress-v47-history-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .7rem;
    padding: .6rem .68rem;
    border: 1px solid var(--color-border);
    border-radius: .7rem;
}

.athlete-progress-v47-history-item > span:first-child {
    display: grid;
    gap: .1rem;
    min-width: 0;
}

.athlete-progress-v47-history-item strong {
    overflow-wrap: anywhere;
    font-size: .72rem;
}

.athlete-progress-v47-history-item small {
    color: var(--color-text-muted);
    font-size: .62rem;
}

@media (max-width: 850px) {
    .athlete-progress-v47-intro {
        grid-template-columns: 1fr;
    }

    .athlete-progress-v47-filter {
        align-items: flex-start;
        flex-direction: column;
    }

    .athlete-progress-v47-filter__buttons {
        justify-content: flex-start;
        width: 100%;
    }
}

@media (max-width: 700px) {
    .athlete-progress-v47-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .athlete-progress-v47-category-card {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        padding: .7rem;
    }

    .athlete-progress-v47-category-card__arrow {
        display: none;
    }

    .athlete-progress-v47-filter__buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .athlete-progress-v47-filter__buttons .button {
        width: 100%;
        min-width: 0;
        white-space: normal;
    }

    .athlete-progress-v47-category > summary {
        align-items: flex-start;
        flex-direction: column;
        gap: .45rem;
    }

    .athlete-progress-v47-category-summary__action {
        align-self: flex-end;
    }

    .athlete-progress-v47-skill {
        grid-template-columns: 1fr;
        gap: .5rem;
    }

    .athlete-progress-v47-skill__status {
        justify-self: start;
    }

    .athlete-progress-v47-history-item {
        flex-direction: column;
    }
}

@media (max-width: 430px) {
    .athlete-progress-v47-category-grid {
        grid-template-columns: 1fr;
    }
}

.athlete-progress-v47-category-card[hidden],
.athlete-progress-v47-category[hidden],
.athlete-progress-v47-level[hidden],
.athlete-progress-v47-skill[hidden],
.athlete-progress-v47-empty-filter[hidden] {
    display: none !important;
}

/* Sprint 19.8.4.8 – Turnenden-Profil und persönliche Aufgaben.
   Eigene Athlete-Komponenten, damit die generischen Ansichten anderer Rollen unverändert bleiben. */
.athlete-profile-v48-hero p,
.athlete-tasks-v48-hero p {
    max-width: 46rem;
}

.athlete-profile-v48-overview,
.athlete-tasks-v48-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
    margin: .8rem 0 1rem;
}

.athlete-profile-v48-stat,
.athlete-tasks-v48-overview-card {
    display: flex;
    align-items: center;
    gap: .7rem;
    min-width: 0;
    padding: .78rem .82rem;
    border: 1px solid var(--color-border);
    border-radius: .9rem;
    background: var(--color-surface);
    box-shadow: var(--ui-shadow);
}

.athlete-profile-v48-stat__icon {
    display: grid;
    place-items: center;
    flex: 0 0 2.1rem;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: .72rem;
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
    font-size: .62rem;
    font-weight: 900;
}

.athlete-profile-v48-stat > div,
.athlete-tasks-v48-overview-card {
    min-width: 0;
}

.athlete-profile-v48-stat small,
.athlete-tasks-v48-overview-card small {
    display: block;
    color: var(--color-text-muted);
    font-size: .62rem;
    font-weight: 700;
}

.athlete-profile-v48-stat strong,
.athlete-tasks-v48-overview-card strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: .82rem;
}

.athlete-profile-v48-stat span:not(.athlete-profile-v48-stat__icon),
.athlete-tasks-v48-overview-card span {
    display: block;
    margin-top: .08rem;
    color: var(--color-text-muted);
    font-size: .62rem;
}

.athlete-profile-v48-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

.athlete-profile-v48-section {
    margin-top: 0 !important;
}

.athlete-profile-v48-data-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.athlete-profile-v48-data-list > div {
    display: grid;
    grid-template-columns: minmax(7.5rem, .42fr) minmax(0, 1fr);
    gap: .7rem;
    align-items: start;
    padding: .58rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
}

.athlete-profile-v48-data-list > div:last-child {
    border-bottom: 0;
}

.athlete-profile-v48-data-list dt {
    color: var(--color-text-muted);
    font-size: .66rem;
    font-weight: 700;
}

.athlete-profile-v48-data-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: .72rem;
    font-weight: 700;
}

.athlete-profile-v48-data-list dd a {
    color: var(--color-primary);
}

.athlete-profile-v48-subsection {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--color-border);
}

.athlete-profile-v48-subsection__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .5rem;
}

.athlete-profile-v48-subsection__head h3 {
    margin: 0;
    font-size: .76rem;
}

.athlete-profile-v48-address {
    display: grid;
    gap: .12rem;
    margin: 0;
    color: inherit;
    font-size: .72rem;
    font-style: normal;
    line-height: 1.45;
}

.athlete-profile-v48-readonly {
    margin-top: .8rem;
}

.athlete-profile-v48-readonly p,
.athlete-tasks-v48-hint p {
    margin: .15rem 0 0;
}

.athlete-profile-v48-safety-status {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .65rem;
    padding: .68rem .72rem;
    border: 1px solid var(--color-border);
    border-radius: .8rem;
    background: var(--color-surface-soft, var(--color-surface));
}

.athlete-profile-v48-safety-status > span {
    display: grid;
    place-items: center;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    font-weight: 900;
}

.athlete-profile-v48-safety-status.is-positive > span {
    color: #166534;
    background: color-mix(in srgb, #dcfce7 86%, var(--color-surface));
}

.athlete-profile-v48-safety-status.is-neutral > span {
    color: #92400e;
    background: color-mix(in srgb, #fef3c7 86%, var(--color-surface));
}

.athlete-profile-v48-safety-status small,
.athlete-profile-v48-safety-status strong {
    display: block;
}

.athlete-profile-v48-safety-status small {
    color: var(--color-text-muted);
    font-size: .62rem;
}

.athlete-profile-v48-safety-status strong {
    font-size: .72rem;
}

.athlete-profile-v48-medical-note {
    padding: .68rem .72rem;
    border-left: 3px solid #d97706;
    border-radius: .45rem .7rem .7rem .45rem;
    background: color-mix(in srgb, #fef3c7 55%, var(--color-surface));
    font-size: .7rem;
    line-height: 1.5;
}

.athlete-profile-v48-group-grid,
.athlete-profile-v48-account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: .6rem;
}

.athlete-profile-v48-group-card,
.athlete-profile-v48-account-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    min-width: 0;
    padding: .7rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: .82rem;
    color: inherit;
    background: color-mix(in srgb, var(--color-surface) 95%, var(--color-primary) 2%);
    text-decoration: none;
}

.athlete-profile-v48-account-link {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title arrow"
        "description arrow";
    column-gap: .65rem;
    row-gap: .08rem;
}

.athlete-profile-v48-account-link > strong {
    grid-area: title;
    min-width: 0;
    word-break: normal;
    overflow-wrap: break-word;
}

.athlete-profile-v48-account-link > small {
    grid-area: description;
    min-width: 0;
    margin-top: 0;
    word-break: normal;
    overflow-wrap: break-word;
}

.athlete-profile-v48-account-link > span:last-child {
    grid-area: arrow;
    align-self: center;
}

.athlete-profile-v48-group-card:hover,
.athlete-profile-v48-group-card:focus-visible,
.athlete-profile-v48-account-link:hover,
.athlete-profile-v48-account-link:focus-visible {
    border-color: color-mix(in srgb, var(--color-primary) 42%, var(--color-border));
    background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
}

.athlete-profile-v48-group-card__mark {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: .68rem;
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
    font-size: .78rem;
    font-weight: 900;
}

.athlete-profile-v48-group-card strong,
.athlete-profile-v48-account-link strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: .74rem;
}

.athlete-profile-v48-group-card small,
.athlete-profile-v48-account-link small {
    display: block;
    margin-top: .08rem;
    color: var(--color-text-muted);
    font-size: .62rem;
    line-height: 1.35;
}

.athlete-profile-v48-group-card > span:last-child,
.athlete-profile-v48-account-link > span:last-child {
    color: var(--color-text-muted);
    font-size: 1.15rem;
}

.athlete-tasks-v48-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.athlete-tasks-v48-overview-card {
    display: grid;
    gap: .02rem;
}

.athlete-tasks-v48-overview-card strong {
    font-size: 1.35rem;
    line-height: 1.05;
}

.athlete-tasks-v48-overview-card.is-urgent {
    border-color: color-mix(in srgb, #dc2626 36%, var(--color-border));
    background: color-mix(in srgb, #fee2e2 40%, var(--color-surface));
}

.athlete-tasks-v48-overview-card.is-important {
    border-color: color-mix(in srgb, #d97706 34%, var(--color-border));
    background: color-mix(in srgb, #fef3c7 42%, var(--color-surface));
}

.athlete-tasks-v48-empty {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: 1rem !important;
}

.athlete-tasks-v48-empty__icon {
    display: grid;
    place-items: center;
    flex: 0 0 2.8rem;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 999px;
    color: #166534;
    background: color-mix(in srgb, #dcfce7 84%, var(--color-surface));
    font-size: 1.35rem;
    font-weight: 900;
}

.athlete-tasks-v48-empty h2,
.athlete-tasks-v48-empty p {
    margin-top: .15rem;
}

.athlete-tasks-v48-groups,
.athlete-tasks-v48-list {
    display: grid;
    gap: .75rem;
}

.athlete-tasks-v48-group {
    padding: 0 !important;
    overflow: hidden;
}

.athlete-tasks-v48-group__header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    padding: .78rem .82rem;
    border-bottom: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--color-primary) 3%, var(--color-surface));
}

.athlete-tasks-v48-group__header h2,
.athlete-tasks-v48-group__header p {
    margin: 0;
}

.athlete-tasks-v48-group__header h2 {
    font-size: .82rem;
}

.athlete-tasks-v48-group__header > div > p:last-child {
    margin-top: .15rem;
    color: var(--color-text-muted);
    font-size: .66rem;
}

.athlete-tasks-v48-group__mark,
.athlete-tasks-v48-group__count {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 999px;
    font-weight: 900;
}

.athlete-tasks-v48-group__mark {
    width: 2.15rem;
    height: 2.15rem;
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
    font-size: .72rem;
}

.athlete-tasks-v48-group__count {
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0 .4rem;
    color: #fff;
    background: #d92d20;
    font-size: .7rem;
}

.athlete-tasks-v48-list {
    padding: .75rem;
}

.athlete-tasks-v48-item {
    min-width: 0;
    padding: .68rem .72rem;
    border: 1px solid var(--color-border);
    border-left-width: 4px;
    border-radius: .78rem;
    background: var(--color-surface);
}

.athlete-tasks-v48-item.is-urgent {
    border-left-color: #dc2626;
}

.athlete-tasks-v48-item.is-important {
    border-left-color: #d97706;
}

.athlete-tasks-v48-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .4rem;
}

.athlete-tasks-v48-item__head > small {
    color: var(--color-text-muted);
    font-size: .62rem;
    text-align: right;
}

.athlete-tasks-v48-urgency {
    display: inline-flex;
    width: fit-content;
    padding: .2rem .45rem;
    border-radius: 999px;
    background: color-mix(in srgb, #fef3c7 72%, var(--color-surface));
    color: #92400e;
    font-size: .6rem;
    font-weight: 800;
}

.athlete-tasks-v48-item.is-urgent .athlete-tasks-v48-urgency {
    color: #991b1b;
    background: color-mix(in srgb, #fee2e2 72%, var(--color-surface));
}

.athlete-tasks-v48-item__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
}

.athlete-tasks-v48-item__body h3,
.athlete-tasks-v48-item__body p {
    margin: 0;
}

.athlete-tasks-v48-item__body h3 {
    overflow-wrap: anywhere;
    font-size: .76rem;
}

.athlete-tasks-v48-item__body p {
    margin-top: .12rem;
    color: var(--color-text-muted);
    font-size: .66rem;
    line-height: 1.4;
}

.athlete-tasks-v48-hint {
    margin-top: .8rem;
}

.athlete-tasks-v48-hint a {
    display: inline-block;
    margin-top: .35rem;
    color: var(--color-primary);
    font-size: .68rem;
    font-weight: 800;
}

@media (max-width: 1024px) {
    .athlete-profile-v48-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px),
       (min-width: 761px) and (max-width: 1024px) and (orientation: portrait) {
    .athlete-profile-v48-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .athlete-profile-v48-overview,
    .athlete-tasks-v48-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .athlete-profile-v48-section {
        margin-top: 0 !important;
    }

    .athlete-profile-v48-group-grid,
    .athlete-profile-v48-account-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .athlete-tasks-v48-group__header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: start;
    }

    .athlete-tasks-v48-item__body {
        grid-template-columns: minmax(0, 1fr);
    }

    .athlete-tasks-v48-item__body .button {
        width: 100%;
        justify-self: stretch;
    }
}

@media (max-width: 520px) {
    .athlete-profile-v48-overview,
    .athlete-tasks-v48-overview {
        grid-template-columns: minmax(0, 1fr);
    }

    .athlete-profile-v48-stat {
        padding: .7rem .72rem;
    }

    .athlete-profile-v48-data-list > div {
        grid-template-columns: minmax(0, 1fr);
        gap: .14rem;
    }

    .athlete-profile-v48-subsection__head,
    .athlete-tasks-v48-item__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .athlete-tasks-v48-item__head > small {
        text-align: left;
    }

    .athlete-tasks-v48-group__header {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .athlete-tasks-v48-group__count {
        grid-column: 2;
        justify-self: start;
    }

    .athlete-tasks-v48-empty {
        flex-direction: column;
    }
}

/* Hotfix 19.8.4.15.1 – Turnenden-Profil auf Smartphone und Tablet stabilisieren. */
.athlete-profile-v48-grid,
.athlete-profile-v48-section,
.athlete-profile-v48-groups,
.athlete-profile-v48-account,
.athlete-profile-v48-group-grid,
.athlete-profile-v48-account-grid,
.athlete-profile-v48-group-card,
.athlete-profile-v48-account-link {
    min-width: 0;
    max-width: 100%;
}

.athlete-profile-v48-safety-status > div {
    min-width: 0;
}

.athlete-profile-v48-safety-status strong,
.athlete-profile-v48-subsection__head h3,
.athlete-profile-v48-group-card strong {
    word-break: normal;
    overflow-wrap: break-word;
}

@media (max-width: 760px),
       (min-width: 761px) and (max-width: 1024px) and (orientation: portrait) {
    .athlete-profile-v48-grid,
    .athlete-profile-v48-group-grid,
    .athlete-profile-v48-account-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }

    .athlete-profile-v48-account-link {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "title arrow"
            "description arrow";
        align-items: center;
    }

    .athlete-profile-v48-group-card {
        width: 100%;
        grid-template-columns: auto minmax(0, 1fr) auto;
    }
}

@media (max-width: 520px) {
    .athlete-profile-v48-section,
    .athlete-profile-v48-groups,
    .athlete-profile-v48-account {
        overflow: hidden;
    }

    .athlete-profile-v48-safety-status {
        align-items: flex-start;
    }

    .athlete-profile-v48-account-link {
        padding: .78rem .8rem;
    }

    .athlete-profile-v48-account-link > strong,
    .athlete-profile-v48-group-card strong {
        font-size: .76rem;
        line-height: 1.3;
    }

    .athlete-profile-v48-account-link > small,
    .athlete-profile-v48-group-card small {
        font-size: .64rem;
        line-height: 1.4;
    }
}

/* Sprint 19.8.4.9 – allgemeiner Profilbereich im aktuellen App-Stil.
   Gilt rollenübergreifend für /profil. */
.profile-v49 {
    width: 100%;
}

.profile-v49-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(16rem, .65fr);
    gap: 1rem;
    align-items: center;
}

.profile-v49-identity {
    display: flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
}

.profile-v49-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 3.8rem;
    width: 3.8rem;
    height: 3.8rem;
    border: 1px solid color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
    border-radius: 1.15rem;
    color: var(--color-primary-dark);
    background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: .04em;
}

.profile-v49-identity__text {
    min-width: 0;
}

.profile-v49-identity__text h1 {
    margin-bottom: .15rem;
}

.profile-v49-identity__text > p:not(.eyebrow) {
    margin: 0;
    color: var(--color-text-muted);
    overflow-wrap: anywhere;
}

.profile-v49-role-row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .55rem;
}

.profile-v49-hero-copy {
    display: grid;
    gap: .18rem;
    padding: .8rem .9rem;
    border: 1px solid var(--color-border);
    border-radius: .9rem;
    background: color-mix(in srgb, var(--color-primary) 4%, var(--color-surface));
}

.profile-v49-hero-copy strong {
    font-size: .78rem;
}

.profile-v49-hero-copy span {
    color: var(--color-text-muted);
    font-size: .68rem;
    line-height: 1.45;
}

.profile-v49-jump-nav {
    display: flex;
    gap: .45rem;
    width: 100%;
    margin: .8rem 0 1rem;
    padding: .08rem 0 .28rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.profile-v49-jump-nav::-webkit-scrollbar {
    display: none;
}

.profile-v49-jump-nav a {
    flex: 0 0 auto;
    padding: .5rem .72rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-text);
    background: var(--color-surface);
    font-size: .7rem;
    font-weight: 750;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.profile-v49-jump-nav a:hover,
.profile-v49-jump-nav a:focus-visible {
    border-color: color-mix(in srgb, var(--color-primary) 44%, var(--color-border));
    color: var(--color-primary-dark);
    background: color-mix(in srgb, var(--color-primary) 7%, var(--color-surface));
    outline: none;
}

.profile-v49-stack {
    display: grid;
    gap: 1rem;
}

.profile-v49-section {
    scroll-margin-top: 1rem;
    padding: 1rem;
}

.profile-v49-section__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .9rem;
}

.profile-v49-section__head > div:first-child {
    min-width: 0;
}

.profile-v49-section__head h2 {
    margin: .08rem 0 .22rem;
}

.profile-v49-section__head p:not(.eyebrow) {
    max-width: 48rem;
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.45;
}

.profile-v49-section__mark {
    display: grid;
    place-items: center;
    flex: 0 0 2.35rem;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: .8rem;
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
    font-size: .8rem;
    font-weight: 900;
}

.profile-v49-form {
    display: grid;
    gap: .75rem;
}

.profile-v49-split,
.profile-v49-security-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

.profile-v49-subcard {
    display: grid;
    align-content: start;
    gap: .72rem;
    min-width: 0;
    margin: 0;
    padding: .85rem;
    border: 1px solid var(--color-border);
    border-radius: .9rem;
    background: color-mix(in srgb, var(--color-surface) 96%, var(--color-primary) 1.5%);
}

.profile-v49-subcard h3 {
    margin: 0;
    font-size: .8rem;
}

.profile-v49-subcard p {
    margin: .18rem 0 0;
}

.profile-v49-theme-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0;
}

.profile-v49-theme-grid .theme-choice-button {
    min-width: 0;
    padding: .7rem;
}

.profile-v49-theme-grid .theme-choice-icon {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 1rem;
}

.profile-v49-device-status {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .8rem 1rem;
    align-items: center;
    padding: .78rem .85rem;
    border: 1px solid var(--color-border);
    border-radius: .9rem;
    background: color-mix(in srgb, var(--color-surface) 95%, var(--color-primary) 2%);
}

.profile-v49-device-status > div:first-child {
    min-width: 0;
}

.profile-v49-device-status strong {
    display: block;
    margin-bottom: .18rem;
    font-size: .76rem;
}

.profile-v49-device-status .push-profile-status {
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--color-text-muted);
    background: transparent;
    font-size: .67rem;
    font-weight: 650;
}

.profile-v49-device-status .push-profile-status[data-state="success"] {
    color: #15803d;
}

.profile-v49-device-status .push-profile-status[data-state="warning"] {
    color: #b45309;
}

.profile-v49-device-status .push-profile-status[data-state="error"] {
    color: #b91c1c;
}

.profile-v49-device-status .push-profile-actions {
    display: flex;
    justify-content: flex-end;
    gap: .4rem;
    margin: 0;
}

.profile-v49-device-status .push-profile-actions .button {
    min-height: 2.15rem;
    padding: .45rem .65rem;
}

.profile-v49-push-preferences {
    display: grid;
    gap: .75rem;
    margin-top: .9rem;
}

.profile-v49-subsection-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.profile-v49-subsection-head h3 {
    margin: 0;
    font-size: .82rem;
}

.profile-v49-subsection-head p {
    margin: .12rem 0 0;
    color: var(--color-text-muted);
    font-size: .66rem;
}

.profile-v49-save-state {
    flex: 0 0 auto;
    padding: .3rem .5rem;
    border-radius: 999px;
    color: var(--color-text-muted);
    background: var(--color-surface-soft, color-mix(in srgb, var(--color-surface) 88%, #94a3b8));
    font-size: .61rem;
    font-weight: 750;
}

.profile-v49-save-state[data-state="saving"] {
    color: #92400e;
    background: #fef3c7;
}

.profile-v49-save-state[data-state="success"] {
    color: #166534;
    background: #dcfce7;
}

.profile-v49-save-state[data-state="error"] {
    color: #991b1b;
    background: #fee2e2;
}

.profile-v49-toggle-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
}

.profile-v49-toggle-list--compact {
    margin-top: .55rem;
}

.profile-v49-toggle-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .7rem;
    align-items: center;
    min-width: 0;
    padding: .68rem .72rem;
    border: 1px solid var(--color-border);
    border-radius: .82rem;
    background: var(--color-surface);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.profile-v49-toggle-row:hover {
    border-color: color-mix(in srgb, var(--color-primary) 36%, var(--color-border));
    background: color-mix(in srgb, var(--color-primary) 3%, var(--color-surface));
}

.profile-v49-toggle-row:has(.app-toggle input:focus-visible) {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.profile-v49-toggle-row__text {
    display: grid;
    gap: .1rem;
    min-width: 0;
}

.profile-v49-toggle-row__text strong {
    font-size: .73rem;
}

.profile-v49-toggle-row__text small {
    color: var(--color-text-muted);
    font-size: .63rem;
    line-height: 1.35;
}

.app-toggle {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.app-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
}

.app-toggle__track {
    position: relative;
    display: block;
    width: 2.45rem;
    height: 1.42rem;
    border: 1px solid color-mix(in srgb, var(--color-text-muted) 28%, var(--color-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-text-muted) 16%, var(--color-surface));
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .09);
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.app-toggle__thumb {
    position: absolute;
    top: 50%;
    left: .14rem;
    width: 1.08rem;
    height: 1.08rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .28);
    transform: translateY(-50%);
    transition: left .16s ease, transform .16s ease;
}

.app-toggle input:checked + .app-toggle__track {
    border-color: color-mix(in srgb, var(--color-primary) 72%, var(--color-border));
    background: var(--color-primary);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary-dark) 20%, transparent);
}

.app-toggle input:checked + .app-toggle__track .app-toggle__thumb {
    left: 1.17rem;
}

.app-toggle input:disabled + .app-toggle__track {
    opacity: .48;
    cursor: not-allowed;
}

.profile-v49-push-details {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: .85rem;
    background: color-mix(in srgb, var(--color-surface) 97%, var(--color-primary) 1%);
}

.profile-v49-push-details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    padding: .68rem .75rem;
    cursor: pointer;
    list-style: none;
}

.profile-v49-push-details > summary::-webkit-details-marker {
    display: none;
}

.profile-v49-push-details > summary > span:first-child {
    display: grid;
    gap: .08rem;
}

.profile-v49-push-details > summary strong {
    font-size: .74rem;
}

.profile-v49-push-details > summary small {
    color: var(--color-text-muted);
    font-size: .62rem;
}

.profile-v49-push-details > summary > span:last-child {
    transition: transform .16s ease;
}

.profile-v49-push-details[open] > summary > span:last-child {
    transform: rotate(180deg);
}

.profile-v49-push-details__content {
    padding: 0 .75rem .75rem;
    border-top: 1px solid var(--color-border);
}

.profile-v49-push-details__content > p {
    margin: .65rem 0 0;
}

.profile-v49-push-preferences.is-auto-save-enabled .profile-v49-push-fallback-save {
    display: none;
}

.profile-v49-app-heading {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.profile-v49-app-heading > div {
    min-width: 0;
}

.profile-v49-logout-card {
    align-content: space-between;
}

[data-theme="dark"] .app-toggle__thumb {
    background: #f8fafc;
}

[data-theme="dark"] .profile-v49-save-state[data-state="saving"] {
    color: #fde68a;
    background: rgba(146, 64, 14, .4);
}

[data-theme="dark"] .profile-v49-save-state[data-state="success"] {
    color: #bbf7d0;
    background: rgba(22, 101, 52, .42);
}

[data-theme="dark"] .profile-v49-save-state[data-state="error"] {
    color: #fecaca;
    background: rgba(153, 27, 27, .42);
}

@media (max-width: 900px) {
    .profile-v49-hero {
        grid-template-columns: 1fr;
    }

    .profile-v49-hero-copy {
        display: none;
    }

    .profile-v49-toggle-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .profile-v49-section {
        padding: .85rem;
    }

    .profile-v49-split,
    .profile-v49-security-grid {
        grid-template-columns: 1fr;
    }

    .profile-v49-device-status {
        grid-template-columns: 1fr;
    }

    .profile-v49-device-status .push-profile-actions {
        justify-content: flex-start;
    }

    .profile-v49-subsection-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-v49-theme-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .profile-v49-identity {
        align-items: flex-start;
    }

    .profile-v49-avatar {
        flex-basis: 3.2rem;
        width: 3.2rem;
        height: 3.2rem;
        border-radius: .95rem;
        font-size: 1rem;
    }

    .profile-v49-section__head {
        gap: .7rem;
    }

    .profile-v49-section__mark {
        display: none;
    }

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

    .profile-v49-theme-grid .theme-choice-button {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: .1rem .55rem;
    }

    .profile-v49-theme-grid .theme-choice-button small {
        grid-column: 2;
    }

    .profile-v49-device-status .push-profile-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .profile-v49-device-status .push-profile-actions .button {
        width: 100%;
    }

    .profile-v49-device-status .push-profile-actions [data-push-test] {
        grid-column: 1 / -1;
    }

    .profile-v49-toggle-row {
        padding: .65rem;
    }
}

/* Hotfix 19.8.4.15.2 – Turnenden-Profil: Tablet-Hochformat.
   Die generische Section-Header-Zeile bleibt ab >760px sonst horizontal. Auf Tablets im
   Hochformat führt das in den v48-Profilkarten zu verschobenen Überschriften. Für diese
   Ansicht wird deshalb derselbe einspaltige Aufbau wie auf Smartphones erzwungen. */
@media (min-width: 761px) and (max-width: 1100px) and (orientation: portrait) {
    .athlete-profile-v48-grid,
    .athlete-profile-v48-group-grid,
    .athlete-profile-v48-account-grid {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .athlete-profile-v48-section,
    .athlete-profile-v48-groups,
    .athlete-profile-v48-account {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .athlete-profile-v48-section > .section-header,
    .athlete-profile-v48-groups > .section-header,
    .athlete-profile-v48-account > .section-header {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        align-items: start !important;
        justify-items: stretch;
        width: 100%;
        min-width: 0;
    }

    .athlete-profile-v48-section > .section-header > div,
    .athlete-profile-v48-groups > .section-header > div,
    .athlete-profile-v48-account > .section-header > div {
        width: 100%;
        min-width: 0;
        max-width: none;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left;
    }

    .athlete-profile-v48-groups > .section-header > .button {
        justify-self: start;
        width: auto;
        max-width: 100%;
    }

    .athlete-profile-v48-subsection__head {
        width: 100%;
        min-width: 0;
    }

    .athlete-profile-v48-account-link,
    .athlete-profile-v48-group-card {
        width: 100%;
        max-width: 100%;
    }
}


/* Hotfix 19.8.4.15.3 – Turnenden-Profil: struktureller Header-Fix.
   Die vier Profilbereiche verwenden nicht mehr die globale .section-header/.ui-section-header-
   Komponente. Diese globale Flex-Komponente und das profilbezogene Responsive-Grid griffen auf
   Tablets gleichzeitig ineinander. Der v48-Profilkopf ist deshalb jetzt eine vollständig eigene,
   deterministische Grid-Komponente. */
.athlete-profile-v48-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    justify-content: stretch;
    gap: .55rem .9rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0 0 var(--ui-space-3, .7rem);
    padding: 0;
}

.athlete-profile-v48-section-head__copy {
    grid-column: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    justify-self: start;
    text-align: left;
}

.athlete-profile-v48-section-head__copy > .eyebrow,
.athlete-profile-v48-section-head__copy > h2,
.athlete-profile-v48-section-head__copy > p {
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left !important;
}

.athlete-profile-v48-section-head__copy > h2 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    overflow-wrap: break-word;
    word-break: normal;
}

.athlete-profile-v48-section-head__copy > p:not(.eyebrow) {
    margin-top: .12rem !important;
    margin-bottom: 0 !important;
    color: var(--color-text-muted, var(--color-muted));
    overflow-wrap: break-word;
    word-break: normal;
}

.athlete-profile-v48-section-head > .button {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: end;
    max-width: 100%;
}

@media (max-width: 1100px) and (orientation: portrait),
       (max-width: 760px) {
    .athlete-profile-v48-section-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .athlete-profile-v48-section-head__copy,
    .athlete-profile-v48-section-head > .button {
        grid-column: 1;
        min-width: 0;
    }

    .athlete-profile-v48-section-head__copy {
        width: 100%;
        justify-self: stretch;
    }

    .athlete-profile-v48-section-head > .button {
        grid-row: auto;
        width: fit-content;
        justify-self: start;
    }
}
