.athlete-management { padding-top: 10px; }
.athlete-management .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.athlete-management h2, .athlete-management h3 { margin: 0 0 8px; }
.am-head, .am-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.am-head { margin-bottom: 16px; }
.am-head p { margin: 0; }
.am-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; margin: 16px 0; }
.am-tile { background: var(--am-color); color: var(--am-ink); border-radius: 0; min-width: 0; }
.am-open { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; width: 100%; min-height: 148px; padding: 18px; border: 0; border-radius: inherit; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.am-tile-label { font-weight: 600; overflow-wrap: anywhere; }
.am-open strong { font-size: 1.75rem; line-height: 1.2; overflow-wrap: anywhere; }
.am-open small { font-size: .8rem; }
.am-tile button:focus-visible { outline: 3px solid currentColor; outline-offset: -5px; }
.am-form { margin: 18px 0; }
.am-fields { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.am-form label { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
.am-fields label { flex: 1 1 180px; }
.am-form input, .am-form textarea, .am-form select { border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 10px; background: var(--bg); color: var(--ink); min-width: 0; max-width: 100%; font: inherit; }
.am-form textarea { width: 100%; resize: vertical; }
.am-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.am-detail { margin-top: 16px; }
.am-detail-head { margin-top: 18px; }
.am-trend { max-width: 680px; margin: 16px 0; }
.am-trend figcaption { font-size: .875rem; color: var(--muted); }
.am-trend svg { display: block; width: 100%; height: auto; overflow: visible; }
.am-chart-axis { stroke: var(--line); fill: none; }
.am-chart-line { stroke: var(--trace-2); stroke-width: 2; fill: none; }
.am-chart-point { fill: var(--trace-2); }
.am-trend text { fill: var(--muted); font: 11px system-ui; }
.am-edit { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin: 20px 0; }
.am-edit summary { cursor: pointer; }
.am-note { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 160px; max-width: 500px; }
.am-empty { text-align: center; }
@media (max-width: 560px) { .am-grid { grid-template-columns: 1fr; } .am-form input, .am-form textarea, .am-form select { font-size: 16px; } .athlete-management .panel { padding: 14px; } }

.am-tile { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.am-dragging { position: relative; z-index: 3; outline: 3px solid var(--trace-2); outline-offset: 3px; box-shadow: 0 0 0 7px var(--panel), 0 12px 24px #0004; transform: scale(1.02); cursor: grabbing; }
.am-dragging .am-open { cursor: grabbing; }
.am-drop-target { z-index: 2; outline: 3px solid #F28C28; outline-offset: 3px; }

.am-colors { flex: 1 1 100%; min-width: 0; margin: 0; padding: 0; border: 0; }
.am-colors legend { margin-bottom: 8px; }
.am-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.am-form .am-swatch { position: relative; width: 44px; height: 44px; cursor: pointer; }
.am-swatch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.am-swatch span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: var(--radius); background: var(--am-swatch); color: var(--am-swatch-ink); border: 1px solid var(--line); pointer-events: none; }
.am-swatch input:checked + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.am-swatch input:checked + span::after { content: '✓'; font-size: 22px; font-weight: 700; }
.am-swatch input:focus-visible + span { outline: 3px solid var(--trace-2); outline-offset: 3px; }

.am-tile { position: relative; }
.am-open { padding-right: 62px; }
.am-edit-button { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--radius); background: transparent; color: inherit; cursor: pointer; }
.am-edit-button:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.am-edit-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.am-metric-note { white-space: pre-wrap; overflow-wrap: anywhere; }

.am-open { text-shadow: 0 1px 3px #0008; }
@media (hover: hover) { .am-tile:not(.am-dragging):hover { z-index: 2; box-shadow: 0 0 0 2px var(--trace-2), 0 8px 18px #0003; } }
.am-tile:not(.am-dragging):focus-within { z-index: 2; box-shadow: 0 0 0 2px var(--trace-2), 0 8px 18px #0003; }

.am-corner-tl { border-top-left-radius: var(--radius); }
.am-corner-tr { border-top-right-radius: var(--radius); }
.am-corner-bl { border-bottom-left-radius: var(--radius); }
.am-corner-br { border-bottom-right-radius: var(--radius); }

.am-tile::after { content: ""; position: absolute; inset: 0; border: 1px solid rgb(0 0 0 / 22%); border-radius: inherit; pointer-events: none; }
