/* Padronização dos títulos e metas dos cards de padrões de treino e hipóteses diagnósticas */
.training-patterns-card-title,
.diagnostic-card-title {
    font-size: 16px;
    font-weight: 600;
}
.training-patterns-card-meta,
.diagnostic-card-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}
/* ===== Dynamic Font Size for Cards (Desktop) ===== */
/* Removido font-size dinâmico exagerado dos cards para evitar textos gigantes. Cards agora usam o font-size padrão herdado. */
/* =============================================================================
   COACHING MODULE - CSS Styles
   Assessoria Esportiva para nBody
   ============================================================================= */

/* ===== Common Form Styles ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

/* ===== Available Coaches Section ===== */
.available-coaches-section {
    margin-top: 20px;
}

.available-coaches-section h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.coaches-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coach-card-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.2s;
}

.coach-card-mini:hover {
    border-color: var(--accent-color);
    background: rgba(99, 102, 241, 0.05);
}

.coach-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.coach-card-info {
    flex: 1;
    min-width: 0;
}

.coach-card-info h5 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: var(--text-primary);
}

.coach-cref {
    font-size: 11px;
    color: var(--accent-color);
    display: block;
}

.coach-specialties-mini {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.specialty-mini {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
    color: var(--accent-color);
}

.coach-athletes-count {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-top: 4px;
}

.no-coaches-available {
    padding: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-top: 12px;
}

.specialty-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 20px;
    font-size: 12px;
    color: var(--accent-color);
    margin: 2px;
}

.coaching-empty-icon {
    font-size: 48px;
    opacity: 0.6;
    margin-bottom: 16px;
}

/* ===== Coach Tab Container ===== */
.coaching-container {
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.coaching-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.coaching-header h2 {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.coaching-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== Coach Profile Setup ===== */
.coach-setup-container {
    text-align: center;
    padding: 60px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.coach-setup-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.coach-setup-container h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.coach-setup-container p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.coach-setup-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
    text-align: left;
}

.coach-setup-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
}

.coach-setup-feature-icon {
    font-size: 24px;
}

/* ===== Athletes Grid ===== */
.athletes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .athletes-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.btn-icon-small {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-icon-small:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}

.invite-link-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.invite-link-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: monospace;
}

.invite-copy-btn {
    background: var(--primary);
    border: none;
    border-radius: 8px;
    padding: 0 12px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    font-size: 13px;
}

.athlete-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.2s;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.athlete-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.athlete-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.athlete-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.athlete-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.athlete-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.athlete-info .athlete-goal {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.athlete-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.athlete-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.athlete-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.athlete-status.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.athlete-status.paused {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.athlete-status.cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.athlete-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

.athlete-metric {
    text-align: center;
    padding: 8px 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.athlete-metric-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.athlete-metric-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* Athlete Timeline */
.athlete-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--glass-border);
}

.timeline-item {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    white-space: nowrap;
}

.timeline-item.started {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.timeline-item.paused {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.timeline-item.unpaused {
    color: #06b6d4;
    background: rgba(6, 182, 212, 0.1);
}

.timeline-item.cancelled {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Pending athlete card styles */
.athlete-card.pending-card {
    border-style: dashed;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.03), transparent);
}

.athlete-card.pending-card:hover {
    border-color: #f59e0b;
}

.athlete-pending-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    font-size: 12px;
    color: #f59e0b;
}

.athlete-pending-info .pending-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.athlete-pending-info .pending-expiry-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.athlete-pending-info .icon {
    font-size: 14px;
}

.invite-valid {
    color: #10b981;
    font-size: 11px;
}

.invite-expiring-soon {
    color: #f59e0b;
    font-size: 11px;
    font-weight: 500;
}

.invite-expired {
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
}

.btn-small {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-small.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.btn-small.btn-primary {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: white;
}

.btn-small.btn-primary:hover {
    background: var(--accent-hover, #4f46e5);
}

/* Paused athlete card styles */
.athlete-card.paused-card {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), transparent);
}

.athlete-paused-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    font-size: 12px;
    color: #f59e0b;
}

.athlete-paused-info .paused-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.athlete-paused-info .paused-reason {
    font-size: 11px;
    color: var(--text-secondary);
    font-style: italic;
    padding-left: 22px;
}

/* Cancelled athlete card styles */
.athlete-card.cancelled-card {
    border-color: rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.03), transparent);
    opacity: 0.7;
}

.athlete-cancelled-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    font-size: 12px;
    color: #ef4444;
}

.athlete-cancelled-info .cancelled-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.athlete-cancelled-info .cancelled-reason {
    font-size: 11px;
    color: var(--text-secondary);
    font-style: italic;
    padding-left: 22px;
}

/* Status badge colors */
.athlete-status.paused {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.athlete-status.cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Danger button */
.btn-small.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

.btn-small.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

/* Athlete detail actions */
.athlete-detail-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

/* Status banner in athlete detail */
.athlete-status-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.athlete-status-banner.paused {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.athlete-status-banner.cancelled {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.athlete-status-banner .status-reason {
    font-size: 13px;
    font-weight: 400;
    font-style: italic;
    opacity: 0.9;
}

/* ===== Cancellation Modal ===== */
.modal-cancel {
    max-width: 480px;
    width: 95%;
}

.modal-cancel-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-cancel-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.modal-cancel-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ef4444;
}

.modal-cancel-athlete {
    font-size: 16px;
    color: var(--text-secondary);
}

.modal-cancel-warning {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    margin-bottom: 24px;
}

.modal-cancel-warning .warning-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.modal-cancel-warning .warning-content {
    flex: 1;
}

.modal-cancel-warning strong {
    display: block;
    color: #f59e0b;
    margin-bottom: 8px;
}

.modal-cancel-warning ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.modal-cancel-warning li {
    margin-bottom: 4px;
}

.modal-cancel-form {
    margin-bottom: 24px;
}

.cancel-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.cancel-reasons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.cancel-reason-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-reason-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.cancel-reason-option.selected {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.5);
}

.cancel-reason-option input[type="radio"] {
    display: none;
}

.reason-icon {
    font-size: 20px;
}

.reason-label {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.cancel-notes {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.cancel-notes:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
}

.cancel-notes::placeholder {
    color: var(--text-secondary);
}

.modal-cancel-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
}

/* Cancelled by badge */
.cancelled-by-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}

