/* Parent Portal Styles */

.parent-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.parent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.parent-header h1 {
    margin: 0;
    font-size: 28px;
    color: #1f2937;
}

/* Stats Cards */
.parent-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: #eff6ff;
    color: #3b82f6;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #1f2937;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
}

/* Children Grid */
.children-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.child-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.child-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: #3b82f6;
}

.child-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f9ff;
    font-size: 32px;
    color: #3b82f6;
    flex-shrink: 0;
}

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

.child-info h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.child-info p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.child-arrow {
    color: #9ca3af;
    font-size: 18px;
}

/* Recent Sections */
.recent-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recent-section h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

/* Goals List */
.goals-list,
.training-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.goal-item,
.training-item {
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.goal-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.goal-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}

/* Training Item */
.training-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.training-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    color: #f59e0b;
    flex-shrink: 0;
    font-size: 18px;
}

.training-content {
    flex: 1;
}

.training-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.training-content p {
    margin: 2px 0;
    font-size: 12px;
    color: #6b7280;
}

/* Child Detail View */
.child-detail-view {
    max-width: 1000px;
    margin: 0 auto;
}

.child-detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #e5e7eb;
}

.child-detail-title h1 {
    margin: 0 0 4px 0;
    font-size: 24px;
    color: #1f2937;
}

.child-detail-title p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* Tabs */
.detail-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #3b82f6;
}

.tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* Detail Tab Content */
.detail-tab {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.goals-detail-list,
.training-detail-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.goal-detail-card,
.training-detail-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3b82f6;
}

.goal-card-header,
.training-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.goal-card-header h3,
.training-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.goal-description,
.training-description {
    margin: 10px 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

.goal-details-grid,
.training-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.goal-details-grid > div,
.training-details-grid > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.goal-details-grid strong,
.training-details-grid strong {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.goal-details-grid span,
.training-details-grid span {
    font-size: 13px;
    color: #1f2937;
    font-weight: 500;
}

/* Progress Detail */
.progress-detail {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.progress-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #3b82f6;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.average-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #eff6ff;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
}

.average-stat strong {
    color: #1e40af;
}

.average-stat span {
    font-size: 18px;
    font-weight: bold;
    color: #3b82f6;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 14px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-active {
    background: #dbeafe;
    color: #1e40af;
}

.badge-completed {
    background: #dcfce7;
    color: #15803d;
}

.badge-paused {
    background: #fef3c7;
    color: #92400e;
}

/* Responsive */
@media (max-width: 768px) {
    .parent-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .parent-stats {
        grid-template-columns: 1fr;
    }

    .children-grid {
        grid-template-columns: 1fr;
    }

    .goal-details-grid,
    .training-details-grid {
        grid-template-columns: 1fr;
    }

    .detail-tabs {
        gap: 0;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}