.cancelled-by-badge.by-coach {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.cancelled-by-badge.by-athlete {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
}

/* Cancelled athletes section */
.cancelled-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cancelled-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.cancelled-section-header h4 {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.cancelled-section-count {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* ===== Athlete Detail View ===== */
.athlete-detail {
    display: none;
}

.athlete-detail.active {
    display: block;
}

.athlete-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.athlete-detail-back {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.athlete-detail-back:hover {
    color: var(--text-primary);
}

.athlete-detail-info {
    flex: 1;
}

.athlete-detail-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.athlete-detail-info p {
    color: var(--text-secondary);
}

/* ===== NEW Coach Dashboard Layout ===== */
.coach-dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

.coach-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.coach-dashboard-title h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.coach-dashboard-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.coach-dashboard-actions .btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coach-dashboard-actions .btn-text {
    display: inline;
}

/* Stats Row - Compact horizontal layout */
.coach-stats-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.coach-stat-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    min-width: fit-content;
    flex-shrink: 0;
}

.coach-stat-mini.attention {
    border-color: rgba(239, 68, 68, 0.3);
    animation: pulse-attention 2s infinite;
}

@keyframes pulse-attention {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1); }
}

.stat-mini-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.stat-mini-content {
    display: flex;
    flex-direction: column;
}

.stat-mini-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-mini-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alerts Section Collapsible */
.coach-alerts-section {
    margin-bottom: 20px;
    background: var(--glass-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.coach-alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    background: rgba(239, 68, 68, 0.05);
}

.coach-alerts-header h3 {
    margin: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alerts-count {
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.alerts-toggle {
    color: var(--text-secondary);
    font-size: 12px;
}

.coach-alerts-list {
    max-height: 200px;
    overflow-y: auto;
    transition: max-height 0.3s;
}

.coach-alerts-list.collapsed {
    max-height: 0;
}

.coach-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--glass-border);
}

.coach-alert:last-child {
    border-bottom: none;
}

.alerts-more {
    text-align: center;
    padding: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Athlete Alerts Group - Grouped by Athlete (Compact) */
.athlete-alerts-group {
    margin-bottom: 10px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.athlete-alerts-group:last-child {
    margin-bottom: 0;
}

.athlete-alerts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(99, 102, 241, 0.1);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.athlete-alerts-header:hover {
    background: rgba(99, 102, 241, 0.2);
}

.athlete-alerts-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.athlete-alerts-toggle {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease;
    width: 12px;
    text-align: center;
}

.athlete-alerts-group.collapsed .athlete-alerts-header {
    border-radius: 8px;
}

.athlete-alerts-name {
    font-weight: 600;
    color: white;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.athlete-alerts-count {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(239, 68, 68, 0.3);
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
}

.athlete-alerts-list {
    padding: 6px;
}

/* Compact Coach Alert */
.coach-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.coach-alert:hover {
    background: rgba(255, 255, 255, 0.05);
}

.coach-alert:last-child {
    margin-bottom: 0;
}

.coach-alert.high {
    border-left-color: #ef4444;
}

.coach-alert.medium {
    border-left-color: #f59e0b;
}

.coach-alert.info {
    border-left-color: #6366f1;
}

.coach-alert-icon {
    font-size: 16px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.coach-alert-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.coach-alert-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.coach-alert-type {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 5px;
    border-radius: 3px;
}

.coach-alert-date {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-left: auto;
}

.coach-alert-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Compact Inline Alert Actions */
.alert-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.alert-action-btn {
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    white-space: nowrap;
}

.alert-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.alert-action-btn.primary {
    background: rgba(99, 102, 241, 0.4);
}

.alert-action-btn.primary:hover {
    background: rgba(99, 102, 241, 0.6);
}

.alert-action-btn.secondary {
    background: rgba(6, 182, 212, 0.25);
    color: #06b6d4;
}

.alert-action-btn.warning {
    background: rgba(245, 158, 11, 0.25);
    color: #f59e0b;
}

/* Compact alerts list */
.coach-alerts-list {
    max-height: 300px;
    overflow-y: auto;
    transition: max-height 0.3s;
    padding: 8px;
}

/* Mobile responsiveness for compact alerts */
@media (max-width: 480px) {
    .coach-alert {
        flex-wrap: wrap;
    }
    
    .alert-actions {
        width: 100%;
        margin-top: 6px;
        justify-content: flex-end;
    }
}

/* Athletes Toolbar */
.athletes-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.athletes-search-wrapper {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
}

.athletes-search {
    width: 100%;
    padding: 10px 36px 10px 36px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

.athletes-search:focus {
    outline: none;
    border-color: var(--primary);
}

.athletes-search::placeholder {
    color: var(--text-muted);
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.athletes-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 32px 10px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.filter-select option {
    background: #1e1e2e;
    color: white;
}

.view-toggle {
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    padding: 8px 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.view-btn:first-child {
    border-right: 1px solid var(--glass-border);
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

.view-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
}

/* Athletes Count */
.athletes-count {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Athletes Empty State */
.athletes-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--glass-bg);
    border: 1px dashed var(--glass-border);
    border-radius: 16px;
}

.athletes-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.athletes-empty h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.athletes-empty p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Athletes Table */
.athletes-table-wrapper {
    overflow-x: auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.athletes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.athletes-table thead {
    background: rgba(255, 255, 255, 0.03);
}

.athletes-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
}

.athletes-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
}

.athlete-row {
    cursor: pointer;
    transition: background 0.2s;
}

.athlete-row:hover {
    background: rgba(99, 102, 241, 0.05);
}

.athlete-row:last-child td {
    border-bottom: none;
}

.athlete-row-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.athlete-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.athlete-row-name {
    font-weight: 500;
}

.athlete-row-email {
    font-size: 12px;
    color: var(--text-secondary);
}

.goal-badge {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
    font-size: 12px;
    color: var(--primary);
}

.adherence-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
}

.adherence-badge.high {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.adherence-badge.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.adherence-badge.low {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.action-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.col-metrics {
    text-align: center;
    min-width: 70px;
}

.col-actions {
    text-align: center;
    width: 60px;
}

/* ===== Old Coach Stats Grid (keep for compatibility) ===== */
.coach-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.coach-stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.coach-stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.coach-stat-value {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.coach-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===== Training Plan Card ===== */
.plans-section {
    margin-top: 24px;
}

.plans-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.plan-card:hover {
    border-color: var(--primary);
}

.plan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.plan-card-title {
    font-size: 16px;
    font-weight: 600;
}

.plan-card-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.plan-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.plan-status-badge.draft {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.plan-status-badge.published {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.plan-progress {
    margin-top: 12px;
}

.plan-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.plan-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.3s;
}

.plan-progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
}

/* ===== Monthly Plan Calendar View ===== */
.plan-calendar {
    margin-top: 20px;
}

.plan-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.plan-calendar-nav {
    display: flex;
    gap: 8px;
}

.plan-calendar-nav-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.plan-calendar-nav-btn:hover {
    border-color: var(--primary);
}

.plan-calendar-title {
    font-size: 18px;
    font-weight: 600;
}

.plan-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.plan-calendar-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 0;
}

.plan-calendar-day {
    aspect-ratio: 1;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    min-height: 80px;
    transition: all 0.2s;
    cursor: pointer;
}

.plan-calendar-day:hover {
    border-color: var(--primary);
}

.plan-calendar-day.other-month {
    opacity: 0.4;
}

.plan-calendar-day.has-workout {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.plan-calendar-day-number {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.plan-calendar-workout {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--primary);
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== AI Generation Modal ===== */
.ai-generation-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ai-form-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
}

.ai-form-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.days-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.day-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.day-toggle.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.day-toggle:hover:not(.selected) {
    border-color: var(--primary-light);
}

.ai-profile-preview {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.ai-profile-preview h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.ai-profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ai-profile-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-profile-stat-icon {
    font-size: 18px;
}

.ai-profile-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.ai-profile-stat-value {
    font-size: 14px;
    font-weight: 600;
}

.ai-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ai-profile-header h4 {
    margin-bottom: 0;
}

.ai-profile-period {
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 10px;
    cursor: help;
}

.ai-profile-footer {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== Messages Section ===== */
.coach-messages {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 24px;
}

.coach-messages-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.coach-messages-header h4 {
    font-size: 16px;
    font-weight: 600;
}

.coach-messages-list {
    max-height: 400px;
    overflow-y: auto;
}

.coach-message {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
}

.coach-message:last-child {
    border-bottom: none;
}

.coach-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.coach-message-content {
    flex: 1;
}

.coach-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.coach-message-author {
    font-weight: 600;
    font-size: 14px;
}

.coach-message-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.coach-message-input {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
    position: sticky;
    bottom: 0;
}

.coach-message-input input,
.coach-message-input textarea {
    flex: 1;
    padding: 14px 18px;
    background: rgba(30, 30, 50, 0.9) !important;
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 14px;
    color: #f8fafc !important;
    font-size: 16px;
    transition: all 0.2s;
    -webkit-text-fill-color: #f8fafc !important;
    font-family: inherit;
    resize: none;
}

.coach-message-input input::placeholder,
.coach-message-input textarea::placeholder {
    color: rgba(200, 200, 220, 0.6) !important;
    -webkit-text-fill-color: rgba(200, 200, 220, 0.6) !important;
}

.coach-message-input input:focus,
.coach-message-input textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(40, 40, 70, 0.95) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.coach-message-input button {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border: none;
    border-radius: 14px;
    color: white;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.coach-message-input button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.coach-message-input button:active {
    transform: translateY(0);
}

/* ===== Alerts Section ===== */
.coach-alerts {
    margin-bottom: 24px;
}

.coach-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 8px;
}

.coach-alert.warning {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.1);
}

.coach-alert.danger {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

.coach-alert-icon {
    font-size: 24px;
}

.coach-alert-content {
    flex: 1;
}

.coach-alert-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.coach-alert-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== Invite Modal - Mobile First ===== */
.invite-link-modal {
    max-width: 420px;
    width: 95%;
}

.invite-link-instructions {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.invite-link-copy-area {
    background: rgba(255, 255, 255, 0.08);
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.invite-link-copy-area:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
}

.invite-link-copy-area:active {
    transform: scale(0.98);
    background: rgba(99, 102, 241, 0.2);
}

.invite-link-copy-area.copied {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    border-style: solid;
}

.invite-link-text {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-primary);
    word-break: break-all;
    line-height: 1.5;
    max-width: 100%;
}

.invite-link-copy-hint,
.invite-link-copied {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.invite-link-copy-hint {
    color: var(--primary);
}

.invite-link-copy-hint .copy-icon {
    font-size: 20px;
}

.invite-link-copied {
    color: #10b981;
}

.invite-link-copied .copied-icon {
    font-size: 20px;
}

.invite-link-input-hidden {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.invite-share-title {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    margin: 20px 0 12px;
}

.invite-share-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.invite-share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 90px;
    -webkit-tap-highlight-color: transparent;
}

.invite-share-btn .share-icon {
    font-size: 28px;
}

.invite-share-btn .share-label {
    font-size: 12px;
    font-weight: 500;
}

.invite-share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.invite-share-btn.whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
}

.invite-share-btn.whatsapp:active {
    transform: scale(0.95);
}

.invite-share-btn.sms {
    background: #007AFF;
    color: white;
}

.invite-share-btn.sms:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.invite-share-btn.sms:active {
    transform: scale(0.95);
}

.invite-share-btn.native {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.invite-share-btn.native:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

@media (max-width: 400px) {
    .invite-share-btn {
        padding: 14px 18px;
        min-width: 75px;
    }
    
    .invite-share-btn .share-icon {
        font-size: 24px;
    }
    
    .invite-share-btn .share-label {
        font-size: 11px;
    }
}

/* Legacy styles kept for compatibility */
.invite-link-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.invite-link-container label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.invite-link-row {
    display: flex;
    gap: 10px;
}

.invite-link-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
}

.invite-copy-btn {
    padding: 12px 20px;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.invite-copy-btn:hover {
    background: var(--primary-light);
}

/* ===== Empty State ===== */
.coaching-empty {
    text-align: center;
    padding: 60px 20px;
}

.coaching-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.coaching-empty h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.coaching-empty p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* =============================================================================
   ATHLETE VIEW - Meu Coach
   ============================================================================= */

.athlete-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* My Coach Card */
.my-coach-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
}

.my-coach-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.my-coach-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.my-coach-info {
    flex: 1;
}

.my-coach-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.my-coach-cref {
    font-size: 13px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.coach-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.coach-status-badge.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.coach-status-badge.pending {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.coach-status-badge.paused {
    background: rgba(249, 115, 22, 0.2);
    color: #f97316;
}

.coach-status-badge.cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.my-coach-bio {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.my-coach-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.my-coach-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Coaching Alert */
.coaching-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.coaching-alert.warning {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
}

.coaching-alert span:first-child {
    font-size: 24px;
}

.coaching-alert strong {
    display: block;
    margin-bottom: 4px;
}

.coaching-alert p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Athlete Stats Grid */
.athlete-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.athlete-stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.athlete-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.athlete-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Athlete Section */
.athlete-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
}

.athlete-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Upcoming Workouts */
.upcoming-workouts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upcoming-workout-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
}

.upcoming-workout-item:hover {
    border-color: var(--accent);
}

.upcoming-workout-item.completed {
    opacity: 0.7;
}

.upcoming-workout-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
    padding: 8px;
    background: var(--accent);
    border-radius: 8px;
    color: white;
}

.upcoming-workout-date .workout-day {
    font-size: 20px;
    font-weight: 700;
}

.upcoming-workout-date .workout-month {
    font-size: 11px;
    text-transform: uppercase;
}

.upcoming-workout-info {
    flex: 1;
}

.upcoming-workout-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.upcoming-workout-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 4px 0;
}

.workout-duration {
    font-size: 13px;
    color: var(--text-secondary);
}

.upcoming-workout-status {
    font-size: 24px;
}

.status-complete {
    color: #22c55e;
}

.status-pending {
    color: var(--text-secondary);
}

.show-more-link {
    text-align: center;
    color: var(--accent);
    cursor: pointer;
    padding: 12px;
    margin-top: 8px;
}

.show-more-link:hover {
    text-decoration: underline;
}

/* My Plans List */
.my-plans-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.my-plan-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.my-plan-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.my-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.my-plan-header h4 {
    font-size: 16px;
    font-weight: 600;
}

.plan-month-badge {
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.my-plan-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.my-plan-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Empty message */
.empty-message {
    text-align: center;
    padding: 32px;
    color: var(--text-secondary);
}

/* Scheduled workout item */
.scheduled-workout-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.scheduled-workout-item:last-child {
    border-bottom: none;
}

.scheduled-workout-item.completed {
    opacity: 0.7;
}

.scheduled-workout-date {
    min-width: 80px;
    font-weight: 600;
    color: var(--accent);
}

.scheduled-workout-info {
    flex: 1;
}

.scheduled-workout-info strong {
    display: block;
    margin-bottom: 4px;
}

.scheduled-workout-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

.scheduled-workout-status {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Invite Accept Modal */
.invite-coach-avatar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Messages Sent Style */
.coach-message.sent {
    flex-direction: row-reverse;
}

.coach-message.sent .coach-message-content {
    text-align: right;
}

.coach-message.sent .coach-message-text {
    background: rgba(6, 182, 212, 0.15);
    color: #e2e8f0;
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 10px 14px;
    border-radius: 12px;
    display: inline-block;
}

.coach-message-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: inline-block;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .athletes-table .col-goal,
    .athletes-table .col-metrics:nth-child(4) {
        display: none;
    }
}

@media (max-width: 768px) {
    .coach-dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .coach-dashboard-actions {
        width: 100%;
    }
    
    .coach-dashboard-actions .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    .coach-stats-row {
        gap: 8px;
    }
    
    .coach-stat-mini {
        padding: 10px 12px;
    }
    
    .stat-mini-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .stat-mini-value {
        font-size: 16px;
    }
    
    .stat-mini-label {
        font-size: 10px;
    }
    
    .athletes-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .athletes-search-wrapper {
        max-width: 100%;
    }
    
    .athletes-filters {
        flex-wrap: wrap;
    }
    
    .filter-select {
        flex: 1;
        min-width: 120px;
    }
    
    .coaching-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .athletes-grid {
        grid-template-columns: 1fr;
    }
    
    .coach-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .athlete-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Hide table columns on mobile */
    .athletes-table .col-goal,
    .athletes-table .col-metrics {
        display: none;
    }
    
    .athletes-table th,
    .athletes-table td {
        padding: 10px 12px;
    }
    
    .athlete-row-email {
        display: none;
    }
    
    .my-plans-list {
        grid-template-columns: 1fr;
    }
    
    .my-coach-actions {
        flex-direction: column;
    }
    
    .my-coach-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .plan-calendar-grid {
        gap: 3px;
    }
    
    .plan-calendar-day {
        min-height: 50px;
        padding: 3px;
        aspect-ratio: auto;
    }
    
    .plan-calendar-day-number {
        font-size: 11px;
    }
    
    .plan-calendar-workout {
        font-size: 8px;
        padding: 1px 3px;
    }
    
    .plan-calendar-day-header {
        font-size: 10px;
        padding: 4px 0;
    }
    
    .ai-profile-stats {
        grid-template-columns: 1fr;
    }
    
    /* Plan Detail Modal Mobile */
    .plan-detail-modal {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
    }
    
    .plan-detail-modal .modal-header {
        flex-shrink: 0;
        padding: 16px;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .plan-detail-modal .modal-body {
        flex: 1;
        overflow-y: auto !important;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
        padding: 16px;
    }
    
    .plan-detail-modal .modal-footer {
        flex-shrink: 0;
        flex-wrap: wrap;
        gap: 8px !important;
        padding: 12px !important;
        border-top: 1px solid var(--glass-border);
    }
    
    .plan-detail-modal .modal-footer button {
        flex: 1 1 auto;
        min-width: 80px;
        padding: 10px 12px !important;
        font-size: 12px !important;
    }
    
    .plan-detail-modal .modal-footer .btn-secondary {
        order: 1;
    }
    
    .plan-detail-modal .modal-footer .btn-outline {
        order: 2;
    }
    
    .plan-detail-modal .modal-footer .btn-danger {
        order: 3;
        flex: 0 0 50px;
        min-width: 50px;
    }
    
    .plan-detail-modal .modal-footer .btn-primary {
        order: 4;
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .coach-stats-row {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .coach-stat-mini {
        flex: 1 1 45%;
        min-width: 0;
    }
    
    .view-toggle {
        display: none;
    }
    
    .athletes-table .col-status {
        display: none;
    }
}

/* ========================================
   Coaching Options View (no coaching)
   ======================================== */
.coaching-options {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    margin-top: 24px;
}

.coaching-option {
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.coaching-option:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.coaching-option-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.coaching-option h4 {
    font-size: 20px;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.coaching-option p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.coaching-option .btn {
    width: 100%;
}

.coaching-option-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0 8px;
}

/* Coach Setup with Plan View */
.coach-setup-with-plan {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 20px;
}

.coach-setup-with-plan-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.coach-setup-with-plan h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.coach-setup-with-plan p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.coach-setup-with-plan .btn {
    min-width: 200px;
}

/* Upgrade Modal Styles */
.upgrade-modal-content {
    text-align: center;
    padding: 20px;
}

.upgrade-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.upgrade-modal-content h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.upgrade-modal-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.upgrade-features {
    text-align: left;
    margin-bottom: 32px;
}

.upgrade-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.upgrade-feature-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.upgrade-feature-text strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.upgrade-feature-text span {
    font-size: 14px;
    color: var(--text-secondary);
}

.upgrade-price {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 24px;
}

.upgrade-price span {
    font-size: 16px;
    color: var(--text-secondary);
}

.upgrade-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.upgrade-actions .btn {
    min-width: 140px;
}

@media (max-width: 768px) {
    .coaching-options {
        flex-direction: column;
        align-items: center;
    }
    
    .coaching-option {
        max-width: 100%;
        min-width: 100%;
    }
    
    .coaching-option-divider {
        padding: 16px 0;
    }
    
    /* Coach Dashboard Mobile */
    .coach-dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .coach-dashboard-actions {
        display: flex;
        justify-content: center;
    }
    
    .coach-dashboard-actions .btn-text {
        display: none;
    }
    
    .coach-stats-row {
        margin-bottom: 16px;
        gap: 8px;
    }
    
    .coach-stat-mini {
        padding: 10px 14px;
    }
    
    .stat-mini-value {
        font-size: 16px;
    }
    
    .stat-mini-label {
        font-size: 10px;
    }
    
    /* Athletes Toolbar Mobile */
    .athletes-toolbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .athletes-search-wrapper {
        max-width: 100%;
        order: 1;
    }
    
    .athletes-filters {
        order: 2;
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-select {
        flex: 1;
        min-width: 0;
    }
    
    .view-toggle {
        flex-shrink: 0;
    }
    
    /* Athletes Table Mobile */
    .athletes-table th.col-goal,
    .athletes-table td.col-goal,
    .athletes-table th.col-metrics,
    .athletes-table td.col-metrics {
        display: none;
    }
    
    .athletes-table th,
    .athletes-table td {
        padding: 10px 12px;
    }
    
    .athlete-row-email {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .coaching-container {
        padding: 12px;
    }
    
    .athlete-card {
        padding: 14px;
    }
    
    .athlete-avatar {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 16px;
    }
    
    .athlete-info h4 {
        font-size: 14px;
    }
    
    .athlete-metrics {
        gap: 6px;
    }
    
    .athlete-metric {
        padding: 6px 2px;
    }
    
    .athlete-metric-value {
        font-size: 14px;
    }
    
    .athlete-metric-label {
        font-size: 9px;
    }
    
    .athlete-status {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .athlete-pending-info {
        padding: 8px 10px;
        font-size: 11px;
    }
}

/* =============================================================================
   PLAN BUILDER MODAL STYLES
   ============================================================================= */

.modal.plan-builder-modal {
    max-width: 1000px !important;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.plan-builder-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 0;
}

.plan-builder-modal .modal-body {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.plan-builder-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--glass-bg);
}

.plan-builder-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    gap: 16px;
    flex-wrap: wrap;
}

.plan-builder-athlete {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.plan-builder-athlete-info {
    display: flex;
    flex-direction: column;
}

.plan-builder-athlete-info strong {
    font-size: 15px;
}

.plan-builder-athlete-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

.plan-builder-period {
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-builder-period label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

.plan-builder-period select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.plan-builder-tabs {
    display: flex;
    padding: 0;
    background: linear-gradient(to bottom, var(--glass-bg), transparent);
    border-bottom: 1px solid var(--glass-border);
}

.plan-tab {
    flex: 1;
    padding: 16px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.plan-tab:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--text-primary);
}

.plan-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background: rgba(99, 102, 241, 0.08);
}

.plan-builder-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    min-height: 400px;
}

/* AI Mode Styles */
.ai-mode-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 800px;
}

.ai-mode-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ai-mode-section.full-width {
    grid-column: 1 / -1;
}

.ai-info {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-info-icon {
    font-size: 28px;
}

.ai-info p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.days-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.day-toggle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.day-toggle:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.day-toggle.selected {
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Template Mode Styles */
.template-mode-content {
    display: flex;
    gap: 20px;
    min-height: 420px;
}

.template-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.template-sidebar h4 {
    margin: 0;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid var(--glass-border);
}

.template-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    border-bottom: 1px solid var(--glass-border);
}

.template-sidebar-header h4 {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    background: none;
    border: none;
}

.templates-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.template-item {
    position: relative;
    padding: 12px 14px;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.15s ease;
    background: var(--card-bg);
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.template-item.selected {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.template-item.selected::before {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.template-item:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-color);
    transform: translateX(4px);
}

.template-item:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.template-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.template-item-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.template-calendar {
    flex: 1;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.calendar-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    flex: 1;
}

.calendar-day {
    min-height: 70px;
    padding: 6px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 2px solid var(--glass-border);
    transition: all 0.15s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.calendar-day:not(.disabled):hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.calendar-day.disabled {
    background: transparent;
    border-color: transparent;
}

.calendar-day.has-workout {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
}

.calendar-day-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.calendar-day-workouts {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
}

.calendar-workout-chip {
    font-size: 10px;
    padding: 4px 6px;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    font-weight: 500;
}

.calendar-workout-chip span {
    cursor: pointer;
    opacity: 0.8;
    font-size: 12px;
}

.calendar-workout-chip span:hover {
    opacity: 1;
}

.template-mode-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    font-size: 14px;
}

/* Manual Mode Styles */
.manual-mode-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    min-height: 380px;
}

.manual-workout-form {
    padding: 20px;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.manual-workout-form h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manual-workouts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    padding: 16px;
}

.manual-workouts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 8px;
}

.manual-workouts-header h4 {
    margin: 0;
    font-size: 15px;
}

.manual-workouts-count {
    background: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.manual-workout-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    transition: all 0.15s ease;
}

.manual-workout-item:hover {
    border-color: var(--accent-color);
    transform: translateX(4px);
}

.manual-workout-date {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 90px;
    font-weight: 500;
}

.manual-workout-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 8px;
    font-weight: 500;
}

/* AI Mode Section Headers */
.ai-mode-section h4 {
    margin: 0 0 16px 0;
    font-size: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Manual Mode Enhanced Styles */
.manual-workouts-header .header-icon {
    font-size: 18px;
}

.manual-workouts-header .workout-count {
    background: linear-gradient(135deg, var(--accent-color), var(--primary));
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin-left: auto;
}

.workouts-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
}

.empty-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-list .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-list p {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 500;
}

.empty-list small {
    font-size: 12px;
    opacity: 0.7;
}

.workout-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.workout-item-info .workout-date {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.workout-item-info .workout-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.workout-item-info .workout-meta {
    font-size: 11px;
    color: var(--accent-color);
    font-weight: 500;
}

/* Responsive Plan Builder */
@media (max-width: 900px) {
    .modal.plan-builder-modal {
        max-width: 100% !important;
        width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }
    
    .plan-builder-top-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
    }
    
    .ai-mode-content {
        grid-template-columns: 1fr;
    }
    
    .manual-mode-content {
        grid-template-columns: 1fr;
    }
    
    .template-mode-content {
        flex-direction: column;
    }
    
    .template-sidebar {
        width: 100%;
        max-height: 160px;
    }
    
    .templates-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
        gap: 10px;
    }
    
    .template-item {
        flex-shrink: 0;
        width: 140px;
        margin-bottom: 0;
    }
    
    .calendar-day {
        min-height: 55px;
        padding: 4px;
    }
    
    .calendar-day-num {
        font-size: 12px;
    }
    
    .calendar-workout-chip {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .day-toggle {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 480px) {
    .plan-builder-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .plan-tab {
        flex: 0 0 auto;
        padding: 12px 16px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .plan-builder-period {
        justify-content: center;
    }
    
    .plan-builder-content {
        padding: 16px;
    }
    
    .days-selector {
        justify-content: center;
    }
    
    .day-toggle {
        width: 40px;
        height: 40px;
        font-size: 11px;
    }
    
    .calendar-grid {
        gap: 3px;
    }
    
    .calendar-day {
        min-height: 50px;
    }
}

/* =============================================================================
   ATHLETE PLAN VIEW STYLES
   ============================================================================= */

.athlete-plan-modal {
    max-width: 900px;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.athlete-plan-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.plan-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.plan-period-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Coach Message Box */
.coach-message-box {
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.coach-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.coach-message-box p {
    margin: 0;
    line-height: 1.6;
}

/* Plan Stats Grid */
.plan-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.plan-stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.plan-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.plan-stat-card.success {
    border-color: var(--success-color);
    background: rgba(34, 197, 94, 0.1);
}

.plan-stat-card.info {
    border-color: var(--accent-color);
    background: rgba(6, 182, 212, 0.1);
}

.plan-stat-card.warning {
    border-color: var(--warning-color);
    background: rgba(251, 191, 36, 0.1);
}

.plan-stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.plan-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.plan-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Sync Action Bar */
.sync-action-bar {
    text-align: center;
    padding: 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    margin-bottom: 20px;
}

.sync-action-bar button {
    padding: 12px 24px;
    font-size: 14px;
}

.sync-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
}

.sync-status-bar.synced {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Weekly Workouts Container */
.weekly-workouts-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.week-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}

.week-section.collapsed .week-workouts {
    display: none;
}

.week-section.collapsed .week-toggle {
    transform: rotate(-90deg);
}

.week-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.week-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.week-title {
    font-weight: 600;
    font-size: 15px;
    flex: 1;
}

.week-summary {
    font-size: 13px;
    color: var(--text-secondary);
    margin-right: 12px;
}

.week-toggle {
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 0.2s;
}

.week-workouts {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Athlete Workout Card */
.athlete-workout-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.athlete-workout-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.athlete-workout-card.completed {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
}

.athlete-workout-card.today {
    border: 2px solid var(--primary-color);
    background: rgba(99, 102, 241, 0.15);
}

.athlete-workout-card.missed {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
}

.workout-card-date {
    min-width: 50px;
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.workout-day-name {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.workout-day-num {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.workout-card-content {
    flex: 1;
    min-width: 0;
}

.workout-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.workout-category-icon {
    font-size: 16px;
}

.workout-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.workout-description-preview {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.workout-card-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
}

.workout-card-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.synced-badge {
    font-size: 14px;
    opacity: 0.7;
}

.completed-badge {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

.today-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
}

.missed-badge {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

/* =============================================================================
   IMPROVED MODAL SCROLLING & DISPLAY
   ============================================================================= */

/* Athlete Plan Modal - Full Screen Mobile */
.athlete-plan-modal {
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.athlete-plan-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.athlete-plan-modal .modal-body::-webkit-scrollbar {
    width: 6px;
}

.athlete-plan-modal .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.athlete-plan-modal .modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Plan Stats Grid - Improved Layout */
.plan-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.plan-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.plan-stat-card:hover {
    transform: translateY(-2px);
}

.plan-stat-card.success {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.1);
}

.plan-stat-card.info {
    border-color: rgba(6, 182, 212, 0.4);
    background: rgba(6, 182, 212, 0.1);
}

.plan-stat-card.warning {
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.1);
}

.plan-stat-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.plan-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.plan-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Coach Message Box */
.coach-message-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.coach-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 14px;
}

.coach-message-box p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Sync Action/Status Bar */
.sync-action-bar {
    margin-bottom: 20px;
}

.sync-action-bar button {
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
}

.sync-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.sync-status-bar.synced {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success-color);
}

/* Weekly Workouts - Improved */
.weekly-workouts-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.week-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}

.week-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.week-header:active {
    background: rgba(255, 255, 255, 0.08);
}

.week-title {
    font-weight: 600;
    font-size: 15px;
    flex: 1;
    color: var(--text-primary);
}

.week-summary {
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

.week-workouts {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Athlete Workout Card - Enhanced */
.athlete-workout-card {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.athlete-workout-card:active {
    transform: scale(0.98);
}

.workout-card-date {
    min-width: 52px;
    text-align: center;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.workout-day-name {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.workout-day-num {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.workout-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.workout-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.workout-category-icon {
    font-size: 16px;
}

.workout-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workout-description-preview {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 2px 0 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.workout-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
}

.workout-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.workout-card-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 40px;
}

/* Workout Detail Modal - Full Screen Scroll */
.workout-detail-modal {
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.workout-detail-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.workout-detail-date {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 16px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.completed {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success-color);
}

.status-badge.pending {
    background: rgba(251, 191, 36, 0.2);
    color: var(--warning-color);
}

.workout-detail-section {
    margin-bottom: 16px;
}

.workout-detail-section h4 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.workout-detail-section p {
    margin: 0;
    line-height: 1.6;
}

.workout-structure {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--accent-color);
}

.workout-detail-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 12px;
}

.detail-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.garmin-sync-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.garmin-sync-status.synced {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-color);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.coach-notes-box {
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    padding: 12px;
}

.coach-notes-box h4 {
    font-size: 13px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.coach-notes-box p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

/* Plan Goal Box */
.plan-goal-box {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 10px;
    padding: 16px;
    margin-top: 20px;
    text-align: center;
}

/* Responsive Athlete Plan Modal */
@media (max-width: 768px) {
    .athlete-plan-modal {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .plan-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .plan-stat-card {
        padding: 12px;
    }
    
    .plan-stat-icon {
        font-size: 20px;
    }
    
    .plan-stat-value {
        font-size: 20px;
    }
    
    .athlete-workout-card {
        padding: 10px;
    }
    
    .workout-card-date {
        min-width: 44px;
        padding: 6px;
    }
    
    .workout-day-num {
        font-size: 18px;
    }
    
    .workout-detail-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .plan-modal-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .plan-period-badge {
        font-size: 11px;
    }
    
    .sync-action-bar button {
        width: 100%;
    }
    
    .workout-card-content .workout-card-meta {
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* =============================================================================
   PUBLISH PROGRESS MODAL
   ============================================================================= */

.publish-progress-modal {
    max-width: 400px;
}

.publish-progress-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.publish-progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

.publish-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-detail {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* =============================================================================
   MOBILE RESPONSIVE - PLAN & WORKOUT MODALS
   ============================================================================= */

@media (max-width: 640px) {
    .athlete-plan-modal,
    .workout-detail-modal,
    .plan-detail-modal {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .athlete-plan-modal .modal-body,
    .workout-detail-modal .modal-body,
    .plan-detail-modal .modal-body {
        padding: 16px;
    }
    
    .plan-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .plan-stat-card {
        padding: 12px 8px;
    }
    
    .plan-stat-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }
    
    .plan-stat-value {
        font-size: 18px;
    }
    
    .plan-stat-label {
        font-size: 10px;
    }
    
    .week-header {
        padding: 12px 14px;
    }
    
    .week-title {
        font-size: 14px;
    }
    
    .week-summary {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .week-workouts {
        padding: 8px;
        gap: 6px;
    }
    
    .athlete-workout-card {
        padding: 10px;
        gap: 10px;
    }
    
    .workout-card-date {
        min-width: 46px;
        padding: 8px 6px;
    }
    
    .workout-day-num {
        font-size: 18px;
    }
    
    .workout-name {
        font-size: 13px;
    }
    
    .workout-description-preview {
        font-size: 11px;
        -webkit-line-clamp: 1;
    }
    
    .workout-card-meta {
        font-size: 10px;
        gap: 8px;
    }
    
    .coach-message-box {
        padding: 12px;
    }
    
    .coach-message-header {
        font-size: 13px;
    }
    
    .coach-message-box p {
        font-size: 13px;
    }
    
    .workout-detail-info {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .detail-item {
        padding: 10px;
    }
    
    .detail-label {
        font-size: 10px;
    }
    
    .detail-value {
        font-size: 13px;
    }
    
    .workout-structure {
        font-size: 11px;
        padding: 10px;
    }
}

/* ========================================
   Plan Workouts List Mobile
   ======================================== */
.plan-workouts-list-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.plan-workouts-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 12px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 4px;
}

.plan-workouts-header-mobile h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.draft-hint {
    font-size: 12px;
    color: var(--accent);
    background: rgba(6, 182, 212, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
}

.plan-workout-card-mobile {
    display: flex;
    align-items: stretch;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    touch-action: manipulation;
}

.plan-workout-card-mobile.editable {
    cursor: pointer;
}

.plan-workout-card-mobile.editable:hover,
.plan-workout-card-mobile.editable:active {
    border-color: var(--accent);
    background: rgba(6, 182, 212, 0.08);
}

.pwc-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    min-width: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.pwc-day-name {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.9;
}

.pwc-day-num {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.pwc-month {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.9;
}

.pwc-content {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pwc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pwc-icon {
    font-size: 16px;
}

.pwc-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.pwc-meta .intensity-easy { color: #10b981; }
.pwc-meta .intensity-moderate { color: #f59e0b; }
.pwc-meta .intensity-hard { color: #ef4444; }
.pwc-meta .intensity-very_hard { color: #dc2626; }

.pwc-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.pwc-action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    font-size: 18px;
    color: var(--text-secondary);
}

.plan-workout-card-mobile.editable .pwc-action {
    color: var(--accent);
}

/* Editable workout on desktop */
.plan-calendar-workout.editable {
    cursor: pointer;
    transition: all 0.2s;
}

.plan-calendar-workout.editable:hover {
    background: var(--accent);
    transform: scale(1.05);
}

/* Edit Workout Modal */
.edit-workout-modal .modal-content {
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.edit-workout-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    min-height: 0;
}

.edit-workout-modal .modal-header,
.edit-workout-modal .modal-footer {
    flex-shrink: 0;
}

.edit-workout-modal .form-group {
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .edit-workout-modal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    
    .edit-workout-modal .modal-header {
        padding: 16px;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .edit-workout-modal .modal-body {
        flex: 1;
        overflow-y: auto !important;
        padding: 16px;
    }
    
    .edit-workout-modal .modal-footer {
        padding: 12px 16px;
        border-top: 1px solid var(--glass-border);
        gap: 8px;
    }
}

.edit-workout-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.edit-workout-modal .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.edit-workout-modal .btn-delete {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.edit-workout-modal .btn-delete:hover {
    background: var(--danger);
    color: white;
}

@media (max-width: 480px) {
    .pwc-date {
        min-width: 50px;
        padding: 10px 8px;
    }
    
    .pwc-day-num {
        font-size: 18px;
    }
    
    .pwc-content {
        padding: 10px;
    }
    
    .pwc-title {
        font-size: 13px;
    }
    
    .pwc-action {
        padding: 0 12px;
    }
    
    .edit-workout-modal .form-row {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   MOBILE-FIRST ENHANCEMENTS (January 2026)
   ============================================================================= */

/* Touch-friendly buttons - minimum 44px touch target */
.coaching-tab .btn,
.coaching-tab button,
.coaching-tab .btn-primary,
.coaching-tab .btn-secondary,
.coaching-tab .btn-outline {
    min-height: 44px;
    min-width: 44px;
}

/* Collapsible sections using details/summary */
.coaching-collapsible {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.coaching-collapsible summary {
    padding: 14px 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.coaching-collapsible summary::-webkit-details-marker {
    display: none;
}

.coaching-collapsible summary::after {
    content: '▼';
    font-size: 10px;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.coaching-collapsible[open] summary::after {
    transform: rotate(180deg);
}

.coaching-collapsible-content {
    padding: 0 16px 16px;
}

/* Device compatibility badge for workouts in coaching */
.workout-device-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.workout-device-badge.compatible {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.workout-device-badge.instruction {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.3);
}

/* Improved modal base for mobile */
@media (max-width: 640px) {
    /* All coaching modals - full screen on mobile */
    .coaching-tab .modal,
    .coach-setup-modal,
    .invite-modal,
    .ai-generate-modal,
    .athlete-plan-modal,
    .workout-detail-modal,
    .plan-builder-modal,
    .coach-profile-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .coaching-tab .modal .modal-header,
    .coach-setup-modal .modal-header,
    .ai-generate-modal .modal-header,
    .athlete-plan-modal .modal-header {
        flex-shrink: 0;
        padding: 16px;
        border-bottom: 1px solid var(--glass-border);
        position: sticky;
        top: 0;
        background: var(--card-bg);
        z-index: 10;
    }
    
    .coaching-tab .modal .modal-body,
    .coach-setup-modal .modal-body,
    .ai-generate-modal .modal-body,
    .athlete-plan-modal .modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 16px;
        overscroll-behavior: contain;
    }
    
    .coaching-tab .modal .modal-footer,
    .coach-setup-modal .modal-footer,
    .ai-generate-modal .modal-footer,
    .athlete-plan-modal .modal-footer {
        flex-shrink: 0;
        padding: 12px 16px;
        border-top: 1px solid var(--glass-border);
        background: var(--card-bg);
        position: sticky;
        bottom: 0;
        z-index: 10;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .coaching-tab .modal .modal-footer button {
        flex: 1 1 auto;
        min-width: 100px;
    }
    
    /* Sticky action bar for modals */
    .modal-action-sticky {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to top, var(--card-bg) 80%, transparent);
        padding: 16px;
        padding-top: 32px;
        z-index: 10;
    }
}

/* Coaching dashboard header - stacked on mobile */
@media (max-width: 600px) {
    .coach-dashboard-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .coach-dashboard-title {
        text-align: center;
    }
    
    .coach-dashboard-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .coach-dashboard-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Stats row - horizontal scroll on very small screens */
    .coach-stats-row {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .coach-stats-row::-webkit-scrollbar {
        display: none;
    }
    
    .coach-stat-mini {
        flex: 0 0 auto;
        min-width: 100px;
    }
}

/* Athlete cards - touch friendly */
.athlete-card-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.athlete-card-mobile:active {
    transform: scale(0.98);
    background: rgba(99, 102, 241, 0.1);
}

.athlete-card-mobile .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.athlete-card-mobile .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.athlete-card-mobile .info {
    flex: 1;
    min-width: 0;
}

.athlete-card-mobile .name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.athlete-card-mobile .meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.athlete-card-mobile .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.athlete-card-mobile .status-dot.active {
    background: #10b981;
}

.athlete-card-mobile .status-dot.pending {
    background: #f59e0b;
}

.athlete-card-mobile .status-dot.paused {
    background: #6b7280;
}

/* Swipe actions hint for mobile */
.swipe-hint {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    padding: 8px;
    opacity: 0.7;
}

/* Pull to refresh indicator area */
.ptr-area {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 12px;
}

/* Quick actions floating bar */
.coaching-quick-actions {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    background: var(--card-bg);
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    z-index: 100;
}

.coaching-quick-actions .quick-action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.coaching-quick-actions .quick-action-btn:active {
    transform: scale(0.9);
}

/* Training plan card - mobile optimized */
.plan-card-mobile {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}

.plan-card-mobile-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.plan-card-mobile-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.plan-card-mobile-title {
    flex: 1;
}

.plan-card-mobile-title h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.plan-card-mobile-title .period {
    font-size: 12px;
    color: var(--text-secondary);
}

.plan-card-mobile-body {
    padding: 16px;
}

.plan-card-mobile-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.plan-card-mobile-stat {
    flex: 1;
    text-align: center;
}

.plan-card-mobile-stat .value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

.plan-card-mobile-stat .label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.plan-card-mobile-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.plan-card-mobile-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    transition: width 0.3s;
}

/* Bottom safe area for notch devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .coaching-tab .modal .modal-footer,
    .coaching-quick-actions {
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }
}

/* Instruction Mode Notice */
.instruction-mode-notice {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.instruction-mode-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #6366f1;
    margin-bottom: 8px;
}

.instruction-mode-header span {
    font-size: 20px;
}

.instruction-mode-notice p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Garmin sync status badge */
.garmin-sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-top: 16px;
}

.garmin-sync-status.synced {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.garmin-sync-status span {
    font-size: 18px;
}

/* Sport Type Selector */
.sport-type-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sport-toggle {
    flex: 1;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.sport-toggle:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.05);
}

.sport-toggle.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    color: var(--text-primary);
}

.sport-toggle .sport-icon {
    font-size: 28px;
}

.sport-toggle .sport-label {
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 480px) {
    .sport-type-selector {
        gap: 8px;
    }
    
    .sport-toggle {
        padding: 12px 8px;
        min-width: 80px;
    }
    
    .sport-toggle .sport-icon {
        font-size: 24px;
    }
    
    .sport-toggle .sport-label {
        font-size: 11px;
    }
}

/* Athlete Sport Selector */
.athlete-sport-selector {
    margin-top: 8px;
}

.sport-select {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s;
    min-height: 36px;
}

.sport-select:hover {
    border-color: var(--primary);
}

.sport-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.sport-select option {
    background: #1a1a2e;
    color: var(--text-primary);
    padding: 8px;
}

/* Athlete Sport Badge */
.athlete-sport-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    margin: 12px 0 16px 0;
}

.athlete-sport-badge .sport-icon {
    font-size: 24px;
}

.athlete-sport-badge .sport-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Recovery Status Colors */
.recovery-high, .recovery-good {
    color: #10b981 !important;
}

.recovery-medium, .recovery-moderate {
    color: #f59e0b !important;
}

.recovery-low {
    color: #ef4444 !important;
}

/* Improved AI Profile Preview */
.ai-profile-preview {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    margin: 16px 0;
}

.ai-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.ai-profile-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.ai-profile-period {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
}

.ai-profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.ai-profile-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: background 0.2s;
}

.ai-profile-stat:hover {
    background: rgba(255, 255, 255, 0.06);
}

.ai-profile-stat-icon {
    font-size: 28px;
    min-width: 36px;
    text-align: center;
}

.ai-profile-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.ai-profile-stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.ai-profile-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

@media (max-width: 480px) {
    .ai-profile-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .ai-profile-stat {
        padding: 10px;
    }
    
    .ai-profile-stat-icon {
        font-size: 24px;
    }
    
    .ai-profile-stat-value {
        font-size: 14px;
    }
    
    .athlete-sport-badge {
        display: flex;
        width: fit-content;
    }
}

/* ===== MOBILE FLOATING DOCK FIX =====
   Ensure inputs and footers stay above the floating navigation dock on mobile
   ============================================================================= */
@media (max-width: 768px) {
    /* Coach message input - add bottom margin to stay above dock */
    .coach-message-input {
        margin-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        position: relative;
        bottom: auto;
    }
    
    /* Athlete detail modal body - add bottom padding */
    .athlete-detail-body,
    .athlete-profile-modal .modal-body,
    .prospect-detail-body {
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    /* Modal footers - add bottom margin */
    .modal-footer,
    .coaching-modal .modal-footer,
    .athlete-actions,
    .prospect-actions {
        margin-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }
    
    /* Full-screen coaching modals */
    .coaching-full-modal .modal-content,
    .athlete-detail-modal .modal-content,
    .prospect-chat-modal .modal-content {
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }
    
    /* Coaching forms at bottom of screens */
    .coaching-form-actions,
    .training-plan-form .form-actions,
    .workout-editor .form-actions {
        margin-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }
}
